Diagram.py: add a draw_polygon() wrapper which also calculate vertices
[experiments/RadialSymmetry.git] / RadialSymmetryDiagram.py
index e21694b..09a3638 100755 (executable)
@@ -66,7 +66,7 @@ class RadialSymmetryDiagram(Diagram.Diagram):
                                          base_polygon_orientation)
 
         if model.show_base_polygon:
-            self.draw_polygon(verts, None, [0, 0, 0])
+            self.draw_polygon_by_verts(verts, None, [0, 0, 0])
 
         for i, v in enumerate(verts[:]):
             radial_orientation_angle = (i + 1) * central_angle
@@ -95,8 +95,8 @@ class RadialSymmetryDiagram(Diagram.Diagram):
 
     def draw_element(self, x, y, model, theta, color=[0, 0, 0]):
         if model.show_elements:
-            tverts = self.get_regular_polygon(x, y, model.element_sides, model.element_radius, theta)
-            self.draw_polygon(tverts, None, color)
+            self.draw_polygon(x, y, model.element_sides, model.element_radius,
+                              theta, None, color)
 
         if model.show_stars:
             apothem = model.element_radius * cos(pi / model.element_sides)