>Date: Fri, 13 Feb 1998 21:40:57 +1100
>To:George Mills <mills@softronix.com>
>From:rimpey@netspace.net.au (Richard Impey)
>Subject:Re: LOGO-L> ellipse
>Cc:logo-l@gsn.org jeffr@mugc.cc.monash.edu.au
>
>Unfortunately I couldn't get either George's or Jeff's ellipses working
>with MicroWorlds v2 for the Mac.
>I tried different combinations of values for 'rad_x' and 'rad_y' but had
>the same error messages.
>
>George's.....
>
>In the command centre I entered.........
>
> ellipse1 40 40
>
>and the error message was.......
>
> I don't know how to repcount- in ellipse1
>
>Jeff's.......
>
>In the command centre I entered.........
>
> ellipse 20 40
>
>and the error message was.......
>
> size*:eccentricity has no value in ellipse
>
>
>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
>Georges procedure follows.....
>
>to ellipse :rad_x :rad_y
>>;
>>; There are several methods to describing an ellipse,
>>; this is just one of them and I prefer it because
>>; it's easy to conceptualize its size and calculate
>>; points that are exactly tangent.
>>;
>>; However, this is probably not the best method for
>>; describing elliptical trajectories.
>>;
>>make "orig_x first pos ; Save current turtle pos x
>>make "orig_y last pos ; Save current turtle pos y
>>pu ; Get to first point on ellipse
>> ; without drawing
>>repeat 361 ; Sweep through 0 - 360 ~
>> [
>> make "ang repcount-1 ; For clarity create an
>>intermediate
>> ; variable
>> make "x :orig_x-(sin :ang)*:rad_x ; Calculate New X coord
>> make "y :orig_y-(cos :ang)*:rad_y ; Calculate New Y coord
>> if :ang = 1 [pd] ; If we are already on the ellipse
>> ; then put the pen down
>> setxy :x :y ; Draw a line segment
>> ]
>>pu ; Pen up for the trip back to the
>> ; center of the ellipse
>>setxy :orig_x :orig_y ; Restore original pos
>>; I'll leave it as an excercise to allow the ellipse to be rotated
>>; according to the turtles heading as MSWLogo's ellipse does
>>end
>>
>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
>Jeff's procedure is as follows...
>
>to ellipse :size :eccentricity
>make "n 0
>repeat 360
>[rt :n fd :size lt :n lt :n fd :size*:eccentricity rt :n make "n :n+1]
>end
>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
>
>What am I doing wrong?
>
>Cheers Richard
=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v
Richard Impey
Assistant Principal (Acting)
Learning Technologies and Art Specialist
Phone 0011 61 3 9509 6872
Caulfield North Primary School
186 Balaclava Road
Caulfield North 3161
Melbourne, Victoria, Australia
=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v=v
=v
---------------------------------------------------------------
Please post messages to the Logo forum to logo-l@gsn.org. Mail
questions about the list administration to logofdn@gsn.org. To
unsubscribe send unsubscribe logo-l to majordomo@gsn.org.
Global SchoolNet Foundation -
Linking Kids Around the World!
Copyright GSN - All Rights Reserved
- Comments
& Questions
Visit GSN's
Global
Schoolhouse for more exciting learning resources!
Search our Site
-
Home