• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

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