LOGO-L> bug in the 3-d sombrero surface 
Author Message
 LOGO-L> bug in the 3-d sombrero surface

;Helo Everybody
;The code of the true "sombrero" surface which I sent yesterday had
;a bug which causes the grid to draw only in one direction. When you
;run the code with grid = .5 you will not notice it, but for higher
;values it will be noticed; so remove the words:  make "a   on the
;fourth line of the gridz procedure.
;Last week George Mills found a similar bug in the code of the park
;I agree with him that last minute corrections should be avoided.
;Here is corrected code; excuse me for this fault.
;Best Regards.
;Mhelhefni
;---------------------------------------------------------------
to go
turnon3d cs ;ht
make "step first questionbox [input step bet.(.5  - 2)][]
grid 14 :step
end

to grid :r :step
gridx :r :step gridz :r :step
end

to gridx :r :step
pu
for [x -:r :r :step][for [z -:r :r :step][make "xsq :x* :x make "zsq :z* :z
make "r sqrt(:xsq+ :zsq) +.001
make "f (sin :r*180/pi)/ :r
setxyz :x*15 :f*200 :z*15] pu setz -zcor pd]
pu
end

to gridz :r :step
pu
for [z -:r :r :step][for [x -:r :r :step][make "xsq :x* :x make "zsq :z* :z
make "r sqrt(:xsq+ :zsq) +.001
make "f (sin :r*180/pi)/ :r
setxyz :x*15 :f*200 :z*15] pu setx -xcor pd]
end

to turnon3d
; This is a library procedure for 3-d
perspective
setturtle -1
setxyz 800 1000 800
setturtle 0
end
;-----------------------------------------------------------------
---------------------------------------------------------------





Tue, 14 Mar 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. LOGO-L> Intersection of surfaces

2. LOGO-L> several surfaces on one screen

3. LOGO-L> rendered surfaces of rotation

4. LOGO-L> debugged 3-d coloured "sombrero" surface

5. LOGO-L> Simple Surfaces in 3D

6. LOGO-L> Revised "sombrero" surface

7. LOGO-L> 3-D regular multi surface

8. LOGO-L> 3d-surfaces-paraboloid

9. LOGO-L> Apple logo/MSW Logo

10. LOGO-L> Reseach Machines Logo (RM LOGO)

11. Bugs in ST80 4.1 (Stream>>through, List>>copyFrom:to:)

12. LOGO-L> [Fwd: MicroWorlds bug report]

 

 
Powered by phpBB® Forum Software