|
General Details
|
|
Python
|
|
Posted 71 Days Ago
|
|
153 Views
|
|
Received 2 Ratings
|
|
Python Polygons ("PolyPy")
Description
A regular polygon class, which I wrote for a physics engine I'm working on.
Define a polygon like so:
p = polygon.Polygon((xpos, ypos), radius, faces, (r,g,b), pygame_surface)
A blue hexagon with a radius of 10 at (10, 10) on 'screen':
p = polygon.Polygon((10, 10), 10, 6, (0,0,255), screen)
Gather the points of, and draw the polygon like so:
p.gather()
p.draw()
Technical
Requires pygame: http://pygame.org
Source Code
|
Download Source Code
polypy.zip ( 0.00Mb )
|
NEVER open a .exe, .bat, .cmd, or other executable file since that is where viruses are likely to live. Please virus scan all files you download.
|
Comments
| Please login to post comments. |
More "Python" Source Codes By This Author
Recently Posted "Python" Source Codes
Recently Rated "Python" Source Codes
|