There are several different approaches to this problem. It all depends what kind of spiral do you want. I decided to start with conical spiral and then build up from there.
Parametric equation of conical spiral is
where is the angular frequency and
is the radius.
Since the shape of the spiral doesn't matter we'll put
Thus, we get
See the first image.
The spiral starts at but then starts to spread out to infinity. We want to make it fall back to the axis at
To do that we will replace
in front of sine and cosine with sine function making the radius oscillate. Thus we get
is here to make sure that the period is
and 10 is here just to make the spiral prettier.
For this spiral see the second image.
Now comes the tricky part. we want to rotate the spiral so that it passes not through but through
It may be easier to think in terms of unit vectors. We want to rotate vector
so that we get vector
(unit vector in direction of
). So we basically need to rotate around vector
by angle
(angle between
and
). To do that we'll find the rotation matrix (see the link below).
The rotation matrix is
Now we just multiply that matrix with
vector from our previous spiral but with extended period by a factor of
because the distance between (0,0,0) and (100,100,100) si greater than distance between (0,0,0) and (100,0,0).
The final equation is
The spiral can be seen in the third image.
There is probably some easier way of constructing the required spiral, but i couldn't think of any.
No comments:
Post a Comment