Toolbox for pygame
Toolbox for pygame, contains functions and classes to manipulate figures, points, sounds, etc.
File | Description |
---|---|
centered_figure.py | Create figure with a (x,y) center. Detects collision, and plots into pygame surface. |
-
centered_figure
triangle = CenteredFigure([(0, 0), (0, 1), (0, 3)], [10, 10]) square = CenteredFigure([(0, 0), (0, 1), (1, 1), (1, 0)], [10, 10]) triangle.collide(square) # true triangle.rotate(15) # Rotate 15 grads Counterclockwise triangle.scale(10) # Multiply 10 to all vertices position
- Pygame
- Shapely
- Windows users:
Download Shapely whl and install it through pip.
- Linux users:
pip install shapely
- OSX users:
pip install shapely==1.6b2
- Windows users:
This project is licensed under GPLv3 [https://www.gnu.org/licenses/gpl-3.0.html]
Pablo Pizarro R. | 2017