Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

Subject: Elliptical orbits for planets
From: mwforum@xxxxxxxxxxxxxxxxxx (Mike Sandy)
Date: Sat, 8 Mar 2003 17:53:10 -0000

Jeff wrote:
>Note towards always sets heading to an integer value, 
>which is a terribly rough approximation.  If you are 
>keeping a running total of deflections based on 
>values supplied by towards, very large errors 
>can accumulate.

In fact ,with the ellipse, I found this is not a problem.
The error occurs also with MW Pro so I've redefined
TOWARDS


to h.towards :t
 let[p pos
     p1 ask(list :t)(list "pos)
     x (first :p1) - first :p
     y (last :p1)- last :p]
 seth 90 - atan :x :y
end

to atan :x :y
 if and :x = 0 :y = 0[op 0]
 if :x = 0[if :y > 0[op 90]
           op 270]
 if :y = 0[if :x > 0[op 0]
           op 180]
 if :x > 0[op arctan :y / :x]
 op 180 + arctan :y/:x
end

Mike




  • Previous by thread: Elliptical orbits for planets
  • Next by thread: Elliptical orbits for planets

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.


    © copyright 2001 - 2008