From 2410cb823929472f5d3eba81cf36992e85a9e04e Mon Sep 17 00:00:00 2001 From: David Runge Date: Wed, 30 Dec 2015 19:58:08 +0100 Subject: AutoVisual/IGPPentagon.pde: Further finishing on the basic construction circles for a Pentagon setup. Separating display() and displayConstructionLines() functionality. --- AutoVisual/IGPPentagon.pde | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) (limited to 'AutoVisual') diff --git a/AutoVisual/IGPPentagon.pde b/AutoVisual/IGPPentagon.pde index 155027f..6dd4b1a 100644 --- a/AutoVisual/IGPPentagon.pde +++ b/AutoVisual/IGPPentagon.pde @@ -3,25 +3,40 @@ class IGPPentagon extends IGPFamily{ IGPPentagon(float x, float y, float d){ super(x, y, d); setVectorsOnAlphaCircle(); + setConstructionCircleCenters(); } - void setVectorsOnAlphaCircle(){ - constructionCircleCenters = new ArrayList (6); - constructionCircleCenters.add(getVectorOnAlphaCircle(0)); - constructionCircleCenters.add(getVectorOnAlphaCircle(30)); - constructionCircleCenters.add(getVectorOnAlphaCircle(60)); - constructionCircleCenters.add(getVectorOnAlphaCircle(90)); - constructionCircleCenters.add(getVectorOnAlphaCircle(120)); - constructionCircleCenters.add(getVectorOnAlphaCircle(150)); - constructionCircleCenters.add(getVectorOnAlphaCircle(180)); - constructionCircleCenters.add(getVectorOnAlphaCircle(210)); - constructionCircleCenters.add(getVectorOnAlphaCircle(240)); - constructionCircleCenters.add(getVectorOnAlphaCircle(270)); - constructionCircleCenters.add(getVectorOnAlphaCircle(300)); - constructionCircleCenters.add(getVectorOnAlphaCircle(330)); - } + void setConstructionCircleCenters(){ + constructionCircleCenters = new ArrayList (5); + constructionCircleCenters.add(getVectorOnAlphaCircle(342)); + constructionCircleCenters.add(getVectorOnAlphaCircle(54)); + constructionCircleCenters.add(getVectorOnAlphaCircle(126)); + constructionCircleCenters.add(getVectorOnAlphaCircle(198)); + constructionCircleCenters.add(getVectorOnAlphaCircle(270)); + } + + void createInnerPentagon(){ + stroke(0.0, 0.0, 0.66, 0.4); + beginShape(LINES); + vertex(constructionCircleCenters.get(0).x, constructionCircleCenters.get(0).y); + vertex(constructionCircleCenters.get(1).x, constructionCircleCenters.get(1).y); + vertex(constructionCircleCenters.get(1).x, constructionCircleCenters.get(1).y); + vertex(constructionCircleCenters.get(2).x, constructionCircleCenters.get(2).y); + vertex(constructionCircleCenters.get(2).x, constructionCircleCenters.get(2).y); + vertex(constructionCircleCenters.get(3).x, constructionCircleCenters.get(3).y); + vertex(constructionCircleCenters.get(3).x, constructionCircleCenters.get(3).y); + vertex(constructionCircleCenters.get(4).x, constructionCircleCenters.get(4).y); + vertex(constructionCircleCenters.get(4).x, constructionCircleCenters.get(4).y); + vertex(constructionCircleCenters.get(0).x, constructionCircleCenters.get(0).y); + endShape(); + } void display() { + super.display(); + createInnerPentagon(); + } + void displayConstructionLines(){ + super.displayConstructionLines(); createConstructionCircles(); } } -- cgit v1.2.3-70-g09d2