| An example (hacked together) that shows a rotating trefoil knot
can be found in 3D::USER$02:[ROTH.PUBLIC].
The following type of parameterization seems obvious to try:
r(t) = 1 + a*cos(3*t/2)
x(t) = r(t)*cos(t)
y(t) = r(t)*sin(t)
z(t) = h*sin(3*t/2)
0 <= t < 4*PI, a & h = some adhoc shape params
I recommend sweeping a frame along this curve and reorthogonalizing
it from point to point against the new tangent vector (rather than
using the Frenet-Serret frames, since these give bad behaviour if
the curvature gets very small along the curve) if you want to
show a "thick" curve instead of just a line.
Torus knots look pretty nice too, and you can intertwine several of them
for an impressive display.
- Jim
|
| Here's another solution. It's conceivable that this is equivalent
to Jim's, but it isn't obvious that it is.
x(t) = (1-s)*R*sin(t) - s*R*sin(t/2)
y(t) = (1-s)*R*cos(t) + s*R*cos(t/2)
R is a size parameter. If your were to circumscribe a circle around
the x-y projection of the trefoil it would have radius R. "s" is a
shape parameter which should be somewhere between 0 and 2/3. s=1/3
seems to be about right.
Using the same z as Jim and setting its extremes to R we get:
z(t) = R*sin(3*t/2)
Here's where these came from:
My first thought was that the projection was like the figures produced
by my daughter's spirograph. The spirograph works by having a pen
placed through a hole in the interior of a circular gear, which is
rolled around the circular interior of a larger (internally toothed)
ring-shaped gear.
I thought I knew that the name for the figure produced by the
spirograph is "hypocycloid" -- though it turns out I was slightly wrong
on that. Anyway I looked up the hypocycloid's formula and discovered
that that name applies only when the "interior" point is on the edge
of the smaller circle. The correct term is hypotrochoid. (If the
moving circle is on the exterior of the fixed circle the result is an
epicycloid or an epitrochoid, by the way).
In order to get three lobes the radius of the moving circle had to be
either 1/3 or 2/3 the radius of the fixed circle. In the former case
the result would be a loop-the-loop around the central point, something
like the familiar pictures showing the apparent retrograde motions of
the outer planets, so I could set the smaller radius to 2/3 the larger
one. I set the distance from the center of the moving circle to the
tracing point to be a proportion, s, of the radius of the final figure,
R. Finally I solved for the radius of the fixed circle in terms of R
and s and substituted. When I plotted the result I found that it was
sideways, so I swapped x and y. I tried s=1/2 and that didn't work
(everything crossed at the center point) so I tried s=1/3 and that
looked pretty good. That's it.
Topher
|