Python's "only one way to do it" philosophy isn't good?

John Nagle nagle at animats.com
Sat Jun 9 13:58:57 EDT 2007


Bjoern Schliessmann wrote:
> Gabriel Genellina wrote:
> 
> 
>>For what I can
>>remember of my first love (Physics): if you have a small ball
>>moving inside a spherical cup, it would be almost crazy to use
>>cartesian orthogonal coordinates and Newton's laws to solve it -
>>the "obvious" way would be to use spherical coordinates and the
>>Lagrangian formulation (or at least I hope so

     Having actually solved that problem in simulation, I can report
that it's easier in Cartesian coordinates.  I used to use this as
a test of Falling Bodies, one of the first physics engines that
really worked on the hard cases.

     Spherical coordinates seem attractive until you have to deal
with friction between the ball and cup.  The ball is rotating, too,
and may be slipping with respect to the cup.  Then the simple
Physics 101 approach isn't so simple any more.

				John Nagle
				Animats



More information about the Python-list mailing list