-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathHypotrochoid.html
executable file
·203 lines (160 loc) · 9.89 KB
/
Hypotrochoid.html
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
<!DOCTYPE html><html xmlns:dc="http://purl.org/dc/terms/"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width"><link rel=stylesheet type="text/css" href="/style.css">
<script type="text/x-mathjax-config"> MathJax.Hub.Config({"HTML-CSS": { availableFonts: ["STIX","TeX"], linebreaks: { automatic:true }, preferredFont: "TeX" },
tex2jax: { displayMath: [ ["$$","$$"], ["\\[", "\\]"] ], inlineMath: [ ["$", "$"], ["\\\\(","\\\\)"] ], processEscapes: true } });
</script><script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_HTML-full"></script></head><body> <div class="header">
<nav><p><a href="#navigation">Menu</a> - <a href="#top">Top</a> - <a href="/">Home</a></nav></div>
<div class="mainarea" id="top">
<h1 id="hypotrochoid">Hypotrochoid</h1>
<p><a href="index.html">Back to documentation index.</a></p>
<p><a name="Hypotrochoid"></a>
### Hypotrochoid(outerRadius, innerRadius, distFromInnerCenter, [rotationDegrees])</p>
<p><strong>Augments:</strong> Curve</p>
<p>A curve evaluator object for a curve drawn by a circle that rolls along the inside
of another circle, whose position is fixed, with a center of (0,0).</p>
<p>The following curves can be generated with this class (in the following
descriptions, O = <code>outerRadius</code>, R means <code>innerRadius</code>,
and D = <code>distFromInnerCenter</code>).<ul></p>
<li>Hypocycloid: D = R (hypotrochoid touching the fixed circle).</li>
<li>Curtate hypocycloid: D < R (hypotrochoid not touching the fixed circle).</li>
<li>Prolate hypocycloid: D > R (hypotrochoid crossing the fixed circle).</li>
<li>Circle: O = R\*2; the circle will have radius R - D.</li>
<li>Ellipse: O = R\*2; the ellipse (unrotated) will have width abs(R+D)\*2
and height abs(R-D)\*2.</li>
<li>Line segment with length O\*2: O = R\*2; D = R.</li>
<li>Deltoid: O = R\*3; D = R.</li>
<li>Astroid: O = R\*4; D = R.</li>
<li>N-pointed hypocycloid: O = R \* N; D = R.</li>
<p></ul></p>
<p>This class is considered a supplementary class to the
Public Domain HTML 3D Library and is not considered part of that
library.</p>
<p>To use this class, you must include the script “extras/evaluators.js”; the
class is not included in the “h3du_min.js” file which makes up
the HTML 3D Library. Example:</p>
<pre><script type="text/javascript" src="extras/evaluators.js"></script>
</pre>
<h4 id="parameters">Parameters</h4>
<ul>
<li><code>outerRadius</code> (Type: number)<br />Radius of the circle whose position is fixed.</li>
<li><code>innerRadius</code> (Type: number)<br />Radius of the rolling circle. A hypocycloid results when distFromInnerCenter=innerRadius.</li>
<li><code>distFromInnerCenter</code> (Type: number)<br />Distance from the center of the rolling circle to the drawing pen.</li>
<li><code>rotationDegrees</code> (Type: number) (optional)<br />Starting angle of the curve from the positive x-axis toward the positive y-axis, in degrees. Default is 0.</li>
</ul>
<h3 id="methods">Methods</h3>
<ul>
<li><a href="#Hypotrochoid_arcLength">arcLength</a><br />Finds an approximate arc length (distance) between the start of this
curve and the point at the specified u-coordinate of this curve.</li>
<li><a href="#Hypotrochoid_endPoints">endPoints</a><br />Gets the endpoints of this curve.</li>
<li><a href="#Hypotrochoid_evaluate">evaluate</a><br />Finds the coordinates of a point on the curve from the specified u-coordinate.</li>
<li><a href="#Hypotrochoid.rose">rose</a><br />Creates a curve evaluator object for a rose, a special
form of hypotrochoid.</li>
<li><a href="#Hypotrochoid_scaleTo">scaleTo</a><br />Creates a modified version of this curve so that it
fits the specified radius.</li>
</ul>
<p><a name="Hypotrochoid_arcLength"></a>
### Hypotrochoid#arcLength(u)</p>
<p>Finds an approximate arc length (distance) between the start of this
curve and the point at the specified u-coordinate of this curve.</p>
<h4 id="parameters-1">Parameters</h4>
<ul>
<li><code>u</code> (Type: number)<br />u-coordinate of a point on the curve.</li>
</ul>
<h4 id="return-value">Return Value</h4>
<p>The approximate arc length of this curve at the specified u-coordinate. (Type: Array.<number>)</p>
<p><a name="Hypotrochoid_endPoints"></a>
### Hypotrochoid#endPoints()</p>
<p>Gets the endpoints of this curve.
For this curve evaluator object, the curve
starts at 0 and ends at π*2.</p>
<h4 id="return-value-1">Return Value</h4>
<p>An array containing the two
endpoints of the curve. The first number is the start of the curve,
and the second number is the end of the curve. (Type: Array.<number>)</p>
<p><a name="Hypotrochoid_evaluate"></a>
### Hypotrochoid#evaluate(u)</p>
<p>Finds the coordinates of a point on the curve from the specified u-coordinate.</p>
<h4 id="parameters-2">Parameters</h4>
<ul>
<li><code>u</code> (Type: number)<br />u-coordinate.</li>
</ul>
<h4 id="return-value-2">Return Value</h4>
<p>A 3-element array specifying a 3D point.
Only the x- and y-coordinates can be other than 0. (Type: Array.<number>)</p>
<p><a name="Hypotrochoid.rose"></a>
### (static) Hypotrochoid.rose(n, distFromInnerCenter, [rotationDegrees])</p>
<p>Creates a curve evaluator object for a rose, a special
form of hypotrochoid.</p>
<h4 id="parameters-3">Parameters</h4>
<ul>
<li><code>n</code> (Type: number)<br />Parameter that determines the petal form of the rose. For example, the rose is symmetrical if this number is even.</li>
<li><code>distFromInnerCenter</code> (Type: number)<br />Distance from the center of the rolling circle to the drawing pen.</li>
<li><code>rotationDegrees</code> (Type: number) (optional)<br />Starting angle of the curve from the positive x-axis toward the positive y-axis, in degrees. Default is 0.</li>
</ul>
<h4 id="return-value-3">Return Value</h4>
<p>The resulting curve evaluator object. (Type: <a href="Hypotrochoid.html">Hypotrochoid</a>)</p>
<p><a name="Hypotrochoid_scaleTo"></a>
### Hypotrochoid#scaleTo(radius)</p>
<p>Creates a modified version of this curve so that it
fits the specified radius.</p>
<h4 id="parameters-4">Parameters</h4>
<ul>
<li><code>radius</code> (Type: number)<br />Desired radius of the curve.</li>
</ul>
<h4 id="return-value-4">Return Value</h4>
<p>Return value. (Type: <a href="Hypotrochoid.html">Hypotrochoid</a>)</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>
<div class="noprint">
<p>
<a href="//twitter.com/intent/tweet">Share via Twitter</a>, <a href="//www.facebook.com/sharer/sharer.php" id="sharer">Share via Facebook</a>
</p>
</div>
<h3 id="navigation">Navigation</h3>
<ul>
<li><a href="BSplineCurve.html">BSplineCurve</a></li>
<li><a href="BSplineSurface.html">BSplineSurface</a></li>
<li><a href="BufferAccessor.html">BufferAccessor</a></li>
<li><a href="Curve.html">Curve</a></li>
<li><a href="CurveBuilder.html">CurveBuilder</a></li>
<li><a href="GraphicsPath.html">GraphicsPath</a></li>
<li><a href="H3DU.html">H3DU</a></li>
<li><a href="MathUtil.html">MathUtil</a></li>
<li><a href="MeshBuffer.html">MeshBuffer</a></li>
<li><a href="Meshes.html">Meshes</a></li>
<li><a href="PiecewiseCurve.html">PiecewiseCurve</a></li>
<li><a href="Semantic.html">Semantic</a></li>
<li><a href="ShapeGroup.html">ShapeGroup</a></li>
<li><a href="Surface.html">Surface</a></li>
<li><a href="SurfaceBuilder.html">SurfaceBuilder</a></li>
<li><a href="Transform.html">Transform</a></li>
<li><a href="extras_camera.html">module:extras/camera</a></li>
<li><a href="extras_camera.Camera.html">module:extras/camera.Camera</a></li>
<li><a href="extras_camera.InputTracker.html">module:extras/camera.InputTracker</a></li>
<li><a href="extras_createwasher.html">module:extras/createwasher</a></li>
<li><a href="extras_curvetube.html">module:extras/curvetube</a></li>
<li><a href="extras_curvetube.CurveTube.html">module:extras/curvetube.CurveTube</a></li>
<li><a href="extras_derivedcurves.html">module:extras/derivedcurves</a></li>
<li><a href="extras_evaluators.html">module:extras/evaluators</a></li>
<li><a href="extras_evaluators.Roulette.html">module:extras/evaluators.Roulette</a></li>
<li><a href="extras_evaluators.SurfaceOfRevolution.html">module:extras/evaluators.SurfaceOfRevolution</a></li>
<li><a href="extras_fourierknot.html">module:extras/fourierknot</a></li>
<li><a href="extras_gradients.html">module:extras/gradients</a></li>
<li><a href="extras_marbleshader2.html">module:extras/marbleshader2</a></li>
<li><a href="extras_matrixstack.html">module:extras/matrixstack</a></li>
<li><a href="extras_matrixstack.MatrixStack.html">module:extras/matrixstack.MatrixStack</a></li>
<li><a href="extras_moresurfaces.html">module:extras/moresurfaces</a></li>
<li><a href="extras_moresurfaces.KleinBottle.html">module:extras/moresurfaces.KleinBottle</a></li>
<li><a href="extras_moresurfaces.MoebiusStrip.html">module:extras/moresurfaces.MoebiusStrip</a></li>
<li><a href="extras_pathutil.html">module:extras/pathutil</a></li>
<li><a href="extras_randompolygon.html">module:extras/randompolygon</a></li>
<li><a href="extras_starpolygon.html">module:extras/starpolygon</a></li>
<li><a href="extras_superellipsoid.html">module:extras/superellipsoid</a></li>
<li><a href="extras_superellipsoid.Supershape.html">module:extras/superellipsoid.Supershape</a></li>
<li><a href="extras_superellipsoid.Supertoroid.html">module:extras/superellipsoid.Supertoroid</a></li>
<li><a href="extras_torusknot.html">module:extras/torusknot</a></li>
<li><a href="extras_torusknot.TorusKnot.html">module:extras/torusknot.TorusKnot</a></li>
</ul>
</nav></body></html>