Finding the tangent of a spiral with points not strictly on the spiral

44 Views Asked by At

So I am by no means a mathematician or particularly mathematically inclined. I'm currently creating a basic script for a game that deforms a series of points laid out in a line to create a wave shape.

Image 1: Wave deformation

I'm doing this by having a point (see the handles in the picture) and pulling the individual vertices at an angle a few degrees off the normal of the line between the center point and the point I'm manipulating. Doing this 100 times or so for every point wraps them nicely around the center point and makes a nice wave. This is a super heavy function for the computer to handle.

So instead of running this through hundreds of loops I assume I can get the same result through a mathematical function.


Firstly, if I define a point along a spiral, how do I get the tangent of that point? I assume it's just a matter of differentiating?

Question 1 Diagram


Secondly, how can I find a point that is t units along that spiral from the point I've defined.

Question 2 Diagram


Finally how do I get the tangent of a point that isn't actually along the spiral? So basically an approximation of the direction that point would face if it were along the spiral. From that point I'd like to find the point t units along that "imaginary spiral" and get the tangent of that point.

Question 3 Diagram


Thanks very much in advance. Let me know if anything doesn't make sense and I'll try my best to clear things up.