diff options
author | David Runge <dave@sleepmap.de> | 2016-01-05 17:47:12 +0100 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2016-01-05 17:47:12 +0100 |
commit | a8e04aa27c0eb30c309c591b8a8548e22b28de90 (patch) | |
tree | f5c28b4652374c6286fc03f9fcc460f2db2993ec | |
parent | 5c408a7b70187fd9da6c6e2f9a4c4d0693b93f03 (diff) | |
download | processing-sketchbook-a8e04aa27c0eb30c309c591b8a8548e22b28de90.tar.gz processing-sketchbook-a8e04aa27c0eb30c309c591b8a8548e22b28de90.tar.bz2 processing-sketchbook-a8e04aa27c0eb30c309c591b8a8548e22b28de90.tar.xz processing-sketchbook-a8e04aa27c0eb30c309c591b8a8548e22b28de90.zip |
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.
-rw-r--r-- | AutoVisual/IGPFamily.pde | 1 | ||||
-rw-r--r-- | AutoVisual/IGPSquare.pde | 5 |
2 files changed, 4 insertions, 2 deletions
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)); |