diff options
Diffstat (limited to 'AutoVisual')
-rw-r--r-- | AutoVisual/IGPSquare.pde | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/AutoVisual/IGPSquare.pde b/AutoVisual/IGPSquare.pde index 40185cb..bc3cff4 100644 --- a/AutoVisual/IGPSquare.pde +++ b/AutoVisual/IGPSquare.pde @@ -1,5 +1,6 @@ class IGPSquare extends IGPFamily { int parts; + ArrayList <PVector> vectorsOnOuterSquare; IGPSquare(float x, float y, float d, int p){ super(x, y, d); @@ -51,7 +52,7 @@ class IGPSquare extends IGPFamily { sixteenBaseVectorsOnOuterSquare.add(getVectorOnExtendedLine(mid, alphaCircleVectorsSixteen.get(15), mid.x+radius, false)); } - void createDividingLines(){ + void createDividingLinesOnOuterSquare(){ if(parts == 12){ createLine(twelveBaseVectorsOnOuterSquare.get(0), twelveBaseVectorsOnOuterSquare.get(6)); createLine(twelveBaseVectorsOnOuterSquare.get(1), twelveBaseVectorsOnOuterSquare.get(7)); @@ -71,35 +72,23 @@ class IGPSquare extends IGPFamily { } } - void createDividingConstructionLines(){ - if(parts == 12){ - createLine(twelveBaseVectorsOnOuterSquare.get(0), twelveBaseVectorsOnOuterSquare.get(6)); - createLine(twelveBaseVectorsOnOuterSquare.get(1), twelveBaseVectorsOnOuterSquare.get(7)); - createLine(twelveBaseVectorsOnOuterSquare.get(2), twelveBaseVectorsOnOuterSquare.get(8)); - createLine(twelveBaseVectorsOnOuterSquare.get(3), twelveBaseVectorsOnOuterSquare.get(9)); - createLine(twelveBaseVectorsOnOuterSquare.get(4), twelveBaseVectorsOnOuterSquare.get(10)); - createLine(twelveBaseVectorsOnOuterSquare.get(5), twelveBaseVectorsOnOuterSquare.get(11)); - }else if (parts == 16){ - createLine(sixteenBaseVectorsOnOuterSquare.get(0), sixteenBaseVectorsOnOuterSquare.get(8)); - createLine(sixteenBaseVectorsOnOuterSquare.get(1), sixteenBaseVectorsOnOuterSquare.get(9)); - createLine(sixteenBaseVectorsOnOuterSquare.get(2), sixteenBaseVectorsOnOuterSquare.get(10)); - createLine(sixteenBaseVectorsOnOuterSquare.get(3), sixteenBaseVectorsOnOuterSquare.get(11)); - createLine(sixteenBaseVectorsOnOuterSquare.get(4), sixteenBaseVectorsOnOuterSquare.get(12)); - createLine(sixteenBaseVectorsOnOuterSquare.get(5), sixteenBaseVectorsOnOuterSquare.get(13)); - createLine(sixteenBaseVectorsOnOuterSquare.get(6), sixteenBaseVectorsOnOuterSquare.get(14)); - createLine(sixteenBaseVectorsOnOuterSquare.get(7), sixteenBaseVectorsOnOuterSquare.get(15)); + void createVectorIndicatorOnOuterSquare(float diameter){ + useStrokeColor(); + useFillColor(); + for (PVector vector: vectorsOnOuterSquare){ + createCircle(vector, diameter); } } void displayConstructionLines(){ super.displayConstructionLines(); - createOuterSquare(); - createDiagonalConstructionLinesOnOuterSquare(); - createDividingLines(); + setStrokeColor(new Float[] {0.4, 0.8, 0.4, 1.0}); + setFillColor(new Float[] {0.0, 0.0, 0.0, 0.0}); if (parts == 16){ createInnerSquare(); createInnerSquareTilted(45); } - createDividingConstructionLines(); + createOuterSquare(); + createDividingLinesOnOuterSquare(); } } |