[Ipe-discuss] CGAL points generator ipelets in Ipe 7

Sebastien Loriot (GeometryFactory) sloriot.ml at gmail.com
Tue Mar 16 08:08:55 CET 2010


[cristo] wrote:
> Hello all,
> 
> I'm writing an Ipelet in Lua that uses a set of points (markers) as 
> input. I sort the points using their x coordinate, which I obtain using 
> the getPosition() function of each marker object.
> 
> My script works fine when I use a set of points created either manually 
> (i.e. placing the points on the page with the mouse) or by using one of 
> the CGAL ipelets in ipelets -> Generators -> Points *, but I'm having 
> problems when I use a set of points with some points created manually 
> and some ones created by the generators.
> 
> Doing some debug I found that the coordinates of the two sets of points 
> (manually placed and generated) doesn't seem to be referenced to the 
> same coordinate system, as all the manually placed points have always 
> positive values and the generated ones have sometimes negative values, 
> and the ranges of them are different.
> 
> ¿Does anybody have any idea of why this happens?, ¿Are not all the 
> objects on a page referenced to the same coordinate system?
> 

Just an hint: a CGAL ipelet generator creates points in a square or 
circle centered at (0,0). A transformation is then applied to translate 
all the points at the center of the page. You probably should have a 
look at the matrix() function of ipe::Object.

hth

S.

> Thanks in advance.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Ipe-discuss mailing list
> Ipe-discuss at cs.uu.nl
> https://mail.cs.uu.nl/mailman/listinfo/ipe-discuss




More information about the Ipe-discuss mailing list