From 7e8160b047d99ef69a919d737210a3920b88da4e Mon Sep 17 00:00:00 2001 From: David Runge Date: Wed, 30 Dec 2015 19:56:27 +0100 Subject: AutoVisual/IGPSquare.pde: Setting up constructionCircleCenters properly. Separating display() and displayConstructionLines() functionality. --- AutoVisual/IGPSquare.pde | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'AutoVisual') diff --git a/AutoVisual/IGPSquare.pde b/AutoVisual/IGPSquare.pde index 80e3700..88d6e14 100644 --- a/AutoVisual/IGPSquare.pde +++ b/AutoVisual/IGPSquare.pde @@ -3,19 +3,11 @@ class IGPSquare extends IGPFamily { IGPSquare(float x, float y, float d, int p){ super(x, y, d); - parts = p; +// parts = p; setVectorsOnAlphaCircle(); -// setConstructionCircleCenters(); + setConstructionCircleCenters(); setVectorsOnOuterSquare(); } - - void setVectorsOnAlphaCircle(){ - constructionCircleCenters = new ArrayList (4); - constructionCircleCenters.add(getVectorOnAlphaCircle(0)); - constructionCircleCenters.add(getVectorOnAlphaCircle(90)); - constructionCircleCenters.add(getVectorOnAlphaCircle(180)); - constructionCircleCenters.add(getVectorOnAlphaCircle(270)); - } void setConstructionCircleCenters(){ constructionCircleCenters = new ArrayList (4); @@ -88,10 +80,14 @@ class IGPSquare extends IGPFamily { if (parts == 16){ createInnerSquare(); createInnerSquareTilted(45); + } + } + void displayConstructionLines(){ + super.displayConstructionLines(); + createDiagonalConstructionLines(); + createDividingConstructionLines(12); + if (parts == 16){ createDividingConstructionLines(16); - }else if (parts == 12){ - createDividingConstructionLines(12); } } - } -- cgit v1.2.3-70-g09d2