!Wavy Koch Curve

 

CLEAR

SET MODE "graphics"

SET WINDOW-0.05,1.05,-0.5/1.33,0.5/1.33

 

PICTURE line1

PLOT 0,0;1,0

END PICTURE

 

DRAW line1

PAUSE 1

CLEAR

 

PICTURE line2

DRAW line1 with scale (1/4,1/4)*shift(0,0)

DRAW line1 with scale (1/4,1/4)*rotate(pi/2)*shift(.25,0)

DRAW line1 with scale (1/4,1/4)*shift(.25,.25)

DRAW line1 with scale (1/4,1/4)*rotate(-pi/2)*shift(.5,.25)

DRAW line1 with scale (1/4,1/4)*rotate(-pi/2)*shift(.5,0)

DRAW line1 with scale (1/4,1/4)*shift(.5,-.25)

DRAW line1 with scale (1/4, 1/4)*rotate(pi/2)*shift(.75,-.25)

DRAW line1 with scale (1/4,1/4)*shift (3/4,0)

END PICTURE

 

DRAW line2

PAUSE 1

CLEAR

 

PICTURE line3

DRAW line2 with scale (1/4,1/4)*shift(0,0)

DRAW line2 with scale (1/4,1/4)*rotate(pi/2)*shift(.25,0)

DRAW line2 with scale (1/4,1/4)*shift(.25,.25)

DRAW line2 with scale (1/4,1/4)*rotate(-pi/2)*shift(.5,.25)

DRAW line2 with scale (1/4,1/4)*rotate(-pi/2)*shift(.5,0)

DRAW line2 with scale (1/4,1/4)*shift(.5,-.25)

DRAW line2 with scale (1/4, 1/4)*rotate(pi/2)*shift(.75,-.25)

DRAW line2 with scale (1/4,1/4)*shift (3/4,0)

END PICTURE

 

DRAW line3

PAUSE 1

CLEAR

 

PICTURE line4

DRAW line3 with scale (1/4,1/4)*shift(0,0)

DRAW line3 with scale (1/4,1/4)*rotate(pi/2)*shift(.25,0)

DRAW line3 with scale (1/4,1/4)*shift(.25,.25)

DRAW line3 with scale (1/4,1/4)*rotate(-pi/2)*shift(.5,.25)

DRAW line3 with scale (1/4,1/4)*rotate(-pi/2)*shift(.5,0)

DRAW line3 with scale (1/4,1/4)*shift(.5,-.25)

DRAW line3 with scale (1/4, 1/4)*rotate(pi/2)*shift(.75,-.25)

DRAW line3 with scale (1/4,1/4)*shift (3/4,0)

END PICTURE

 

DRAW line4

PAUSE 1

CLEAR

 

PICTURE line5

DRAW line4 with scale (1/4,1/4)*shift(0,0)

DRAW line4 with scale (1/4,1/4)*rotate(pi/2)*shift(.25,0)

DRAW line4 with scale (1/4,1/4)*shift(.25,.25)

DRAW line4 with scale (1/4,1/4)*rotate(-pi/2)*shift(.5,.25)

DRAW line4 with scale (1/4,1/4)*rotate(-pi/2)*shift(.5,0)

DRAW line4 with scale (1/4,1/4)*shift(.5,-.25)

DRAW line4 with scale (1/4, 1/4)*rotate(pi/2)*shift(.75,-.25)

DRAW line4 with scale (1/4,1/4)*shift (3/4,0)

END PICTURE

 

DRAW line5

 

END



OUTPUT WINDOW