summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AutoVisual/IGPFamily.pde13
-rw-r--r--AutoVisual/IGPSquare.pde2
2 files changed, 10 insertions, 5 deletions
diff --git a/AutoVisual/IGPFamily.pde b/AutoVisual/IGPFamily.pde
index 2dc2398..3108686 100644
--- a/AutoVisual/IGPFamily.pde
+++ b/AutoVisual/IGPFamily.pde
@@ -97,10 +97,15 @@ class IGPFamily {
createLine(alphaCircleVectors.get(3), alphaCircleVectors.get(9));
}
- void createDiagonalConstructionLines(){
- //TODO: add for 16 parts
- createLine(new PVector(constructionCircleCenters.get(1).x-radius, constructionCircleCenters.get(2).y-radius), new PVector(constructionCircleCenters.get(3).x+radius, constructionCircleCenters.get(0).y+radius));
- createLine(new PVector(constructionCircleCenters.get(1).x+radius, constructionCircleCenters.get(0).y-radius), new PVector(constructionCircleCenters.get(3).x-radius, constructionCircleCenters.get(2).y+radius));
+ void createDiagonalConstructionLinesOnOuterSquare(){
+ createLine(new PVector(mid.x+radius, mid.y+radius), new PVector(mid.x-radius, mid.y-radius));
+ createLine(new PVector(mid.x+radius, mid.y-radius), new PVector(mid.x-radius, mid.y+radius));
+ }
+
+ void createDiagonalConstructionLinesOnAlphaCircle(){
+ //TODO: use PVectors from ArrayList
+ createLine(getVectorOnAlphaCircle(45), getVectorOnAlphaCircle(225));
+ createLine(getVectorOnAlphaCircle(135), getVectorOnAlphaCircle(315));
}
void createInnerHexagon(){
diff --git a/AutoVisual/IGPSquare.pde b/AutoVisual/IGPSquare.pde
index b1e8669..3c3e2a3 100644
--- a/AutoVisual/IGPSquare.pde
+++ b/AutoVisual/IGPSquare.pde
@@ -100,7 +100,7 @@ class IGPSquare extends IGPFamily {
void displayConstructionLines(){
super.displayConstructionLines();
- createDiagonalConstructionLines();
+ createDiagonalConstructionLinesOnOuterSquare();
if (parts == 16){
createInnerSquare();
createInnerSquareTilted(45);