Centralia Junior High School
Centralia, Illinois
Math and Computers
(All rights reserved. Do not reproduce without permission.)

Snowflake Fractal created with LOGO

Using pcLogo, Harvard Associates, Inc.

 

To use with MSW Logo, remove the brackets [] in the third line.

SETXY 160 -90


TO FRAC :L
PU
SETXY [-160 -90]
SETHEADING 30
PD
TRI :L
END

TO TRI :L
REPEAT 3 [SIDE :L 340 RT 120]
END

TO SIDE :L :S
IF :L = 0 [FD :S STOP]
SIDE :L - 1 :S / 3 LT 60
SIDE :L - 1 :S / 3 RT 120
SIDE :L - 1 :S / 3 LT 60
SIDE :L - 1 :S / 3
END




This illustration was created with the Logo procedures listed here. The procedure was used several times (FRAC 0 FRAC 1 FRAC 2 ... FRAC 5) to create the pattern. It was then filled with color using the FILL primitive.


[ Return to Main Logo Page ] [ Return to CJHS Page ]