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

LOGO-L> Re: deformed outer tyre in MSWLogo



See attached:

MHELHEFNY@FRCU.EUN.EG wrote:
> 
> ;Hello George Mills
> ;Here is the MSWLogo code for a deformed outer tyre
> ;Best regards
> ;Mhelhefny
> ;-------------------------------------------
> to c
> ifelse xcor>20 [setpc col 2][setpc col 1]
> end
> 
> TO COL :N
> ;library procedure for colours
> 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 cylpos :r :fi :y
> ;library procedure for cylinderical co-ordinates
> setxyz :r*cos :fi :y :r*sin :fi
> end
> 
> to go
> turnon3d cs ht pu
> v1 v2
> end
> 
> to r
> op 100*(1+ (1+sin :t)*(1+cos :fi))
> end
> 
> to turnon3d
> ; This is a library procedure for 3-d
> perspective
> setturtle -1
> setxyz 1000 1000 1000
> setturtle 0
> end
> 
> to v1
> for [t 0 180 10][for [fi 0 360 5][c cylpos r :fi :t pd]pu]
> end
> 
> to v2
> for [fi 0 360 5][for [t 0 180 10][c cylpos r :fi :t pd]pu]
> end
> ;--------------------------------------------

-- 
===============================================================
George Mills
email: 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