Menu

Tree [c17b0c] main /
 History

HTTPS access


File Date Author Commit
 docs 2023-07-04 one_eyed_john one_eyed_john [8b786d] CMake for Windows
 include 2023-07-04 one_eyed_john one_eyed_john [c17b0c] Edit truncations (double -> float)
 screenshots 2023-06-26 one_eyed_john one_eyed_john [e5b1c1] New format of screenshots (chrono)
 shaders 2023-06-01 one_eyed_john one_eyed_john [fb3c9c] Rebuild
 src 2023-06-29 one_eyed_john one_eyed_john [969361] New parameter of command line: -save <filepath>
 .gitignore 2023-06-10 one_eyed_john one_eyed_john [ca96a5] README.md, decorating
 CMakeLists.txt 2023-07-04 one_eyed_john one_eyed_john [c7caa5] All
 README.md 2023-07-04 one_eyed_john one_eyed_john [c17b0c] Edit truncations (double -> float)
 main.cpp 2023-06-29 one_eyed_john one_eyed_john [969361] New parameter of command line: -save <filepath>
 test.txt 2023-06-25 one_eyed_john one_eyed_john [9b5da1] CMake. Screenshots

Read Me

LSystems and OpenGL

Coursework. Mentor: Polevoy D. V.

Rules definitions (according to Paul Bourke):

Character Meaning
F Move forward by line length drawing a line
f Move forward by line length without drawing a line
+ Turn left by turning angle
- Turn right by turning angle
[ Push current drawing state onto stack
] Pop current drawing state from the stack

Building

Dependencies:

1. GLFW

2. GLAD

3. GLM

4. Boost

5. Stb

cmake -S . build -DCMAKE_TOOLCHAIN_FILE=<path_to_pacman>
cmake --build build --config Release
sudo cmake --install ./build
cd build/

Using

./l_system_drawer -h

Available command line keys:

Key Meaning: format
-gen Set a number of generations: integer
-len Set a line length: double
-rot Set a rotation angle: double
-axm Set an axiom: string
-rule Set a new rule: string->string
-file Set LSystem from the file: filepath
-save Set file to save screens: filepath

Available keyboard keys:

Key Meaning
W Camera up
S Camera down
A Camera left
D Camera right
Q Camera zoom
E Camera move away
Z Take a screenshot

A composition of configuration .txt file (connected by command -file <absolute_path>):

<number of generations>
<length of line>
<rotation angle (degrees)>
<axiom>
<rule 1>
<rule 2>
...
<rule N>

Example 1. Command as follows...

./l_system_drawer -gen 7 -rot 22.5 -axm "F" -rule "F->FF-[XY]+[XY]" -rule "X->+FY" -rule "Y->-FX"

... will produce window with this plant:

plot

Example 2. Another one:

./l_system_drawer -gen 10 -rot 120 -axm "F+F+F" -rule "F->F-F+F"

plot

Example 3. You can specify the absolute path to the configuration file:

./l_system_drawer -file "<absolute path to file>"

plot

Documentation

Technical documentation is here, generated by Doxygen.

You can create documentation yourself, here is a list of possible commands (from install directory bin):

doxywizard Doxyfile
cd l_systems_docs/latex
pdflatex refman.tex

After these actions, you will have a file refman.pdf in this directory.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.