stairs Art/Electric
IF-SYSTEMS
programs 1
 
polygons
carpets
koch curve
heighway dragon
gray code dragon
circular fractal
circular sierpinski
 
e-mail
GRAY CODE (CORNER) DRAGON IFS
gray code Dragon
mouseover for sierpinski gasket IFS

PROGRAM GRAY_CODE_DRAGON   !Corner dragon © W.van Duyn May 2004
RANDOMIZE
SET MODE "color"
SET WINDOW 0,1199,0,903
SET COLOR "black"
BOX AREA 0,1199,0,903
FLOOD 1,1
LET x=0
LET y=0
LET size=1024
FOR i= 1 TO 1000000
LET a =INT(RND*3)+1
IF a =1 THEN
LET x1=x/2
LET y1=y/2
END IF
IF a=2 THEN
LET x1=-x/2+1/2   ! change -x/2 to x/2 for sierpinski gasket
LET y1=y/2
END IF
IF a=3 THEN
LET x1=x/2
LET y1=-y/2+1/2   ! change -y/2 to y/2 for sierpinski gasket
END IF
LET x=x1
LET y=y1
IF x<0.25 and y<0.25 Then SET color 10
IF x=>0.25 and y=>0.25 Then SET color 14
IF x<0.25 and y=>0.25 Then SET color 12
IF x=>0.25 and y<0.25 Then SET color 9
PLOT 200+size*x,200+size*y
NEXT i
END


Website, Text and Some Images Copyright © 2002 tzingaro.com, all rights reserved.