-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathEpitrochoid.html
executable file
·163 lines (132 loc) · 8.13 KB
/
Epitrochoid.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
<!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="epitrochoid">Epitrochoid</h1>
<p><a href="index.html">Back to documentation index.</a></p>
<p><a name="Epitrochoid"></a>
### Epitrochoid(outerRadius, rollerRadius, distFromRollerCenter, [rotationDegrees])</p>
<p><strong>Augments:</strong> Curve</p>
<p>A curve evaluator object for a curve drawn by a circle that rolls along the outside another circle, whose position is fixed, with a center of (0,0).
The rolling circle will start at the positive x-axis of the fixed circle.</p>
<p>The following curves can be generated with this class (in the following
descriptions, O = <code>outerRadius</code>, R means <code>rollerRadius</code>,
and D = <code>distFromRollerCenter</code>).<ul></p>
<li>Epicycloid: D = R (epitrochoid touching the fixed circle).</li>
<li>Curtate epicycloid: D < R (epitrochoid not touching the fixed circle).</li>
<li>Prolate epicycloid: D > R (epitrochoid crossing the fixed circle).</li>
<li>Cardioid: R = O; D = O.</li>
<li>Nephroid: R = O/2; D = O/2.</li>
<li>Ranunculoid: R = O/5; D = O/5.</li>
<li>N-cusped epicycloid: R = O/N; D = O/N.</li>
<li>Circle: O = 0; the radius will be R - D.</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>rollerRadius</code> (Type: number)<br />Radius of the rolling circle. An epicycloid results when distFromRollerCenter=rollerRadius.</li>
<li><code>distFromRollerCenter</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="#Epitrochoid_endPoints">endPoints</a><br />Gets the endpoints of this curve.</li>
<li><a href="#Epitrochoid_evaluate">evaluate</a><br />Generates a point on the curve from the specified u-coordinate.</li>
<li><a href="#Epitrochoid_scaleTo">scaleTo</a><br />Creates a modified version of this curve so that it
fits the specified radius.</li>
</ul>
<p><a name="Epitrochoid_endPoints"></a>
### Epitrochoid#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">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="Epitrochoid_evaluate"></a>
### Epitrochoid#evaluate(u)</p>
<p>Generates a point on the curve from the specified u-coordinate.</p>
<h4 id="parameters-1">Parameters</h4>
<ul>
<li><code>u</code> (Type: number)<br />u-coordinate.</li>
</ul>
<h4 id="return-value-1">Return Value</h4>
<p>A 3-element array specifying a 3D point.
Only the x- and y-coordinates will be other than 0. (Type: Array.<number>)</p>
<p><a name="Epitrochoid_scaleTo"></a>
### Epitrochoid#scaleTo(radius)</p>
<p>Creates a modified version of this curve so that it
fits the specified radius.</p>
<h4 id="parameters-2">Parameters</h4>
<ul>
<li><code>radius</code> (Type: number)<br />Desired radius of the curve.</li>
</ul>
<h4 id="return-value-2">Return Value</h4>
<p>Return value. (Type: <a href="Epitrochoid.html">Epitrochoid</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>