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

LOGO-L> 3-d mesh code for hyperbolic paraboloid



;Dear Olga
;Execuse me for the delay; I recieved your messages thro the logo-l.
;You told me that the box was running well until the end then the
;screen was flouded by one colour. please try to change n in the
;program from 5 to 4 and run it; I hope this will end the problem.
;Here is the code of the hyperbolic paraboloid which according to 
;the same Russian mathematical hand book "Bronestien and Semendiev"
;is generated by moving a parabola parallel to itself while its
;top traverses a hyperbola. as I remember this surface is named the
;saddel surface.
;This very simple code uses the mesh procedure sent by me to George
;Mills; please run the code with a step of .5 to watch the surface
;during build up.
;With my best regards; "Do Svedania".
;Mhelhefny
;--------------------------------------------------------------
to go
turnon3d cs ht
make "step first questionbox [input step bet.(.5  - 2)][]
grid 14 10 :step
end

to grid :a :b :step
make "a1 :a* :a make "b1 :b* :b
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][make "xsq :x* :x make "zsq :z* :z
make "f (:xsq/ :a1)- (:zsq/ :b1)
setxyz :x*15 :f*150 :z*15 pd]pu]
end

to gridz :a :b :step
pu
for [z -:b :b :step][for [x -:a :a :step][make "xsq :x* :x make "zsq :z* :z
make "f (:xsq/ :a1)- (:zsq/ :b1)
setxyz :x*15 :f*150 :z*15 pd]pu]
end

to turnon3d
; This is a library procedure for 3-d
perspective
setturtle -1
setxyz 1000 1000 1000
setturtle 0 
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