- #1
RileyF1
- 6
- 0
Homework Statement
[/B]
I'm trying to write a program in MATLAB which demonstrates a tautochrone curve and how the starting point of a ball is irrelevant as to the time it takes to get to the lowest point in the curve (without friction).
At the moment I'm just trying to model it using a simple parabola of y = x2 rather than a cycloid. My idea is that I can plot the ball's position for a specific time, then plot it again 0.1 seconds later after pausing the program for 0.1 seconds which would effectively simulate the ball going down the curve in real time.
Homework Equations
E = K + U
The Attempt at a Solution
[/B]
I've used the conservation of energy and the fact that the potential energy at the top will be equal to the kinetic energy at the bottom though I wasn't sure if this would work since it is traveling on a pre-defined path rather than just falling naturally.
So mgh = (1/2)mv2
and solving for v = sqrt(2gh)
and h is the displacement in the y direction so h = ynaught - y
Given that v = dx/dt,
I separate the variables so sqrt(2g)*dt = 1/(sqrt(ynaught - x2)) *dx
(given that y = x2 )
integrating both sides and solving for x(t) I end up with:
x = sin(sqrt(2g)*t + sin-1 (xnaught/sqrt(ynaught))) *sqrt(ynaught)
for this specific equation the square root of ynaught should just be xnaught anyway
At first glance and plotting it in MATLAB it seems to work but I don't know if it is just a visual effect but my ball appears to slow down slightly as it reaches the lowermost point of the parabola. Not to mention that it goes ridiculously quickly when i set the gravity to 10m/s/s but that might be a fault of my programming.
Any ideas? Mainly I'm just looking for confirmation that the equation is correct. I tried doing it by using the normal force and the angle etc etc but it got too complicated. I've actually just plotted 2 balls on the parabola with different initial x and y coordinates and have noticed that no matter where they are placed, they always reach the bottom of the curve at the exact same time and just oscillate around it but always meet at the centre. It was my understanding that this was unique to a cycloid which is pretty much the point of me doing this so it seems odd to me that it would occur on this parabola.
Thanks for any assistance you can provide, just looking for some simple guidance