RosettaCodeData/Task/Fractal-tree/Plain-English/fractal-tree.plain
2023-07-01 13:44:08 -04:00

19 lines
690 B
Text

To run:
Start up.
Clear the screen to the lightest blue color.
Pick a brownish color.
Put the screen's bottom minus 1/2 inch into the context's spot's y coord.
Draw a tree given 3 inches.
Refresh the screen.
Wait for the escape key.
Shut down.
To draw a tree given a size:
If the size is less than 1/32 inch, exit.
Put the size divided by 1/4 inch into the pen size.
If the size is less than 1/4 inch, pick a greenish color.
Remember where we are.
Stroke the size.
Turn left 1/16 of the way. Draw another tree given the size times 2/3. Turn right 1/16 of the way.
Turn right 1/16 of the way. Draw a third tree given the size times 2/3. Turn left 1/16 of the way.
Go back to where we were.