Interactive Koch Snowflake
Table of Contents
COSC326 - This article is part of a series.
Part 3: This Article
Description
This is a project for Etude 03 - Koch Snowflake Interactive at the University of Otago COSC 326. I have implemented an application that can draw a Koch snowflake with any given order.
You can scale the snowflake, drag it around, and change the order of the snowflake.
How to run
# clone project
git clone https://altitude.otago.ac.nz/rqian/cosc326-interactive-koch-snowflake.git
cd cosc326-koch-snowflake-interactive
Run after Installation
Run the program by installing the package and running the snowflake
command.
# install
pip install .
# you can also use 'pip install -e .' to install in development mode
Now you can run the program by typing snowflake
in the terminal.
snowflake
Get CommandNotFoundException? see Python Scripts path for help.
Feel free to uninstall the package after you are done.
pip uninstall ruiyi-koch-snowflake
Run without Installation
You can also run the program without installing the package.
# make sure you are in the project directory
python main.py # or python main.py --latest
python main.py --dev-0 # this will run the development version
python main.py --dev-1 # this will run the development version
How to use
Left click and drag to move the snowflake
Right click and drag to scale the snowflake
- drag right to scale up
- drag left to scale down
Use the + and - button to change the order of the snowflake
Use the Reset Button to reset the snowflake
Drag the slider to change the resolution of the snowflake
Use the Online Render checkbox to render the snowflake online
Reference
COSC326 - This article is part of a series.
Part 3: This Article