[ad_1]
Chapter: 3
Official book website:
Twitter:
This video walks through a simulation of a pendulum.
Read along:
Help us caption & translate this video!
[ad_1]
Chapter: 3
Official book website:
Twitter:
This video walks through a simulation of a pendulum.
Read along:
Help us caption & translate this video!
by
Tags:
You're right. You do need a script…
I found that the amplitude of the pendulum seems to increase after each cycle when the code is tested. And I found out that the problem is that the velocity should be calculated before angle is calculated. It should be
aVel+= aAcc;
angle+=aVel; (at 14:53)
instead of
angle+=aVel;
aVel+=aAcc;
I'm not sure, but I think the problem is that if it were the other way, at the extreme position, instead of adding velocity value 0 (velocity at extreme positions) to the angle, the previous value of velocity is added which leads to increase in amplitude.
And Thanks very much for the video….You are awesome….
I'm using Processing 3.3.4 in Python mode and I had to do a translate and place the origin in the center for this to work. 😐
hey that's pretty good.
It's good that there are altruists like you walking on earth.
How would you extend this to more 2 or more pendulums
daniel i love you
You and Bill Nye should work together in some way, shape or form. would be a dream come true.
Im 100% sure i will see all your videos asap.
What's up with the frame rate?
You meant Inception.^^
Hi, this is really nice tutorial !! However I think that something is missing in a formula. Fp = Fg * sin(teta) should be ||Fp|| = ||Fg|| * sin(teta). Am I wrong ? Have a nice day !
Hi nice video ! However something is confusing me : We have F = m*A and in this formula F is the resultant force (the combination of every forces at a certain time).
If Fp = Fg * sin(teta) then Fp = G * mass * sin(teta) then
mass * A = G * mass * sin(teta)
so A= G * sin(teta).
Does that means that Fp is the resultant force of the pendulum ?
Another thing, Fg is a force, so how can we replace it only with a constant in our case ? How is the "down" direction of the gravity determined here ? Thank you in advance 🙂
Hello Dan, I tried to simulate the array of pendulums you showed in the previous videos, but the pendulums never seem to sync after the first period. It seems like the approximation done by the computer is accumulating a huge error over time. I tried to use doubles, but the trigonometric functions and the PVector class seems to work only with float, do you have any idea how to fix this?
Hi Dan, firstly I've learnt so much from your great videos! Processing tells me "PVector" is an "unexpected identifier" for this code – do you know what could be wrong?
have you covered how to change datatypes ? im using a function void update(intx, inty); and im trying to use the variables for the pendulum but it is a float type and i dont know how to convert datatypes, and im using serial because arduino is expecting a int type to come via serial
Hey;
Dan,
First, I want to say that it is amazing work. You're teaching so much, You are very productive and I can not imagine how much it motivates you.
As a physicist, I wrote down a different algorithm to define a simple pendulum. a solution of the differential equation of motion for angular form the angle is changing in time with an expression for simple pendulum:
"angle= angle_max* sin((gravity/armLength)*frameCount)" it can be write as update function.
and I applied this motion expression in display function of the pendulum object. here
"location.set(armlength*sin(angle), armlength*cos(angle));
location.add (origin)"
And I found very simple code to define a pendulum. con you think about it?
dani i need help finding one of your videos and i just cant seem to come across it! in this video you came up with a formula that reverses the values i believe it was for when a formula define something going forward a opposite formula can let that something reverse back it was something like 10 * -10 i cant even conceive the actual formula but it was not the one i just gave example of because thats -100 and i think there was 3 problems equating to one answer where one was a negative number
Leave a Reply