You may also like

problem icon

Sierpinski Triangle

What is the total area of the triangles remaining in the nth stage of constructing a Sierpinski Triangle? Work out the dimension of this fractal.

problem icon

Squareflake

A finite area inside and infinite skin! You can paint the interior of this fractal with a small tin of paint but you could never get enough paint to paint the edge.

problem icon

How Many Elements Are There in the Cantor Set?

This article gives a proof of the uncountability of the Cantor set.

Von Koch Curve

Stage: 5 Challenge Level: Challenge Level:3 Challenge Level:3 Challenge Level:3

This is a Logo program to draw the Von Koch curve.

You can download a free copy of the MSW Logo software from http://www.softronix.com/logo.html

to allvonkoch
;draws 6 stages on same screen
cs pu fd 100 lt 90 fd 300 rt 90 pd
vonkoch2 200 0
pu rt 90 fd 250 lt 90 pd
vonkoch2 200 1
pu rt 90 fd 250 lt 90 pd
vonkoch2 200 2
pu bk 300 lt 90 fd 500 rt 90 pd
vonkoch2 200 3
pu rt 90 fd 250 lt 90 pd
vonkoch2 200 4
pu rt 90 fd 250 lt 90 pd
vonkoch2 200 5 end

to side :x :y
if :y=0 [fd :x stop]
side :x/3 :y-1
lt 60 side :x/3 :y-1
rt 120 side :x/3 :y-1
lt 60 side :x/3 :y-1
end

to vonkoch1
;superimpose 6 stages
cs pu bk 300 lt 90 fd 200 rt 90 pd
vonkoch2 500 0
vonkoch2 500 1
vonkoch2 500 2
vonkoch2 500 3
vonkoch2 500 4
vonkoch2 500 5
end

to vonkoch2 :x :y
;draws single curve size :x stage :y at current cursor position
repeat 3 [side :x :y rt 120]
end

to vonkoch3
;draws sixth stage
cs pu bk 300 lt 90 fd 200 rt 90 pd
vonkoch2 500 5
end