summaryrefslogtreecommitdiffstats
path: root/AutoVisual/IGPSquare.pde
diff options
context:
space:
mode:
Diffstat (limited to 'AutoVisual/IGPSquare.pde')
-rw-r--r--AutoVisual/IGPSquare.pde57
1 files changed, 29 insertions, 28 deletions
diff --git a/AutoVisual/IGPSquare.pde b/AutoVisual/IGPSquare.pde
index 3c3e2a3..b23176f 100644
--- a/AutoVisual/IGPSquare.pde
+++ b/AutoVisual/IGPSquare.pde
@@ -20,35 +20,36 @@ class IGPSquare extends IGPFamily {
void setVectorsOnOuterSquare(){
int amount = 12;
constructionPartsTwelve = new ArrayList <PVector>(12);
- constructionPartsTwelve.add(constructionCircleCenters.get(0));
- constructionPartsTwelve.add(new PVector(constructionCircleCenters.get(1).x+radius/2+radius/amount, mid.y-radius));
- constructionPartsTwelve.add(new PVector(mid.x+radius, constructionCircleCenters.get(0).y-radius/2-radius/amount));
- constructionPartsTwelve.add(constructionCircleCenters.get(1));
- constructionPartsTwelve.add(new PVector(mid.x+radius, constructionCircleCenters.get(0).y+radius/2+radius/amount));
- constructionPartsTwelve.add(new PVector(constructionCircleCenters.get(3).x+radius/2+radius/amount, mid.y+radius));
- constructionPartsTwelve.add(constructionCircleCenters.get(2));
- constructionPartsTwelve.add(new PVector(constructionCircleCenters.get(3).x-radius/2-radius/amount, mid.y+radius));
- constructionPartsTwelve.add(new PVector(mid.x-radius, constructionCircleCenters.get(2).y+radius/2+radius/amount));
- constructionPartsTwelve.add(constructionCircleCenters.get(3));
- constructionPartsTwelve.add(new PVector(mid.x-radius, constructionCircleCenters.get(2).y-radius/2-radius/amount));
- constructionPartsTwelve.add(new PVector(constructionCircleCenters.get(1).x-radius/2-radius/amount, mid.y-radius));
+ constructionPartsTwelve.add(alphaCircleVectors.get(0));
+ constructionPartsTwelve.add(extendLine(mid, alphaCircleVectors.get(1), mid.x+radius, false));
+ constructionPartsTwelve.add(extendLine(mid, alphaCircleVectors.get(2), mid.y-radius, true));
+ constructionPartsTwelve.add(alphaCircleVectors.get(3));
+ constructionPartsTwelve.add(extendLine(mid, alphaCircleVectors.get(4), mid.y-radius, true));
+ constructionPartsTwelve.add(extendLine(mid, alphaCircleVectors.get(5), mid.x-radius, false));
+ constructionPartsTwelve.add(alphaCircleVectors.get(6));
+ constructionPartsTwelve.add(extendLine(mid, alphaCircleVectors.get(7), mid.x-radius, false));
+ constructionPartsTwelve.add(extendLine(mid, alphaCircleVectors.get(8), mid.y+radius, true));
+ constructionPartsTwelve.add(alphaCircleVectors.get(9));
+ constructionPartsTwelve.add(extendLine(mid, alphaCircleVectors.get(10), mid.y+radius, true));
+ constructionPartsTwelve.add(extendLine(mid, alphaCircleVectors.get(11), mid.x+radius, false));
+
constructionPartsSixteen = new ArrayList <PVector>(16);
- constructionPartsSixteen.add(constructionCircleCenters.get(0));
- constructionPartsSixteen.add(new PVector(constructionCircleCenters.get(1).x+radius/2-radius/amount, mid.y-radius));
- constructionPartsSixteen.add(new PVector(constructionCircleCenters.get(1).x-radius, constructionCircleCenters.get(2).y-radius));
- constructionPartsSixteen.add(new PVector(mid.x+radius, constructionCircleCenters.get(0).y-radius/2+radius/amount));
- constructionPartsSixteen.add(constructionCircleCenters.get(1));
- constructionPartsSixteen.add(new PVector(mid.x+radius, constructionCircleCenters.get(0).y+radius/2-radius/amount));
- constructionPartsSixteen.add(new PVector(constructionCircleCenters.get(1).x+radius, constructionCircleCenters.get(0).y-radius));
- constructionPartsSixteen.add(new PVector(constructionCircleCenters.get(3).x+radius/2-radius/amount, mid.y+radius));
- constructionPartsSixteen.add(constructionCircleCenters.get(2));
- constructionPartsSixteen.add(new PVector(constructionCircleCenters.get(3).x-radius/2+radius/amount, mid.y+radius));
- constructionPartsSixteen.add(new PVector(constructionCircleCenters.get(3).x+radius, constructionCircleCenters.get(0).y+radius));
- constructionPartsSixteen.add(new PVector(mid.x-radius, constructionCircleCenters.get(2).y+radius/2-radius/amount));
- constructionPartsSixteen.add(constructionCircleCenters.get(3));
- constructionPartsSixteen.add(new PVector(mid.x-radius, constructionCircleCenters.get(2).y-radius/2+radius/amount));
- constructionPartsSixteen.add(new PVector(constructionCircleCenters.get(3).x-radius, constructionCircleCenters.get(2).y+radius));
- constructionPartsSixteen.add(new PVector(constructionCircleCenters.get(1).x-radius/2+radius/amount, mid.y-radius));
+ constructionPartsSixteen.add(alphaCircleVectorsSixteen.get(0));
+ constructionPartsSixteen.add(extendLine(mid, alphaCircleVectorsSixteen.get(1), mid.x+radius, false));
+ constructionPartsSixteen.add(new PVector(mid.x+radius, mid.y-radius));
+ constructionPartsSixteen.add(extendLine(mid, alphaCircleVectorsSixteen.get(3), mid.y-radius, true));
+ constructionPartsSixteen.add(alphaCircleVectorsSixteen.get(4));
+ constructionPartsSixteen.add(extendLine(mid, alphaCircleVectorsSixteen.get(5), mid.y-radius, true));
+ constructionPartsSixteen.add(new PVector(mid.x-radius, mid.y-radius));
+ constructionPartsSixteen.add(extendLine(mid, alphaCircleVectorsSixteen.get(7), mid.x-radius, false));
+ constructionPartsSixteen.add(alphaCircleVectorsSixteen.get(8));
+ constructionPartsSixteen.add(extendLine(mid, alphaCircleVectorsSixteen.get(9), mid.x-radius, false));
+ constructionPartsSixteen.add(new PVector(mid.x-radius, mid.y+radius));
+ constructionPartsSixteen.add(extendLine(mid, alphaCircleVectorsSixteen.get(11), mid.y+radius, true));
+ constructionPartsSixteen.add(alphaCircleVectorsSixteen.get(12));
+ constructionPartsSixteen.add(extendLine(mid, alphaCircleVectorsSixteen.get(13), mid.y+radius, true));
+ constructionPartsSixteen.add(new PVector(mid.x+radius, mid.y+radius));
+ constructionPartsSixteen.add(extendLine(mid, alphaCircleVectorsSixteen.get(15), mid.x+radius, false));
}
void createDividingLines(){