Spiral Equation

Status
Not open for further replies.
please make an archimedean spiral ^^

like this one
300px-Archimedean_spiral.svg.png
 
Each interval, increase offset, increase angle.
That's all there is to it, really.

By increasing offset, you will have a circular shape that gets bigger each interval (your unit will move away from the central object (Caster) per interval, forming spiral movement)

By increasing angle, your unit will have constant motion around central object (Caster).
 
Defskull is correct. Just use a polar offset, increasing the angle around the caster unit, and the offset from the caster unit, at each interval.

Archimedeans spiral uses the equation:

r = a + b * (degrees)

with the next point being (r, degrees).

a is the initial distance of the object at the initial angle. B is simply a value that effects the offset.

So, with that, repeated iterations of:

  • Set RValue = (60.00 + (0.25 x Degrees))
  • Unit - Move dummy_unit instantly to ((Position of Caster <gen>) offset by RValue towards Degrees degrees) facing (Position of Caster <gen>)
  • Set Degrees = (Degrees + 30.00)
Makes a Spiral trajectory! Keep in mind that the 60, the .25, and the +30 to the degrees are all values that I made up to effect the shape of the spiral. You'll have to edit them to fit your needs.

Cheers,
~Asomath
 
Status
Not open for further replies.
Back
Top