[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LOGO-L> windows functions in MSWLogo



;Hello Olga !
;Your Last demos were very clever.Let me express my congratulations
;Inspired by your "telescope;I would like to send you a similar demo
;the "ellipsoid ;hoping that you will enjoy it.
;Best Regards
;Mhelhefny
;-------------------------------------------------

to draw
cs pd
ellipsoid scrollbarget "hight scrollbarget "length scrollbarget "width
end

to ellipsoid :a :b :c 
pu grid1 :a* 60 :b* 60 :c* 60 pu grid2 :a* 60 :b* 60 :c* 60
pu setxyz 0 400 100 pd rt 90 label "ELLIPSOID
end

to go ;this is my main procedure
turnon3d ht windowcreate "main "panel [ellipsoid] 0 0 90 130 [setup]
end

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

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

to scale1
staticupdate "text1 se "length scrollbarget "length draw
end

to scale2
staticupdate "text2 se "hight scrollbarget "hight draw
end

to scale3
staticupdate "text3 se "width scrollbarget "width draw
end

to setup
staticcreate "panel "text1 [length] 15 10 70 10
staticcreate "panel "text2 [hight]  20 40 60 10
staticcreate "panel "text3 [width]  20 70 60 10
scrollbarcreate "panel "length 10 20 60 10 [scale1]
scrollbarcreate "panel "hight  10 50 60 10 [scale2]
scrollbarcreate "panel "width  10 80 60 10 [scale3]
scrollbarset "length 1 4 4
scrollbarset "hight  1 4 3
scrollbarset "width  1 4 3
buttoncreate "panel "stop [Exit] 20 100 40 15 [windowdelete "panel]
end

to turnon3d
perspective setturtle -1 setxyz 1000 1000 1000 setturtle 0 
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
;---------------------------------------------
---------------------------------------------------------------
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