This project is a simple game that allows users to generate random 3D graphs and attempt to match them by manipulating a second graph. It is implemented using Python with PyQt5 for the GUI and OpenGL for rendering the 3D graphics. The main goal of this project is to help other students who have hard time with 3D graphs.
- Generate random 3D graphs with angles.
# angles in easy version [-360, -180, -90, 0, 90, 180, 360] def generate_random_angles(self): self.x_angle = random.choice([-360, -180, -90, 0, 90, 180, 360]) self.y_angle = random.choice([-360, -180, -90, 0, 90, 180, 360]) self.z_angle = random.choice([-360, -180, -90, 0, 90, 180, 360]) self.update() # angles in hard version [-360, -180, -90, -60, -45, -30, 0, 30, 45, 60, 90, 180, 360] def generate_random_angles(self): self.x_angle = random.choice([-360, -180, -90, -60, -45, -30, 0, 30, 45, 60, 90, 180, 360]) self.y_angle = random.choice([-360, -180, -90, -60, -45, -30, 0, 30, 45, 60, 90, 180, 360]) self.z_angle = random.choice([-360, -180, -90, -60, -45, -30, 0, 30, 45, 60, 90, 180, 360]) self.update()
- Manipulate a second graph to match the generated random graph.
- Graphical representation of 3D axes (X, Y, Z).
- Check if the two graphs match.
- Python 3.x
- PyQt5
- PyOpenGL
- Clone the repository:
git clone https://github.com/darkogligorijevic/graph-matching-game.git
- Install the required dependencies:
pip install PyQt5 PyOpenGL
- Run the scripts (easy.py and hard.py):
py easy.py py hard.py
- Use the "Generate Random Graph" button to generate a random 3D graph.
- Manipulate the second graph to match the generated graph.
- Have fun while learning!
- Download: Clone the repository or download the
.zip
file. - Extract Files: If you downloaded the
.zip
file, extract its contents to a location of your choice. - Run the Executable:
- Double-click on the
easy.exe
orhard.exe
file.
- Double-click on the
Contributions are welcome! Feel free to open issues or pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.