Skip to content

Commit

Permalink
Update config.txt comments
Browse files Browse the repository at this point in the history
 - Some of them were unclear or inaccurate.
  • Loading branch information
Nathan O authored and Nathan O committed Feb 17, 2022
1 parent 808fa75 commit 24515ca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ graphics to draw 3D fractals.

![Example screenshot](./sample_screenshot.png)

(It looks better in motion!)


Compiling
=========

Building this requires `gcc` to be installed and available on your path, and
for the GLFW to be installed.
for GLFW to be installed.

On Linux
--------
Expand Down Expand Up @@ -135,10 +137,10 @@ Available Actions

The following list of actions are supported:

- `move_forward <distance>`: Moves the turtle forward, drawing a line, the
given distance. The distance is a floating-point number of units. Units are
not particularly relevant, because the resulting 3D rendering will be scaled
to fit in the viewport regardless.
- `move_forward <distance>`: Moves the turtle forward the given distance, and
draws the line segment along its path. The distance is a floating-point
number of units. Units are not particularly relevant, because the resulting
3D rendering will be scaled to fit in the viewport regardless.

- `rotate <degrees>`: Rotates the turtle to its left by the given
floating-point number of degrees.
Expand Down
11 changes: 7 additions & 4 deletions config.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
init CP

# The () around the pyramids make it easier for me to keep track of the
# positions when moving between the 5 pyramids.
# I use the () to revert the position back to the "current" pyramid's bottom
# left, facing right, in preparation for drawing the next pyramid.

# Replace one square pyramid with 5 pyramids, always ending at the bottom left
# corner facing right.
P ((CPN1PN-N2PN-N3P)UND4P)

# N is used to move forward the width of a single pyramid. It doubles every
# iteration, since every existing pyramid's width doubles at the same rate.
N NN

actions
Expand Down Expand Up @@ -54,14 +57,14 @@ U
rotate 45
pitch 45

# Undo the "upwards rotation in preparation for drawing the upper pyramid.
# Undo the "U" rotation in preparation for drawing the upper pyramid.
D
pitch -45
rotate -45


# P = draw a single square pyramid. Starts at the bottom left corner facing
# right, and ending at the bottom right corner, facing right.
# right, and ends at the same place.
P

# Keep track of our start position, we'll return here at the end.
Expand Down

0 comments on commit 24515ca

Please sign in to comment.