-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathH3DU.BezierSurface.html
More file actions
230 lines (172 loc) · 11.5 KB
/
H3DU.BezierSurface.html
File metadata and controls
230 lines (172 loc) · 11.5 KB
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
222
223
224
225
226
227
228
229
230
<!DOCTYPE html><html><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><title>H3DU.BezierSurface</title><meta name="viewport" content="width=device-width"><link rel=stylesheet type="text/css" href="/style.css"></head><body> <div class="header">
<p><a href="#navigation">Menu</a> - <a href="#top">Top</a> - <a href="/">Home</a> -
<a href="http://peteroupc.github.io/">Donate to Me</a></p></div>
<div class="mainarea" id="top">
<h1>H3DU.BezierSurface</h1>
<p><a href="index.html">Back to documentation index.</a></p>
<p><a name='H3DU.BezierSurface'></a></p>
<h3>H3DU.BezierSurface(cp, [u1], [u2], [v1], [v2])</h3>
<p><strong>Augments:</strong> <a href="H3DU.Surface.html">H3DU.Surface</a></p>
<p><b>Deprecated: Instead of this class, use <a href="H3DU.BSplineSurface.html#H3DU.BSplineSurface.fromBezierSurface">H3DU.BSplineSurface.fromBezierSurface</a>
to create a Bézier surface.</b></p>
<p>A <a href="H3DU.Surface.html">surface evaluator object</a> for a Bézier surface.</p>
<h4>Parameters</h4>
<ul>
<li><code>cp</code> (Type: Array.<Array.<Array.<number>>>)<br>An array of control point arrays as specified in <a href="H3DU.BSplineSurface.html#H3DU.BSplineSurface.fromBezierSurface">H3DU.BSplineSurface.fromBezierSurface</a>.</li>
<li><code>u1</code> (Type: number) (optional)<br>No longer used since version 2.0. The starting and ending points will be (0, 1). (This parameter was the starting point for the purpose of interpolation along the u-axis.)</li>
<li><code>u2</code> (Type: number) (optional)<br>No longer used since version 2.0. The starting and ending points will be (0, 1). (This parameter was the ending point for the purpose of interpolation along the u-axis.)</li>
<li><code>v1</code> (Type: number) (optional)<br>No longer used since version 2.0. The starting and ending points will be (0, 1). (This parameter was the starting point for the purpose of interpolation along the v-axis.)</li>
<li><code>v2</code> (Type: number) (optional)<br>No longer used since version 2.0. The starting and ending points will be (0, 1). (This parameter was the ending point for the purpose of interpolation along the v-axis.)</li>
</ul>
<h3>Methods</h3>
<ul>
<li><a href="#H3DU.BezierSurface_bitangent">bitangent</a><br>Finds an approximate bitangent vector of this surface at the specified u- and v-coordinates.</li>
<li><a href="#H3DU.BezierSurface_endPoints">endPoints</a><br>Returns the starting and ending u- and v-coordinates of this surface.</li>
<li><a href="#H3DU.BezierSurface_evaluate">evaluate</a><br>Evaluates the surface function based on a point
in a Bézier surface.</li>
<li><a href="#H3DU.BezierSurface_gradient">gradient</a><br>Finds an approximate gradient vector of this surface at the specified u- and v-coordinates.</li>
<li><a href="#H3DU.BezierSurface_normal">normal</a><br>Convenience method for finding an approximate normal vector of this surface at the specified u- and v-coordinates.</li>
<li><a href="#H3DU.BezierSurface_tangent">tangent</a><br>Finds an approximate tangent vector of this surface at the specified u- and v-coordinates.</li>
</ul>
<p><a name='H3DU.BezierSurface_bitangent'></a></p>
<h3>H3DU.BezierSurface#bitangent(u, v)</h3>
<p>Finds an approximate bitangent vector of this surface at the specified u- and v-coordinates.</p>
<p>The implementation in <a href="H3DU.Surface.html">H3DU.Surface</a> calls the evaluator's <code>bitangent</code>
method if it implements it; otherwise, does a numerical differentiation
with respect to the v-axis using the <code>evaluate</code> method.</p>
<p>The <b>bitangent vector</b> is the vector pointing in the direction of the v-axis, or alternatively,
the partial derivative of the <code>evaluate</code> method with respect to <code>v</code>. The bitangent vector returned by this method <i>should not</i> be "normalized" to a <a href="tutorial-glmath.html">unit vector</a>.</p>
<h4>Parameters</h4>
<ul>
<li><code>u</code> (Type: number)<br>u-coordinate of a point on the surface.</li>
<li><code>v</code> (Type: number)<br>v-coordinate of a point on the surface.</li>
</ul>
<h4>Return Value</h4>
<p>An array describing a bitangent vector. It should have at least as many
elements as the number of dimensions of the underlying surface. (Type: Array.<number>)</p>
<p><a name='H3DU.BezierSurface_endPoints'></a></p>
<h3>H3DU.BezierSurface#endPoints()</h3>
<p>Returns the starting and ending u- and v-coordinates of this surface.</p>
<h4>Return Value</h4>
<p>A four-element array. The first and second
elements are the starting and ending u-coordinates, respectively, of the surface, and the third
and fourth elements are its starting and ending v-coordinates. (Type: Array.<number>)</p>
<p><a name='H3DU.BezierSurface_evaluate'></a></p>
<h3>H3DU.BezierSurface#evaluate(u, v)</h3>
<p>Evaluates the surface function based on a point
in a Bézier surface.</p>
<h4>Parameters</h4>
<ul>
<li><code>u</code> (Type: number)<br>u-coordinate of the surface to evaluate (generally within the range given in the constructor).</li>
<li><code>v</code> (Type: number)<br>v-coordinate of the surface to evaluate.</li>
</ul>
<h4>Return Value</h4>
<p>An array of the result of
the evaluation. It will have as many elements as a control point, as specified in the constructor. (Type: Array.<number>)</p>
<p><a name='H3DU.BezierSurface_gradient'></a></p>
<h3>H3DU.BezierSurface#gradient(u, v)</h3>
<p>Finds an approximate gradient vector of this surface at the specified u- and v-coordinates.</p>
<p>The implementation in <a href="H3DU.Surface.html">H3DU.Surface</a> calls the evaluator's <code>gradient</code>
method if it implements it; otherwise uses the surface's tangent and bitangent vectors to implement the gradient
(however, this approach is generally only meaningful for a three-dimensional surface).</p>
<p>The <b>gradient</b> is a vector pointing up and away from the surface.
If the evaluator describes a regular three-dimensional surface (usually
a continuous, unbroken surface such as a sphere, an open
cylinder, or a disk rotated in three dimensions), this can be the cross product
of the <a href="H3DU.Surface.html#H3DU.Surface_tangent">tangent vector</a>
and <a href="H3DU.Surface.html#H3DU.Surface_bitangent">bitangent vector</a>,
in that order. The gradient returned by this method <i>should not</i> be "normalized" to a <a href="tutorial-glmath.html">unit vector</a>.</p>
<h4>Parameters</h4>
<ul>
<li><code>u</code> (Type: number)<br>u-coordinate of a point on the surface.</li>
<li><code>v</code> (Type: number)<br>v-coordinate of a point on the surface.</li>
</ul>
<h4>Return Value</h4>
<p>An array describing a gradient vector. It should have at least as many
elements as the number of dimensions of the underlying surface. (Type: Array.<number>)</p>
<p><a name='H3DU.BezierSurface_normal'></a></p>
<h3>H3DU.BezierSurface#normal(u, v)</h3>
<p>Convenience method for finding an approximate normal vector of this surface at the specified u- and v-coordinates.
The <b>normal vector</b> is the same as the gradient vector, but "normalized" to a unit vector.</p>
<h4>Parameters</h4>
<ul>
<li><code>u</code> (Type: number)<br>u-coordinate of a point on the surface.</li>
<li><code>v</code> (Type: number)<br>v-coordinate of a point on the surface.</li>
</ul>
<h4>Return Value</h4>
<p>An array describing a normal vector. It should have at least as many
elements as the number of dimensions of the underlying surface. (Type: Array.<number>)</p>
<p><a name='H3DU.BezierSurface_tangent'></a></p>
<h3>H3DU.BezierSurface#tangent(u, v)</h3>
<p>Finds an approximate tangent vector of this surface at the specified u- and v-coordinates.
The implementation in <a href="H3DU.Surface.html">H3DU.Surface</a> calls the evaluator's <code>tangent</code>
method if it implements it; otherwise, does a numerical differentiation
with respect to the u-axis using the <code>evaluate</code> method.</p>
<p>The <b>tangent vector</b> is the vector pointing in the direction of the u-axis,
or alternatively, the partial derivative of the <code>evaluate</code> method with respect to <code>u</code>.
The tangent vector returned by this method <i>should not</i> be "normalized" to a <a href="tutorial-glmath.html">unit vector</a>.</p>
<h4>Parameters</h4>
<ul>
<li><code>u</code> (Type: number)<br>u-coordinate of a point on the surface.</li>
<li><code>v</code> (Type: number)<br>v-coordinate of a point on the surface.</li>
</ul>
<h4>Return Value</h4>
<p>An array describing a tangent vector. It should have at least as many
elements as the number of dimensions of the underlying surface. (Type: Array.<number>)</p>
<p><a href="index.html">Back to documentation index.</a></p>
</div><nav id="navigation"><ul>
<li><a href="/">Back to start site.</a>
<li><a href="https://github.com/peteroupc/peteroupc.github.io">This site's repository (source code)</a>
<li><a href="https://github.com/peteroupc/peteroupc.github.io/issues">Post an issue or comment</a></ul>
<p>
<a href="//twitter.com/share">Share via Twitter</a>, <a href="//www.facebook.com/sharer/sharer.php" id="sharer">Share via Facebook</a>
</p>
</div>
<h3>Navigation</h3>
<ul>
<li><a href="DrawingToy.html">DrawingToy</a></li>
<li><a href="Epitrochoid.html">Epitrochoid</a></li>
<li><a href="H3DU.html">H3DU</a></li>
<li><a href="H3DU.BSplineCurve.html">H3DU.BSplineCurve</a></li>
<li><a href="H3DU.BSplineSurface.html">H3DU.BSplineSurface</a></li>
<li><a href="H3DU.BufferAccessor.html">H3DU.BufferAccessor</a></li>
<li><a href="H3DU.Camera.html">H3DU.Camera</a></li>
<li><a href="H3DU.Curve.html">H3DU.Curve</a></li>
<li><a href="H3DU.CurveBuilder.html">H3DU.CurveBuilder</a></li>
<li><a href="H3DU.CurveTube.html">H3DU.CurveTube</a></li>
<li><a href="H3DU.GraphicsPath.html">H3DU.GraphicsPath</a></li>
<li><a href="H3DU.InputTracker.html">H3DU.InputTracker</a></li>
<li><a href="H3DU.MathUtil.html">H3DU.MathUtil</a></li>
<li><a href="H3DU.MeshBuffer.html">H3DU.MeshBuffer</a></li>
<li><a href="H3DU.Meshes.html">H3DU.Meshes</a></li>
<li><a href="H3DU.PiecewiseCurve.html">H3DU.PiecewiseCurve</a></li>
<li><a href="H3DU.Shape.html">H3DU.Shape</a></li>
<li><a href="H3DU.ShapeGroup.html">H3DU.ShapeGroup</a></li>
<li><a href="H3DU.Surface.html">H3DU.Surface</a></li>
<li><a href="H3DU.SurfaceBuilder.html">H3DU.SurfaceBuilder</a></li>
<li><a href="H3DU.TextFont.html">H3DU.TextFont</a></li>
<li><a href="H3DU.TextureAtlas.html">H3DU.TextureAtlas</a></li>
<li><a href="H3DU.Transform.html">H3DU.Transform</a></li>
<li><a href="Hypotrochoid.html">Hypotrochoid</a></li>
<li><a href="MatrixStack.html">MatrixStack</a></li>
<li><a href="Polyhedra.html">Polyhedra</a></li>
<li><a href="Promise.html">Promise</a></li>
<li><a href="Semantic.html">Semantic</a></li>
<li><a href="StarField.html">StarField</a></li>
<li><a href="Superellipsoid.html">Superellipsoid</a></li>
<li><a href="Supertoroid.html">Supertoroid</a></li>
<li><a href="SurfaceOfRevolution.html">SurfaceOfRevolution</a></li>
<li><a href="Trochoid.html">Trochoid</a></li>
<li><a href="curveCatacaustic.html">curveCatacaustic</a></li>
<li><a href="curveEvolute.html">curveEvolute</a></li>
<li><a href="curveInverse.html">curveInverse</a></li>
<li><a href="curveInvolute.html">curveInvolute</a></li>
<li><a href="curveOrthotomic.html">curveOrthotomic</a></li>
<li><a href="curvePedalCurve.html">curvePedalCurve</a></li>
<li><a href="curveRadialCurve.html">curveRadialCurve</a></li>
<li><a href="polarCurve.html">polarCurve</a></li>
<li><a href="ruledSurface.html">ruledSurface</a></li>
<li><a href="spiralCurve.html">spiralCurve</a></li>
</ul>
</nav>
</body></html>