LOGO-L> ellipsoid and paraboloid in UCBLogo
Author Message
LOGO-L> ellipsoid and paraboloid in UCBLogo

;Hello Every Body
;Here is the isometric view of the ellipsoid and the elliptic
;paraboloid in UCBLogo
;Best Regards
;Mhelhefny
;-----------------------------------------------------
to go ;ellipsoid
cs ht grid 160 100 60
end

to grid :a :b :c
pu grid1 :a :b :c
pu grid2 :a :b :c
end

to grid1 :a :b :c
for [u 0 360 12][for [v 0 180 10][setxyz x y z pd]pu]
end

to grid2 :a :b :c
for [v 0 180 10][for [u 0 360 12][setxyz x y z pd]pu]
end

to setxyz :a :b :c
;library procedure
setxy (:a- :c)*cos 30 :b- (:a+ :c)*sin 30
end

to x
op (:a*cos :u)*(sin :v)
end

to y
op (:b*sin :u)*(sin :v)
end

to z
op  :c* cos :v
end

;---------------------------------------------------

to go ;elliptic paraboloid
cs ht
grid 10 8 .5
end

to grid :a :b :step
gridx :a :b :step gridz :a :b :step
end

to gridx :a :b :step
pu for [x -:a :a :step][for [z -:b :b :step][
setxyz :x*10 -150+ y*120 :z*10 pd]pu]
end

to gridz :a :b :step
pu for [z -:b :b :step][for [x -:a :a :step][
setxyz :x*10 -150+ y*120 :z*10 pd]pu]
end

to ps
ts ct pots
end

to setxyz :a :b :c
setxy (:a- :c)*cos 30 :b- (:a+ :c)*sin 30
end

to y
op ((:x/ :a)*(:x/ :a) + (:z/ :b)*(:z/ :b))
end
;-----------------------------------------------------------
---------------------------------------------------------------

Wed, 26 Apr 2000 03:00:00 GMT

 Page 1 of 1 [ 1 post ]

Relevant Pages