Constant Speed Motion on Elliptical Path

In summary, the conversation revolves around finding a method to approximate the arc length on an ellipse in order to achieve constant speed and complete one circuit in the same amount of time. Suggestions include scaling the derivative of the function and using numerical integration.
  • #1
Zoltan
6
0
Hi guys, i would need some help with movement on ellipse.

I am using basicequation for figuring out position on ellipse :

basically getting degree, converting that to radians and using radians to figure out posX and Y. Basic stuff.

degree += speed * Time;
radian = (degree/180.0f) * Mathf.PI;

posX = Mathf.Cos(radian) * circleRadiusX;
posY = Mathf.Sin(radian) * circleRadiusY;

But this results in non linear motion speed. I.e. it gets slower around the larger radius, but i would need the speed to be equal all the time ( means point on ellipse finish the 360 degrees in same amount of time as before but with equal speed ( step size ) all the way ).

Any help greatly appreciated.
Thank you
Zoltan
 
Last edited:
Mathematics news on Phys.org
  • #2
You need some method to approximate the arc length.

I think this method would give reasonable results, and it is easy to implement:
do the same calculation as you do now, compared the distance between the old and the new point. Modify the increment for "degree" by its inverse value. (+some prefactor). This way, the speed is approximately constant, where the approximation is better for smaller step sizes.
 
  • #3
