View Full Version : Should i use from the parametric equations?

Ehsan Kamrani

05-21-2005, 01:43 PM

I want to move two objects with these equations:

y = m*x

y = (m^2)*x

I want to move them with an equivalent speed. but my problem is that these equations are depend on the axes.And if i use them, i see different speeds.

Should i use from the parametric equations?Any suggestion?

-Ehsan-

dorbie

05-21-2005, 03:08 PM

Solve for the distance along the curve, you'll probably have to approximate it, but pythagoras theorem will help you get approximate distance from the last position, scale back give you a new x and iterate a bit.

Overmind

05-22-2005, 01:02 AM

This problem is relatively easy to solve exactly when using parametric equations:

x = t

y = m*t (or m^2 * t for the other object)

Both objects travel along a straight line, and the length of the line l(t) = t*sqrt(1+m^2) (for the first object, for the second l(t) = t*sqrt(1+m^4)...)

We want both objects to travel at the same speed when using the same value of t. Let's assume t is the time in seconds, and we want both objects to travel at v units per second. That means we want l(t) = v*t. So we just have to scale the formulas accordingly:

x = v * t / sqrt(1+m^2)

y = v * m * t / sqrt(1+m^2)

and for the second object:

x = v * t / sqrt(1+m^4)

y = v * m^2 * t / sqrt(1+m^4)

And now the length of the curve is for both objects l(t) = v*t, so both move the same distance in the same time...

EDIT:

Formulas corrected. Forgot a v :rolleyes:

Ehsan Kamrani

05-22-2005, 02:00 AM

Thank you Angus, thank you Overmind. :) now i should move the objects with the same velocity.

-Ehsan-

Ehsan Kamrani

05-22-2005, 02:37 AM

I'm a bit confused. :confused:

we say x = t. and l(t)=v*t. So x = l(t)/v = (t*sqrt( 1+m^2 ))/v --For the first object.

But as you have writte, x = t / sqrt(1+m^2).

-Ehsan-

Overmind

05-22-2005, 04:06 AM

Whoops, forgot a v in the formula...

x(t) = v * t / sqrt(1 + m^2)

y(t) = v * m * t / sqrt(1 + m^2)

From these formulas, it is obvious that y = m * x, and if you calculate the length with the pythagoras theorem, you get:

l(t) = sqrt(x^2 + y^2) =

sqrt(v^2 * t^2 / (1+m^2) + v^2 * m^2 * t^2 / (1+m^2)) =

sqrt(v^2 * t^2 / (1+m^2) * (1 + m^2)) =

sqrt(v^2 * t^2) = v * t

Remember that these are new x, y different than the ones we started with. We want formulas for x and y so that y = m * x AND the length is v * t.

The original x'(t), y'(t) have the length sqrt(1+m^2), so we have to use x(t / (1+m^2)), y(t / (1+m^2)) instead.

Ehsan Kamrani

05-22-2005, 07:02 AM

Well.I should say *thank you* :rolleyes: Another question is about moving in 3D spaces.Are there any good references about moving the models in 3D space?

-Ehsan-

Powered by vBulletin® Version 4.2.3 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.