From a8e04aa27c0eb30c309c591b8a8548e22b28de90 Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 5 Jan 2016 17:47:12 +0100 Subject: AutoVisual/IGP{Square,Family}.pde: Moving call to setVectorsOnAlphaCircle() back to IGPFamily constructor. Adding the creation of diagonal lines on the outer square to the createDividingLinesOnOuterSquare() function, when parts is set to 4. --- AutoVisual/IGPFamily.pde | 1 + AutoVisual/IGPSquare.pde | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'AutoVisual') diff --git a/AutoVisual/IGPFamily.pde b/AutoVisual/IGPFamily.pde index eb2ea39..737f57c 100644 --- a/AutoVisual/IGPFamily.pde +++ b/AutoVisual/IGPFamily.pde @@ -19,6 +19,7 @@ class IGPFamily { mid = new PVector(x, y); diameter = d; radius = d/2; + setVectorsOnAlphaCircle(); println("New IGP object: x="+mid.x+"/ y="+mid.y+"/ diameter="+diameter); } diff --git a/AutoVisual/IGPSquare.pde b/AutoVisual/IGPSquare.pde index bc3cff4..828d4b4 100644 --- a/AutoVisual/IGPSquare.pde +++ b/AutoVisual/IGPSquare.pde @@ -5,7 +5,6 @@ class IGPSquare extends IGPFamily { IGPSquare(float x, float y, float d, int p){ super(x, y, d); parts = p; - setVectorsOnAlphaCircle(); setBaseVectorsOnOuterSquare(); setConstructionCircleCenters(); } @@ -53,7 +52,9 @@ class IGPSquare extends IGPFamily { } void createDividingLinesOnOuterSquare(){ - if(parts == 12){ + if(parts == 4){ + createDiagonalConstructionLinesOnOuterSquare(); + }else if(parts == 12){ createLine(twelveBaseVectorsOnOuterSquare.get(0), twelveBaseVectorsOnOuterSquare.get(6)); createLine(twelveBaseVectorsOnOuterSquare.get(1), twelveBaseVectorsOnOuterSquare.get(7)); createLine(twelveBaseVectorsOnOuterSquare.get(2), twelveBaseVectorsOnOuterSquare.get(8)); -- cgit v1.2.3-70-g09d2