tdecagon.py - polygen - generative drawing of polygonal patterns
(HTM) git clone git://src.adamsgaard.dk/polygen
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
tdecagon.py (474B)
---
1 #!/usr/bin/env python
2 import polygen
3 import matplotlib.pyplot as plt
4
5 # Generate regular polygon with eight corners (decagon)
6 decagon = polygen.regular_star_polygon(10)
7
8 # Create the polygon plotting object
9 p = polygen.polyplot()
10
11 # Pass the decagon points to the plot object
12 p.set_points(decagon.points)
13
14 # Plot decagon. Use custom line color.
15 p.plot_all_to_all(line_width=2, line_color='#666666')
16
17 # Save figure as file
18 p.save_plot('decagon', transparent_background=True)