Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] interpolation in a triangle
- Date: Thu, 26 Apr 2012 08:32:00 +0200
In that case, you can set the color as info in the vertex type [0]
and then use the following function.
//the following two functions suppose that
// OutputIterator has value type
// std::pair<Dt::Vertex_handle, Dt::Geom_traits::FT>
//!!!they are not documented!!!
template <class Dt, class OutputIterator>
Triple< OutputIterator, typename Dt::Geom_traits::FT, bool >
natural_neighbor_coordinates_vertex_2(const Dt& dt,
const typename Dt::Geom_traits::Point_2& p,
OutputIterator out, typename Dt::Face_handle
start
= typename Dt::Face_handle())
The difference with the documented one [1] is that the output_iterator
uses the vertex instead of the Point (so that you can access the info).
You can then make a linear interpolation of each color using the
coefficient and the norm.
Sebastien.
[0] http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Triangulation_2/Chapter_main.html#Subsection_37.11.1
[1] http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Interpolation_ref/Function_natural_neighbor_coordinates_2.htm
On 04/17/2012 06:25 PM, gwenm wrote:
Hi all
in interpolation_2_demo we have "geomview doesn't work on this platform"
:-(
Is there an easy way to interpolate a variable (rgb, etc...) at any point in
a triangle, given the values of the vertices of a triangle ?
Does CGAL provide a solution to parse all points in a triangle ?
Thanks
best regards
gwenaelle
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/interpolation-in-a-triangle-tp4565287p4565287.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] interpolation in a triangle, gwenm, 04/17/2012
- Re: [cgal-discuss] interpolation in a triangle, Sebastien Loriot (GeometryFactory), 04/26/2012
Archive powered by MHonArc 2.6.16.