10
Jan
06

Spherical Pendulum

The balls in this frictionless bowl move like spherical pendulums. See also my magnetic pendulum fractals.

(* runtime: 0.03 second *)
Clear[theta, phi]; g = 9.81;
soln = NDSolve[{theta''[t] == (phi'[t]^2Cos[theta[t]] - g)Sin[theta[t]], phi''[t]Tan[theta[t]] == -2phi'[t]theta'[t], theta[0] == Pi/2, phi[0] == 0, theta'[0] == 0, phi'[0] == 2.357}, {theta[t], phi[t]}, {t, 0, 8}][[1]];
theta[t_] = theta[t] /. soln; phi[t_] = phi[t] /. soln;
ParametricPlot3D[{Sin[theta[t]]Cos[phi[t]], Sin[theta[t]]Sin[phi[t]], -Cos[theta[t]]}, {t, 0, 8}]

Here’s some Mathematica code to animate it:
(* runtime: 0.6 second *)
<< Graphics`Shapes`;
Do[p = {Sin[theta[t]]Cos[phi[t]], Sin[theta[t]]Sin[phi[t]], -Cos[theta[t]]}; Show[Graphics3D[{EdgeForm[], Line[{{0, 0, 0}, p}], TranslateShape[Sphere[0.2, 10, 6], p]}, PlotRange -> 1.2{{-1, 1}, {-1, 1}, {-1, 1}}]], {t, 0, 8, 0.1}];

Advertisements

0 Responses to “Spherical 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

  • 548,959 hits

%d bloggers like this: