
LOGO-L> Two eccentric spheres in UCBLogo & MSWLogo
;Hello Every Body
;Here is the code to draw an isometric view of two eccentric spheres.
;The code runs as is on both UCBLogo & MSWLogo.
;Best Regards
;Mhelhefny
;------------------------------
to go
cs ht pu
sphere1 150 sphere2 150
end
to mysetxyz :a :b :c
;isometric
setxy (:a- :c)*cos 30 :b- (:a+ :c)*sin 30
end
to sphere1 :a
for [theta 0 180 9][for [fi 0 360 6][sppos :a* :theta/150 :fi :theta*2 pd]pu]
end
to sphere2 :a
for [fi 0 360 6][for [theta 0 180 9][sppos :a* :theta/150 :fi :theta*2 pd]pu]
end
to sppos :r :fi :theta
;sphirical co-ordinates
mysetxyz :r*(sin :theta)*cos :fi :r*cos :theta :r*(sin :theta)*sin :fi
end
;------------------------------------------
---------------------------------------------------------------