On 9 Feb 2005 02:29:35 -0800, "FLChamp" <[EMAIL PROTECTED]> wrote:
>SOrry if this message is a little confused, it most probably reflects >the state of the author! One bit of confusion is in names. There was a name space clash early on. As things shook out "Visual Python" is ActiveState's Python developement environment for Visual Studio .Net http://www.activestate.com/Products/Visual_Python/ and the 3d programming environmnet to which you question refers became " VPython". Just a point of information. Certainly no great confusion in the context of your question, but there could be in other contexts. > >I have made a small program that plots the orbit of a planet in visual >python using visual.vector for all values. If i run the program it is >clear that the orbit is non-keplerian as the planets gradually moves >away from the sun. I am pretty sure the orbit should be keplerian so i >guess there must be some source of error in the program. > >I am using "from __future__ import division" and the initial conditions >I have are from NASA's horizons system, all values are accuracte to >more than 10 decimal places. > >I was wondering if there was a way to specify the type of number used >by visual.vector, for example, when using an array it is possible to >specify the type as float64. If visual.vector was using a smaller >amount of memory to store the number could this be the source of the >error I am finding? If not what else could be the culprit? My understanding: is that VPython "vectors" are in effect flat 3 element Numeric arrays, and Numeric ararys can be constructed with Float64 specified as the datatype. (wonder if that speciufication is a "declaration", and if so whether that would indicate some conflict between Python's ideology (Alex's version) and that of its defacto standard numerical processing library - but I digress) . Have you tried feeding the VPython the vectors, arrays declared as Float64 types. May, or may not, get you somewhere. Art -- http://mail.python.org/mailman/listinfo/python-list