summaryrefslogtreecommitdiff
path: root/xc/unsupported/doc/PHIGS/man3/p235
blob: 1562f15a6b7487f6e6c3738d4adcb709f9da5ed4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
.\"##
.\" $XConsortium: p235,v 5.2 94/04/17 20:57:09 rws Exp $
.\"##
.\"## 
$XMCOPY
.\"## Copyright (c) 1990, 1991 by Sun Microsystems, Inc. 
.\"## 
.\"##                         All Rights Reserved
.\"## 
.\"## Permission to use, copy, modify, and distribute this software and its 
.\"## documentation for any purpose and without fee is hereby granted, 
.\"## provided that the above copyright notice appear in all copies and that
.\"## both that copyright notice and this permission notice appear in 
.\"## supporting documentation, and that the name of Sun Microsystems,
.\"## not be used in advertising or publicity 
.\"## pertaining to distribution of the software without specific, written 
.\"## prior permission.  
.\"## 
.\"## SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
.\"## INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
.\"## EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
.\"## CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
.\"## USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
.\"## OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\"## PERFORMANCE OF THIS SOFTWARE.
.ds f \s-2NON-UNIFORM B-SPLINE CURVE\s+2
.TH "NON-UNIFORM B-SPLINE CURVE" 3P+ "29 February 1991"
.SH NAME
NON-UNIFORM B-SPLINE CURVE \- create a non-uniform B-spline curve structure element
.IX "NURB functions" "NON-UNIFORM B-SPLINE CURVE"
.IX "PHIGS Extension Functions" "NON-UNIFORM B-SPLINE CURVE"
.IX "Line Primitives" "NON-UNIFORM B-SPLINE CURVE"
.IX "Primitives, Line Primitives" "NON-UNIFORM B-SPLINE CURVE"
.IX "Splines" "NON-UNIFORM B-SPLINE CURVE"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
pnuni_bsp_curv (order, knots, rationality, cpoints, min, max)
Pint	order;	\fIspline order\fP
Pfloat_list	*knots;	\fIlist of knots\fP
Prational	rationality;	\fIrationality specifier\fP
Ppoint_list34	*cpoints;	\fIlist of 3D or 4D control points\fP
Pfloat	min, max;	\fIparameter range\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, *, STOP, *)
.SH DESCRIPTION
.SS Purpose
\s-2NON-UNIFORM B-SPLINE CURVE\s+2
creates a structure element containing 
the definition of a non-uniform
B-spline curve.  The curve may be
rational or non-rational.
.SS C Input Parameters
.IP \fIorder\fR
The order of the curve.  The degree of the curve's basic functions is one
less than \fIorder\fP.
.IP \fIknots\fR
A pointer to a Pfloat_list structure containing a non-decreasing sequence of
real numbers specifying the curve's knot vector.
Pfloat_list is defined in phigs.h as follows:
.sp .2
.nf
.ta .5i +1i +1i
.sp .2
typedef struct {
.sp .2
	Pint	num_floats;	/* number of Pfloats in list */
	Pfloat	*floats;	/* list of floats */
.sp .2
} Pfloat_list;
.fi
.IP \fIrationality\fR
The rationality of the curve.  Prational is defined in phigs.h as follows:
.sp .2
.nf
.ta .5i +\w'PNON_RATIONAL,     'u 
.sp .2
typedef enum {
.sp .2
	PNON_RATIONAL = 0,
	PRATIONAL = 1
.sp .2
} Prational;
.fi
.IP "\fIcpoints\fR"
A pointer to a Ppoint_list34 structure containing the list of the curve's
control points.  The points are specified in Modelling Coordinates.
Ppoint_list34 is defined in phigs.h as follows:
.sp .2
.nf
.ta .5i +.5i +.75i +1i
.sp .2
typedef struct {			/* list of 3D or 4D points */
.sp .2
	Pint		num_points;	/* number of control points */
	union {
		Ppoint3	*point3d;	/* array of 3D points */
		Ppoint4	*point4d;	/* array of 4D points */
	} points;
.sp .2
} Ppoint_list34;
.fi
.IP
The point4d member of the points union is used if rationality 
is \s-2PRATIONAL\s+2; otherwise, the point3d member is used.
.fi
.bp
.IP
Ppoint3 is defined in phigs.h as follows:
.sp .2
.nf
.ta .5i +\w'Pfloat     'u +\w'x;     'u
.sp .2
typedef struct {
.sp .2
	Pfloat	x;	/* x coordinate */
	Pfloat	y;	/* y coordinate */
	Pfloat	z;	/* z coordinate */
.sp .2
} Ppoint3;
.IP
.fi
Ppoint4 is defined in phigs.h as follows:
.sp .2
.nf
.ta .5i +\w'Pfloat     'u +\w'x;     'u
.sp .2
typedef struct {
.sp .2
	Pfloat	x;	/* x coordinate */
	Pfloat	y;	/* y coordinate */
	Pfloat	z;	/* z coordinate */
	Pfloat	w;	/* w coordinate */
.sp .2
} Ppoint4;
.fi
.IP "\fImin, max\fR"
The parameter limits specifying the range over which the curve is to be
evaluated.
.SS Execution
.LP
Depending on the edit mode, a \s-2NON-UNIFORM B-SPLINE CURVE\s+2 element is 
either inserted into the open structure after the element
pointer, or replaces the element pointed at by the element pointer.  The
element pointer is then updated to point to the 
\s-2NON-UNIFORM B-SPLINE CURVE\s+2 structure element.
.LP
The spline order must be greater than zero.
Curves of unsupported order will be displayed by drawing a polyline
connecting the control points.
Curves of order one are drawn as a polymarker using the current polymarker
attributes.
.LP
The knots must form a non-decreasing sequence of numbers.
.LP
The rationality selector parameter may have the enumerated value
\fIRational\fP or \fINon-rational\fP.
When Rational is specified, the control points are specified as 4D
homogeneous modelling coordinates. When Non-rational is specified, 
the control points
are 3D \s-2PHIGS\s+2 modelling coordinates.
.LP
The number of control points must be at least as large as the
order. The number of control points plus the spline order must equal
the number of knots.
.LP
.LP
At structure traversal time, a non-uniform B-spline curve primitive is
drawn using the extended polyline attributes.  
See \s-2SET POLYLINE REPRESENTATION PLUS\s+2 and
\s-2SET CURVE APPROXIMATION CRITERIA\s+2
for more information on display attributes.
.SS Attributes Applied
The attributes listed below are used to display the
\s-2NON-UNIFORM B-SPLINE CURVE\s+2 primitive when the structure is traversed. The Aspect Source 
Flags (\s-2ASF\s+2s) tell where to access the output display attributes. 
These attributes can come directly from the traversal state list,
or they can be accessed indirectly, using the appropriate index 
in the traversal state list and the corresponding bundled 
representation in the PHIGS workstation state list.
.RS
.nf
.ta .5i +\w'back interior reflectance equation   'u 
.sp
polyline colour			polyline colour index \s-2ASF\s+2
linewidth scale factor		linewidth scale factor \s-2ASF\s+2
linetype			linetype \s-2ASF\s+2
polyline shading method		polyline shading method \s-2ASF\s+2
curve approximation criteria	curve approximation criteria \s-2ASF\s+2
polyline index
depth cue index
name set
.fi
.RE
.sp .2
.SH ERRORS
.IP 005
Ignoring function, function requires state (\s-2PHOP, *, STOP, *\s+2)
.IP 600
Ignoring function, not enough control points for specified order
.IP 601
Ignoring function, knot sequence is not non-decreasing
.IP 602
Ignoring function, order is inconsistent with number of knots and control
points specified
.IP 615
Ignoring function, parameter range is inconsistent with knots
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "ADD TRIMMING CURVE (3P+)"
.SM "SET CURVE APPROXIMATION CRITERIA (3P+)"
.SM "INQUIRE CURVE AND SURFACE FACILITIES (3P+)"
.SM "SET POLYLINE REPRESENTATION PLUS (3P+)"
.fi