Previous Next Up Title Contents Index Functions Index Top Library

2D CIRCLE

tcircle


CALL SEQUENCE

void tcircle (strid, circle)

INPUT PARAMETERS

Pint	strid;
Tcircle	*circle;

ARGUMENTS

strid
Identifier of the circle structure.
circle
Circle geometry.

TYPE

typedef struct {
	Tcircle_type	type;	/* type of defintion of circle */
	union {
		struct {
			Ppoint	c;	/* circle center */
			Pfloat	r;	/* circle radius */
		} cr;
		struct {
			Ppoint	p1;
			Ppoint	p2;	/* 3 circle points */
			Ppoint	p3;
		} ppp;
	} geometry
} Tcircle;
typedef enum {
	TCENTER_RADIUS,
	TPOINT_POINT_POINT
} Tcircle_type;

EFFECT

This function generates a structure representing a circle on the XY plane, 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,

circle->type = TPOINT_POINT_POINT,


Previous Next Up Title Contents Index Functions Index Top Library