next up previous contents index
Next: Lists of n-tuple reals Up: Geometrical structures : Point, Previous: Functions Summary   Contents   Index

Points, Curves and Polygons with real coordinates

Until now, all of the objects we have described in the section 6 record the coordinates as integers. Use the following objects if you need coordinates of floating point values: Point_fcurve, Fcurve, Fcurves, Fpolygon, Fpolygons. If you need higher precision, use the following objects (coordinates are recorded as double): Point_dcurve, Dcurve, Dcurves.

We will not give the full description of these objects and of their related functions since it is equivalent to the former description, just keep in mind to translate the words curve to fcurve or dcurve and polygon to fpolygon, both in the type names (the first letter being upper-case) and in the function names.

And, of course, do not forget that the coordinates are now real. The C definition of the structure Point_fcurve is the following:

typedef struct point_fcurve {
  float x,y; /* Coordinates of the point */

  /* For use in Fcurve only */
  struct point_fcurve *previous; /*Pointer to the previous point (may be NULL)*/
  struct point_fcurve *next; /* Pointer to the next point (may be NULL) */
} *Point_fcurve;
The C definition of the structure Point_dcurve is the following:
typedef struct point_dcurve {
  double x,y; /* Coordinates of the point */

  /* For use in Dcurve only */
  struct point_dcurve *previous; /*Pointer to the previous point (may be NULL)*/
  struct point_dcurve *next; /* Pointer to the next point (may be NULL) */
} *Point_dcurve;


next up previous contents index
Next: Lists of n-tuple reals Up: Geometrical structures : Point, Previous: Functions Summary   Contents   Index
mw 2004-05-05