Community Tip - You can change your system assigned username to something more personal in your community settings. X
One of the really neat features of Mathcad, going all the way back to Mathcad PLUS 6.0, is its ability to draw and animate plane curves such as those that we encountered in our study of the calculus.
Kepler's Laws
The first Mathcad 11 worksheet attached below, Kepler's_Laws.pdf, models the orbital motion of a planet around the Sun. The worksheet's first X-Y plot, a simple, but naive parametrization of the polar equations of an elllipse, obeys Kepler's first law, but not the second law.
The second X-Y plot in the worksheet obeys all three of Kepler's laws, because it (a) uses time t as the independent variable, and (b) solves Kepler's Equation, M = E - e*sin E, at each point of the animation.
I have uploaded to PlanetPTC a Kepler's_Laws .avi video, based upon the worksheet's second X-Y plot, the one that obeys all three of Kepler's Laws.
Modeling Extrasolar Planets
Kepler's Laws work because the Sun is much more massive than any of its planets. The second Mathcad 11 worksheet attached below, Modeling_Extrasolar_Planets.pdf, extends the Kepler's Laws worksheet by modeling the relative masses of both the sun and the planet.
You can experiment with this worksheet by varying the masses of the primary (sun) and secondary (extrasolar planet). Be sure to try m1 = 1.0 and m2 = 0.5. This worksheet also contains an X-Y plot that can be animated.
And here, too, I have uploaded to PlanetPTC a Modeling_Extrasolar_Planets .avi video constructed from the worksheet.
Cycloid Sweeper
The third worksheet attached below, Cycloid_Sweeper.pdf, is a Mathcad 13 worksheet. I used Mathcad 13 here simply because it allows a larger title on the X-Y plot, and therefore in the animation window. This worksheet shows how to animate the generation of a cycloid.
So what is a cycloid? In case you forgot from your calculus course, it is the plane curve swept out by any point fixed on the rim of a rolling wheel (a wheel rolling in a vertical plane along a straight line, of course).
Note that the cycloid shown is actually an inverted cycloid, in that the generating circle of radius 1 unit rolls upside down on the x-axis (the line y = 0), with its center moving uniformly along the line y = -1. The red generator point fixed on the circumference of the rolling circle is the eponymous "cycloid sweeper."
Why did I invert the cycloid? Because the inverted cycloid is the famous "tautochrone" curve discovered by Christiaan Hyugens in 1658. It is also the very same "brachistochrone" curve that Johann Bernoulli proved, in 1696, to be the curve of fastest descent of a Newtonian particle falling from (0,0) to (pi,-2) under the influence of gravity. I specified the endpoints here just to provide a concrete example. The analytical solution to the brachistochrone problem has two constants of integration and admits an infinity of possible endpoint pairs.
I have uploaded to PlanetPTC a Cycloid_Sweeper .avi video constructed from the worksheet.
The FRAME Variable
Most Mathcad animations* use the FRAME variable to control the motion. The basic idea is that you parametrize the plane curve as a function of time and set the time variable to some function of FRAME. Then you tell Mathcad, in the Animation Record window, the lower and upper limits of FRAME.
*Another way to control the motion is to read, step, and write the independent variable via Ctrl-F9 clicks, i.e., repeated calculations of the entire worksheet. I hope to demonstrate this technique in a subsequent document post.
Posting Adobe .pdf vs. Mathcad .mcd or .xmcd Files
- I am posting the Mathcad worksheets as Adobe .pdf (Portable Document Format) files, so that you will be able to view them immediately, whether or not you are at a computer that has Mathcad 11-14 installed.
- I would have posted the .mcd and .xmcd files as well, but the PlanetPTC document posting tool will only let me provide three attachments.
- Finally, I would have posted the .avi files, too, because the PlanetPTC video player does not presently play the animations correctly. The problem is that the animations don't start and end where my original .avi files start and end.
With the .avi files on your own machine, you can "Loop" or "Repeat" (depending upon the player) to produce continuous animations.
If you want the any of the .mcd or .xmcd files, or the .avi files, let me know, and I'll find a way to post them.
Visit my Mathcad Server please: