LOGO-L> space fractals 
Author Message
 LOGO-L> space fractals

;hello Everybody
;here is the code to draw a space fractal whose code I have previously
;posted,hoping you will like it.
;Best regards
;Mhelhefny
;-------

to go
   cs ht setsc 0
   perspective
   ask -1[setxyz 800 850 900]
   setpc [0 0 128]
   star 250 6 4
   shade 280 150 20
   pu setxyz -300 0 200 star 250 5 4
   polyview
   pu setxyz 0 -300 0 star 250 4 4
   polyview

end

to rect :l :a
polystart
;setpc :lev
pd
repeat 2 [fd :l down 90 fd :a down 90]
polyend
end

to shade :f :g :h
ask -3[setxyz :f :g :h]
polyview
End

to star :L :n :lev
if :lev =0 [stop]
repeat :n [rect :l/4 80* (5- :lev) fd :L/4 star :L/3 :n :lev- 1
rect :l/2 80*(5- :lev) fd :L/2 rt 360/:n]
end
;---------------
---------------------------------------------------------------





Sun, 25 Mar 2001 03:00:00 GMT  
 LOGO-L> space fractals
You certainly know how to liven up my day, thanks.
Also check out the example \MSWLogo\Examples\3d\Hilbert.LGO which is a "3D Space filling" curve.

Try this after you run GO:

repeat 72 [ask -1 [fd 100 down 5] polyview]

Quote:

> ;hello Everybody
> ;here is the code to draw a space fractal whose code I have previously
> ;posted,hoping you will like it.
> ;Best regards
> ;Mhelhefny
> ;-------

> to go
>    cs ht setsc 0
>    perspective
>    ask -1[setxyz 800 850 900]
>    setpc [0 0 128]
>    star 250 6 4
>    shade 280 150 20
>    pu setxyz -300 0 200 star 250 5 4
>    polyview
>    pu setxyz 0 -300 0 star 250 4 4
>    polyview

> end

> to rect :l :a
> polystart
> ;setpc :lev
> pd
> repeat 2 [fd :l down 90 fd :a down 90]
> polyend
> end

> to shade :f :g :h
> ask -3[setxyz :f :g :h]
> polyview
> End

> to star :L :n :lev
> if :lev =0 [stop]
> repeat :n [rect :l/4 80* (5- :lev) fd :L/4 star :L/3 :n :lev- 1
> rect :l/2 80*(5- :lev) fd :L/2 rt 360/:n]
> end
> ;---------------
> ---------------------------------------------------------------




--
===============================================================
George Mills

http://www.softronix.com
The www page contains some very powerful educational software.
Our single most important investment is our kids.
---------------------------------------------------------------





Sun, 25 Mar 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. LOGO-L> Animating Logo Fractals

2. LOGO-L> Re:LOGO-L:re:fractals

3. LOGO-L> Fractals

4. LOGO-L> fractals

5. LOGO-L> poly-fractals

6. LOGO-L> Re: fractals

7. LOGO-L> fractals

8. LOGO-L> Fractals

9. LOGO-L> Fractals

10. LOGO-L> Fractals

11. LOGO-L> Re:fractals

12. LOGO-L> Re:fractals

 

 
Powered by phpBB® Forum Software