Thanks for suggestion, tho i am not exactly sure how i would do that :) I don't how i would find distance between the two points, i think that finding direct distance wouldn't work, it would have to be distance on the elipse, which i am not sure how to do. I might would be able to figure that out for circle, but for ellipse i doubt it :(

But otherwise i think the solution could work as i would basically even the step size this way, but isn't there any clean way how to do it ? Because this would speed up basically the movement speed in overall, while i would rather need to have the point finish the ellipse in same time as before ( should have mention that before ). So it would mean it gets slower around Sin 0 and faster around Sin -1,1 ( for y radius larger than x radius ).
 
  • #4
i think that finding direct distance wouldn't work, it would have to be distance on the elipse
That's the point of small angles - for small angles, the line between the two points is not so different from a straight line.
I am not aware of an analytic way to do this, you will always need some approximation I think.

Because this would speed up basically the movement speed in overall
You can scale it with an appropriate (constant) factor to get the same time.
 
  • #5
The general method for constant speed c using cartesian coordinates:

y = f(x)
dy/dx = f'(x)
dy = f'(x)dx

using arc length formula:

c = ds/dt = sqrt(1 + (f'(x))^2) dx / dt

dx/dt = c / sqrt(1 + (f'(x))^2)

dy/dt = f'(x) dx/dt = c f'(x) / sqrt(1 + (f'(x))^2)

If the last two equations can't be integrated directly, then use numerical integration. Note that dx/dt could be ± c / ... and dy/dt could be ± c f'(x) / ... depending on the curve and the current position (x,y).

The same method can be used for polar coordinates:

r = f(θ)
dr/dθ = f'(θ)
dr = f'(θ)dθ

c = ds/dt = sqrt(r^2 + (f'(θ))^2) dθ/dt

dθ/dt = c / sqrt(r^2 + (f'(θ))^2)

dr/dt = c f'(θ) dθ/dt = c f'(θ) / sqrt(r^2 + (f'(θ))^2)
 
Last edited:
  • #6
rcgldr said:
The general method for constant speed c using cartesian coordinates:

y = f(x)
dy/dx = f'(x)
dy = f'(x)dx

using arc length formula:

c = ds/dt = sqrt(1 + (f'(x))^2) dx / dt

dx/dt = c / sqrt(1 + (f'(x))^2)

dy/dt = f'(x) dx/dt = c f'(x) / sqrt(1 + (f'(x))^2)

If the last two equations can't be integrated directly, then use numerical integration. Note that dx/dt could be ± c / ... and dy/dt could be ± c f'(x) / ... depending on the curve and the current position (x,y).

The same method can be used for polar coordinates:

r = f(θ)
dr/dθ = f'(θ)
dr = f'(θ)dθ

c = ds/dt = sqrt(r^2 + (f'(θ))^2) dθ/dt

dθ/dt = c / sqrt(r^2 + (f'(θ))^2)

dr/dt = c f'(θ) dθ/dt = c f'(θ) / sqrt(r^2 + (f'(θ))^2)


thank you for your reply. But i am a bit lost in the stuff you posted :) Is this supposed to provide new positions for the point on ellipse or is it just evening out the increments, to make the speed constant (i.e. adjusting the position of existing point ) ?

If you would write down a bit more explanation on the cartesian coordinates solution i would be eternally grateful :)

Thanks again
 
  • #7
@zoltan: Suppose you have an ellipse and a circle on the same graph, both centered at the origin. Say your moving points start at the positive x intercept of each. Do you want each point to move at its own constant velocity and complete one circuit at the same time? Or is it only important that they end at the same time, with the speed around the ellipse variable?
 
  • #8
LCKurtz said:
@zoltan: Suppose you have an ellipse and a circle on the same graph, both centered at the origin. Say your moving points start at the positive x intercept of each. Do you want each point to move at its own constant velocity and complete one circuit at the same time? Or is it only important that they end at the same time, with the speed around the ellipse variable?

I need them to move at its own constant velocity AND complete circuit at the same time :) I understand that if you would take speed same as on circle, you would get the point on ellipse finish faster, if it was constant speed, thus i would need the speed on ellipse also get slower while constant. But i really don't know how to go around it. So the problem isn't only to even out the speed, but also make it finish at the same time as before. I understand its quite a problem :)
 
  • #9
Base it on the derivative of the function (how x and y change with respect to t) and scale it based on these.
 
  • #10
Zoltan said:
I need them to move at its own constant velocity AND complete circuit at the same time :) I understand that if you would take speed same as on circle, you would get the point on ellipse finish faster, if it was constant speed, thus i would need the speed on ellipse also get slower while constant. But i really don't know how to go around it. So the problem isn't only to even out the speed, but also make it finish at the same time as before. I understand its quite a problem :)
Calculate the total arc length of the ellipse first, and scale the motion based on that value.
 
  • #11
mfb said:
Calculate the total arc length of the ellipse first, and scale the motion based on that value.

how i would do that ? :)
 
  • #12
With one of the formulas posted here, or one of the formulas in the linked websites.
 
  • #13
rcgldr said:
The general method for constant speed c using cartesian coordinates: ...

Zoltan said:
Is this supposed to provide new positions for the point on ellipse or is it just evening out the increments.
If the resuting equation for dx/dt can be integrated, and that equation inverted to produce a function of x based on time: x = X(t), then it gives you a direction solution to your problem If y is a function of x, then y = Y(x) = Y(X(t)). If this is not possible, you have to use numerical integration to calculate x and y based on increments of time (Δt).

I hope I get the math correct here, again using c for the constant speed:

x^2 / a^2 + y^2 / b^2 = 1
y^2 / b^2 = 1 - x^2 / a^2
y^2 = (b/a)^2 (1 - x^2)
y = ± (b/a) sqrt(1 - x^2)
dy/dx = - ± (b/a) x / sqrt(1 - x^2)

dx/dt = ± c / sqrt(1 + (dy/dx)^2)
dx/dt = ± c / sqrt(1 + (b/a)^2 x^2 / (1 - x^2))

See if you can complete the math from this point.
 
Last edited:

FAQ: Constant Speed Motion on Elliptical Path

What is smooth eliptical movement?

Smooth eliptical movement is a type of movement that is characterized by a continuous, fluid motion in an elliptical path. It is often used in various fields such as engineering, robotics, and animation.

What are the benefits of smooth eliptical movement?

Smooth eliptical movement has several benefits, including improved efficiency, reduced wear and tear on equipment, and increased accuracy. It also allows for a more natural and visually appealing movement compared to other types of motion.

How is smooth eliptical movement achieved?

Smooth eliptical movement can be achieved through the use of specialized machinery or software that is designed to create this type of motion. It involves precise calculations and adjustments to ensure the movement is smooth and consistent.

What are some examples of smooth eliptical movement?

Some common examples of smooth eliptical movement include the motion of a piston in an engine, the movement of a robotic arm, and the animation of characters in video games or films. It is also often used in the design of exercise equipment, such as elliptical machines.

Are there any limitations to smooth eliptical movement?

While smooth eliptical movement has many benefits, it also has some limitations. It may not be suitable for all types of movements, and it can be more complex and expensive to implement compared to other types of motion. Additionally, it may require regular maintenance and adjustments to maintain its smoothness.

Similar threads

Replies
8
Views
2K
Replies
9
Views
2K
Replies
1
Views
2K
Replies
2
Views
1K
Replies
5
Views
3K
Replies
6
Views
953
Replies
18
Views
4K
Back
Top