This project implements a Turtle Graphics simulation using the Qt framework. Turtle Graphics allows users to create visual patterns and designs by controlling a "turtle" that moves around the screen, leaving a trail as it goes. This application lets users command the turtle to move, turn, change color of the trail and play a little game.
- Interactive Controls: Move the turtle with basic commands like forward and turn.
- GUI Integration: Built with Qt's
QGraphicsView
orQGraphicsScene
for smooth, responsive graphics. - More coming soon in 2025
- Clone the repository.
- Install Qt (5.x or later).
- Build and run the project using Qt Creator or the command line.
- Forward: Move the turtle forward by a specified number of steps.
- Turn: Rotate the turtle a specified angle.
- Pen Up: Stop drawing the trail
- Pen Down: Continue drawing the trail
- Color(R,G,B) Change color of the trail
- ...
- Hugo Tamm
- Mathias Castrén
- Xiwei Zhao
- Giang Le
The file structure will be as follows:
📦 TurtleGraphics-1
├─ 📂 doc
├─ 📂 libs
├─ 📂 plan
├─ 📂 src
│ ├─ 📄 main.cpp
│ ├─ 📄 mainwindow.cpp
│ ├─ 📄 mainwindow.h
│ ├─ ...
│ └─ 📄 readme.md
├─ 📂 tests
├─ 📂 ui
│ ...
├─ 📄 CMakeLists.txt
├─ 📄 README.md
...
Follow these steps to compile the program from the Git repository.
Ensure Git is installed, then run the following commands:
git clone https://github.com/Huxyshuu/TurtleGraphics-1
cd TurtleGraphics-1
The program requires the Qt framework and CMake.
- Linux: Run the command:
sudo apt install qt6-default
- Windows/macOS: Download and install Qt Creator from the official Qt website.
- Linux: Run the command:
sudo apt install cmake
- macOS: Run the command:
brew install cmake
- Windows: Download and install CMake from cmake.org.
Navigate to the project directory and run the following commands:
-
Configure the build process based on the
CMakeLists.txt
file:cmake .
-
Compile the source files and generate an executable file:
make
After building, run the program using:
./turtle_1