Some time ago there was a discussion about methods
for constructing an ellipse. One such method found
in Turtle Geometry: Abelson & DiSessa involved combining
vectors from 2 circles of different radii.
I came back to this method recently and realised
that combining two vectors in this way was equivalent to
plotting the path of a point on the circumference of a rotating
circle(A) the centre of which also moves around a circle(B), the two
rotations being in opposite directions but equal rates.
I attach a demonstration (MSWLogo) which shows how the circles
determine the dimensions of the ellipse.
If the rates of rotation are not equal other curves are produced.
Of course the centre of curve (B) can itself move around another
circle and so on!
Mike
Good one Mike!
Could not find the explanation in my copy of "Turtle Geometry: Abelson &
DiSessa" of why an ellipse is drawn but there is further information at:
http://www.cut-the-knot.org/Curriculum/Geometry/DynoEllipse.shtml
with an interesting applet. Dale
In article <john.stclair-42FA...@news.verizon.net>,
Thanks Dale,
I like the applet.
There is no direct explanation in "Turtle Geometry"
A simpler(?) approach using turtle geometry:
to aa
cs ht pu
ellipse 200 100 60
end
to ellipse :a :b :offset_angle
; :a IS THE SEMI-MAJOR AXIS, :b THE SEMI-MINOR AXIS
setturtle 0 ht pu
setturtle 1 ht pu
local [r1 r2 incr_angle p]
make "r1 (:a+:b)/2
make "r2 (:a-:b)/2
make "incr_angle 5
(repeat 360/:incr_angle+1
[setturtle 0 pu home
;90 IS REQUIRED TO START THE
;ELLIPSE OFF ALONG THE X AXIS IN THE USUAL WAY
;SINCE THE TURTLE ANGLES ARE MEASURED
;FROM THE VERTICAL
seth 90-(:incr_angle*repcount+2*:offset_angle) fd :r1
;BOUNDARY OF INNER CIRCLE
seth 90+:incr_angle*repcount fd :r2
;BOUNDARY OF OUTER CIRCLE
make "p pos
setturtle 1 setpos :p pd
])
end
The ellipse can be rotated by any angle (:offset_angle) and
moved anywhere by replacing 'home' by setpos [x0 y0].
Mike
In article <john.stclair-87C1...@news.verizon.net>,
to ellipse :len1 :len2
foreach iseq 0 360 [
forward.net [
setheading ?
forward :len1
setheading -1 * ?
forward :len2
]
]
end
to forward.net :prog
localmake "startpos pos
penup
run :prog
localmake "endpos pos
setpos :startpos
pendown
setpos :endpos
end