• 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.

[JASS] 2 More math questions

Status
Not open for further replies.
Level 18
Joined
Oct 18, 2007
Messages
930
Ok i need 2 more values.

First Question
You are given 3 variables
  1. Real value ' D ' ( Distance )
  2. Real value ' T ' ( Time it takes )
  3. real value ' I ' ( Interval )

I need 2 values.
  1. ' SS ' ( Start Speed )
  2. ' SD ' ( Speed Decrease )
The ' SS ' is the starting speed and the ' SD ' is a value that is drawn from the starting speed every interval. Like some sort of knockback. It starts at ' SS ' and ends at 0. I want a decending speed so need 2 values.( The starting speed and the decreasing speed )
Second Question
You are given 3 variables
  1. Real value ' D ' ( Distance )
  2. Real value ' T ' ( Time it takes )
  3. real value ' I ' ( Interval )

I need 2 values.
  1. ' SI ' ( Speed )
  2. ' ES ' ( End Speed )

The first ' ES ' is the ending speed and the ' SI ' value is a value that is used to increase the speed every interval. Like some sort of reversed knockback. It starts at 0 and ends at the ' ES '. I want a increasing speed so need 2 values.( End speed and increasing speed )
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
1. There are infinite solutions, you must give either of those as a parameter.

To get the initial velocity:

v0 = (-0.5*a*t+ (x - x0)/t)*FPS

v0 being the initial velocity.
a being the acceleration.
t being the time.
x being the final position.
x0 being the initial position.
FPS being 1/interval.

Which is the physics quotation for position<->time given a constant acceleration.

v = v0 + at would give you the velocity at any time, but given that the time you want is 0, at = 0, and thus v = v0.

In case you care, the original quotation looks like this:
x = x0 + v0t + 1/2(at*at)

2. Again, there are infinite possibilities, and it makes no sense.
You must to give either of those as a parameter.

Given the acceleration, you would do it like this:
v = v0 + at = 0 + at = at
 
Level 18
Joined
Oct 18, 2007
Messages
930
1. There are infinite solutions, you must give either of those as a parameter.

To get the initial velocity:

v0 = (-0.5*a*t+ (x - x0)/t)*FPS

v0 being the initial velocity.
a being the acceleration.
t being the time.
x being the final position.
x0 being the initial position.
FPS being 1/interval.

Which is the physics quotation for position<->time given a constant acceleration.

v = v0 + at would give you the velocity at any time, but given that the time you want is 0, at = 0, and thus v = v0.

In case you care, the original quotation looks like this:
x = x0 + v0t + 1/2(at*at)

2. Again, there are infinite possibilities, and it makes no sense.
You must to give either of those as a parameter.

Given the acceleration, you would do it like this:
v = v0 + at = 0 + at = at

so for the second question, is SI(speed increasement) = v = v0 + at = 0 + at = at? What is the ES(Ending Speed, the loop will exit when a value that counts the speed is greater than the end speed)
 
Status
Not open for further replies.
Top