how can i make a simple pendulum

139 views
Skip to first unread message

Tayseer Hassan

unread,
Nov 8, 2016, 8:54:36 AM11/8/16
to VPython-users
i want to do simple pendulum and  I tried modifying the Double pendulum example in the 

Bruce Sherwood

unread,
Nov 8, 2016, 2:28:54 PM11/8/16
to VPython-users
It seems to work correctly. I'll comment that the original program used a Lagrangian method to make it possible to deal with the constraints (that the top of of the upper pendulum remains fixed, and that the connection of the two pendulums move together). The numerical integration of a simple pendulum can be done much more simply. 

Choose the (approximately massless) bar and the mass as the system. The forces acting on the system are the force of the support on the upper end of the bar, and the gravitational force of the Earth on the mass. .Calculate the torque on the system and the angular momentum of the system about the support point, in which case the torque exerted by the support is zero (zero lever arm). In the animation loop, increment the angular momentum by the angular impulse (torque times dt).
Message has been deleted
Message has been deleted

Tayseer Hassan

unread,
Mar 22, 2017, 11:36:13 AM3/22/17
to VPython-users
I like to develop this program but Whatis the problem in the new program ??
 Why don't execute like the old one ???

Bruce Sherwood

unread,
Mar 22, 2017, 2:14:29 PM3/22/17
to VPython-users
I thought perhaps the issue was that version 2.2 made an important change in how compound objects work, but running your program "trying" with version 2.1 didn't seem to make any difference. Since your two programs are very different from each other, I'm unable to offer useful advice. All I can say is that two very different programs are likely to behave in very different ways.

------------------------------------------
Here is a brief description of the change in compound (and extrusion) when changing from 2.1 to 2.2: Improved extrusion and compound objects. They now have pos at their centers and size that represents the bounding box. The extrusion path is now specified by "path", making it possible to specify "pos" as the location of the center of the extrusion's bounding box.
Reply all
Reply to author
Forward
0 new messages