X-Git-Url: https://git.ao2.it/experiments/RadialSymmetry.git/blobdiff_plain/16dd2ae0d430a47d3fef03b2b2d5401487385f4e..b1560e48352bc9862c8c250717532d6fc03db740:/RadialSymmetryDiagram.py?ds=inline diff --git a/RadialSymmetryDiagram.py b/RadialSymmetryDiagram.py index 333606a..ba0a716 100755 --- a/RadialSymmetryDiagram.py +++ b/RadialSymmetryDiagram.py @@ -66,7 +66,7 @@ class RadialSymmetryDiagram(Diagram.Diagram): base_polygon_orientation) if model.show_base_polygon: - self.draw_polygon(verts, [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,16 +95,12 @@ 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, 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) - apothem_angle = theta + pi / model.element_sides - - sverts = self.get_regular_polygon(x, y, model.element_sides, apothem, - apothem_angle) - self.draw_star(x, y, sverts, color) + self.draw_star(x, y, model.element_sides, model.element_radius, + theta, color) if __name__ == '__main__':