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

LOGO-L> Re: cacke pan



Also known as a Bundt cake pan.
See attached gif.

MHELHEFNY@FRCU.EUN.EG wrote:
> 
> ;Hello Turtlers
> ;Here is the code to draw a cacke pan in MSWLogo
> ;Best Regards.
> ;Mhelhefny
> ;-----------------------------------------------
> to c
> ifelse y>0 [setpc col 1][setpc col 2]
> end
> 
> TO COL :N
> ;this may be a library procedure
> OP ITEM :N [[255 0 0][0 255 0][0 0 255]
>             [255 255 0][0 0 0][130 130 130]
>             [30 200 200][255 0 255][200 200 100]
>             [120 20 120][200 100 50]]
> END
> 
> to go
> turnon3d grid 10
> end
> 
> to grid :step
> pu gridx :step pu gridz :step
> end
> 
> to gridx :step
> for [x 0 360 :step][for [z 0 360 :step][c setxyz x y z pd]pu]
> end
> 
> to gridz :step
> for [z 0 360 :step][for [x 0 360 :step][c setxyz x y z pd]pu]
> end
> 
> to turnon3d
> perspective
> setturtle -1 setxyz 1000 1000 1000
> setturtle 0 ht cs
> end
> ;---------------------------------------------------------
> to x
> op (:x* sin :z)
> end
> 
> to y
> op (:x* sin :x)
> end
> 
> to z
> op (:x*cos :z)
> end

-- 
===============================================================
George Mills (mills@softronix.com)
http://www.softronix.com/
The www page contains some very powerful educational software.
Our single most important investment is our kids.

GIF image



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