Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I want to move a particle in a spiral at a constant speed. Note that that is not a constant angular speed. This is proving rather difficult, and I'll go through my method so far below.

The spiral in question is a classic Archimedean spiral with the polar equation r = ϑ, and the parametric equations x = t*cos(t), y = t*sin(t). This looks like this: enter image description here

I want to move a particle around the spiral, so naively, I can just give the particle position as the value of t, and the speed as the increase in t. That way the particle moves round the spiral at a constant angular speed. However, this means that the further out from the centre it gets, the faster its (non angular) speed becomes.

So, instead of having my speed in the increase in t, I want my speed as the increase in arc length. Getting the arc length of a spiral is the first challenge, but due to the fact that the Archimedean spiral I am using isn't too insane, the arc length function is , where a = 1. This allows me to convert theta values to the arc length, but that is the precise opposite of what I need. So I need to find the inverse of the arc length function, and at that hurdle, Wolfram-Alpha has failed me.

So is it possible to find the inverse of the arc length function? The function is a one to one mapping, if you exclude negative values of theta.

Thanks,

Laurie

share|improve this question
1  
I think you'll get an answer quicker on math overflow. It is relevant to GameDev though. –  Daniel Sep 2 '11 at 3:35
    
This would be easier if it wasn't parametric - does it have to be? –  CiscoIPPhone Sep 2 '11 at 7:31
    
Does the spiral have to be Archimedean? –  Nick Wiggill Sep 2 '11 at 7:41
    
@Cisco Well I gave the polar equation, and they are pretty much interchangable –  Blue Peppers Sep 2 '11 at 11:46
    
@Nick Yes :P Logarithmic and/or lituus is not what I want –  Blue Peppers Sep 2 '11 at 11:47
add comment

1 Answer

up vote 9 down vote accepted

Let's complicate your spiral:

be p(t) := ( cos(t) · f(t), sin(t) · f(t) )

in your case f(t) := t, in mine f(t) := 1 (so i pay back my complications with simplifications :)

If you want to go at a certain speed in this degenerate spiral (a circle) you have to know how long is your spiral in a round so you can say how much rounds per second do to be sure that your point travels with the desired speed.

Now we know that each complete round in a circle is 2·π·r long: 2·π·1 in our case; if ω is the revolution speed (in rounds per seconds) the speed V will be V = 2·π·1·ω or in a more general way:

V = 2·π·r·ω

if r is the general radius; this tell us that:

V/(2·π·r) = ω

if r is a function of t we can say:

ω(t) = V/(2·π·r(t))

in my "complicated" case this can be rewrite as follow:

ω(t) = V/(2·π·f(t))

in your "simplificated" case the answer is:

ω(t) = V/(2·π·t)

You know your desidered constant speed V, you know: 2, π and t is your variable: you know everything and you are ready to go!

circle approximation for the infinitesimal neighbourhood of the spiral in t

the circle approximation for the infinitesimal neighbourhood of the spiral in t

[DISCLAIMER]

This is not intended to be a rigorous mathematical treatment: it does not take into account the contribution of the differential of f nor say what types of function can not be used.

share|improve this answer
    
So using the last equation you solve for w(t) and then put that into the original parametric equation to get the position of the particle, is that correct? –  CiscoIPPhone Sep 2 '11 at 8:51
    
Oh this really is an excellent answer. And due to the use of f(t) instead of t, we can modify our spiral with this solution still working. Thank you very much. –  Blue Peppers Sep 2 '11 at 11:50
    
@CiscoIPPhone w(t) is the rotational speed, it tell you how much add to your t as the time pass, then use t to get position. –  FxIII Sep 3 '11 at 11:46
    
@Blue Peppers as I said in the disclaimer is not true for every f(t), it works if f(t) moves slowly (and is differentiable) –  FxIII Sep 3 '11 at 11:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.