Previous Next Up Title Contents Index Functions Index Top Library

3D CIRCLE

tcircle3


CALL SEQUENCE

void tcircle3 (strid, circle)

INPUT PARAMETERS

Pint	strid;
Tcircle3	*circle;

ARGUMENTS

strid
Identifier of the circle structure.
circle
3D circle geometry.

TYPE

typedef struct {
	Tcircle_type3	type;	/* circle type definition */
	union {
		struct {
			Ppoint3	c;	/* circle center */
			Pfloat	r;	/* circle radius */
			Pvec3	n;	/* vector orthogonal to the plane of the circle */
		} crn;
		struct {
			Ppoint3	p1;
			Ppoint3	p2;	/* 3 points of the circle */
			Ppoint3	p3;
		} ppp;
	} geometry
} Tcircle3;
typedef enum {
	TCENTER_RADIUS_NORMAL,
	TPOINT_POINT_POINT3
} Tcircle_type3;

EFFECT

This function generates a structure representing a circle, defined either by its center and its radius or by three non-colinear points. The circle is approximated by a certain number of points on its circumference. The distribution of these points can be controlled by the angle separating two points, by first calling the function tset_step_angle.

The PHIGS primitive fill area set is used to build this circle. The PHIGURE graphic attribute functions concerned are therefore tset_int_style, tset_int_style_ind, tset_int_colr_ind, tset_edge_flag, tset_edgetype, tset_edgewidth and tset_edge_colr_ind. circle->type = TCENTER_RADIUS_NORMAL,

Circle defined by its geometrical center (c), its radius (r) and a vector normal to the plane of the circle (n).

circle->type = TPOINT_POINT_POINT3

circle is defined by 3 points (p1, p2, p3 ) belonging to the circle.


Previous Next Up Title Contents Index Functions Index Top Library