09
Jan
06

Double Pendulum

The Double Pendulum is a classical example of chaotic motion.
(* runtime: 0.1 second *)
Clear[theta1, theta2]; g = 9.81;
soln = NDSolve[{theta1''[t](3 - Cos[2(theta1[t] - theta2[t])]) == -3g Sin[theta1[t]] - g Sin[theta1[t] - 2theta2[t]] - 2Sin[theta1[t] - theta2[t]](theta2'[t]^2 - theta1'[t]^2Cos[theta1[t] - theta2[t]]), theta2''[t](3 - Cos[2(theta1[t] - theta2[t])]) == 2Sin[theta1[t] - theta2[t]](2theta1'[t]^2 + 2g Cos[theta1[t]] + theta2'[t]^2Cos[theta1[t] - theta2[t]]), theta1[0] == 0.999Pi, theta2[0] == 0.999Pi, theta1'[0] == 0, theta2'[0] == 0}, {theta1[t], theta2[t]}, {t,0, 10}][[1]];
theta1[t_] = theta1[t] /. soln; theta2[t_] = theta2[t] /. soln;
Do[p1 = -{Sin[theta1[t]], Cos[theta1[t]]}; p2 = p1 - {Sin[theta2[t]], Cos[theta2[t]]}; Show[Graphics[{Line[{{0, 0}, p1, p2}], Disk[p1, 0.1], Disk[p2, 0.1]}], Axes -> True, PlotRange -> 2{{-1, 1}, {-1, 1}}, AspectRatio -> Automatic], {t, 0,10, 0.1}];

Link: Double Pendulum – Java applet by Erik Neumann

Advertisements

0 Responses to “Double Pendulum”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Welcome !

You will find here some of my favorite hobbies and interests, especially science and art.

I hope you enjoy it!

Subscribe to the RSS feed to stay informed when I publish something new here.

I would love to hear from you! Please feel free to send me an email : bugman123-at-gmail-dot-com

Archives

Blog Stats

  • 544,795 hits

%d bloggers like this: