[MWForum]Elliptical orbits for planets
Dale Reed
mwforum@lists.mathcats.com
Tue, 4 Mar 2003 21:54:57 -0800
>From my Logo1.doc at http://groups.yahoo.com/group/LogoForum/files/ :
<snip>
"The Great Logo Adventure" by Jim Muller specifically for the free MSWLogo
but also useful for newbies learning other kinds of Logos. The book is out
of print but sometimes it can be found in used bookstores or online at:
http://www.softronix.com/logo.html
http://groups.yahoo.com/group/LogoForum/files/
at http://www.algo.be/logo1/liens.html#livres under the 'The Great Logo
Adventure' section.
TGLA is also at http://www.educa.fmf.uni-lj.si/logo/doc/discover.htm in PDF
format.
<snip>
Chapter 8, page 192
TO ELL :X :A :B :INC
IF (:X * :X) > (:A * :A) [STOP]
IF :X = :A [MAKE "INC -1]
SETPOS LIST :X :INC * :B * SQRT (1 - (:X * :X) / (:A * :A))
ELL :X + :INC :A :B :INC
END
TO ELLIPSE1 :A :B
ELL -:A :A :B 1
END
TO INFO
; CHAPTER 8 TURTLE POSITIONS AND COORDINATES
; ELLIPSES
; THIS PROCEDURES DRAWS AN ELLIPSE AROUND THE TURTLE'S
; POSITION (FROM THE CENTER).
;;
PR [SEE THE INFO PROCEDURE FOR MORE INFORMATION.]
END
============
TO ELLIPSE2 :S :E
MAKE "N 0
REPEAT 120 [RIGHT :N FD :S LT :N LT :N FD :S * :E RT :N MAKE "N :N + 3]
END
TO INFO
; CHAPTER 8 TURTLE POSITIONS AND COORDINATES
; ELLIPSES
; ELLIPSE2 STARTS AT THE EDGE OF THE ELLIPSE AND
; DRAWS THE FIGURE BASED ON YOUR INPUTS. USE SMALL
; NUMBERS; FOR EXAMPLE, ELLIPSE2 2 3.
;;
PR [SEE THE INFO PROCEDURE FOR MORE INFORMATION.]
END
---
$ dale-reed@att.net Seattle, Washington USA $