summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2015-12-31 04:36:31 +0100
committerDavid Runge <dave@sleepmap.de>2015-12-31 04:36:31 +0100
commitb6891a9a081cbfdaebe4ac2407aa90006e243e4b (patch)
treeabfb09ab2b2a62d1928f8c6359e01b8e6cc163cc
parent589e6c881bd2cf11e8615e9c1bf8cb4012293bad (diff)
downloadprocessing-sketchbook-b6891a9a081cbfdaebe4ac2407aa90006e243e4b.tar.gz
processing-sketchbook-b6891a9a081cbfdaebe4ac2407aa90006e243e4b.tar.bz2
processing-sketchbook-b6891a9a081cbfdaebe4ac2407aa90006e243e4b.tar.xz
processing-sketchbook-b6891a9a081cbfdaebe4ac2407aa90006e243e4b.zip
AutoVisual/IGPFamily.pde: Adding function to add a inner hexagon, tilted
(createInnerHexagonTilted()).
-rw-r--r--AutoVisual/IGPFamily.pde41
1 files changed, 41 insertions, 0 deletions
diff --git a/AutoVisual/IGPFamily.pde b/AutoVisual/IGPFamily.pde
index 4306a02..093c025 100644
--- a/AutoVisual/IGPFamily.pde
+++ b/AutoVisual/IGPFamily.pde
@@ -103,6 +103,47 @@ class IGPFamily {
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 createInnerHexagon(){
+ stroke(0.0, 0.0, 0.66, 0.4);
+ beginShape(LINES);
+ vertex(alphaCircleVectors.get(1).x, alphaCircleVectors.get(1).y);
+ vertex(alphaCircleVectors.get(3).x, alphaCircleVectors.get(3).y);
+ vertex(alphaCircleVectors.get(3).x, alphaCircleVectors.get(3).y);
+ vertex(alphaCircleVectors.get(5).x, alphaCircleVectors.get(5).y);
+ vertex(alphaCircleVectors.get(5).x, alphaCircleVectors.get(5).y);
+ vertex(alphaCircleVectors.get(7).x, alphaCircleVectors.get(7).y);
+ vertex(alphaCircleVectors.get(7).x, alphaCircleVectors.get(7).y);
+ vertex(alphaCircleVectors.get(9).x, alphaCircleVectors.get(9).y);
+ vertex(alphaCircleVectors.get(9).x, alphaCircleVectors.get(9).y);
+ vertex(alphaCircleVectors.get(11).x, alphaCircleVectors.get(11).y);
+ vertex(alphaCircleVectors.get(11).x, alphaCircleVectors.get(11).y);
+ vertex(alphaCircleVectors.get(1).x, alphaCircleVectors.get(1).y);
+ endShape();
+ }
+
+ void createInnerHexagonTilted(float angle){
+ stroke(0.0, 0.0, 0.66, 0.4);
+ translate(mid.x, mid.y);
+ pushMatrix();
+ rotate(radians(angle));
+ beginShape(LINES);
+ vertex(alphaCircleVectors.get(1).x-mid.x, alphaCircleVectors.get(1).y-mid.y);
+ vertex(alphaCircleVectors.get(3).x-mid.x, alphaCircleVectors.get(3).y-mid.y);
+ vertex(alphaCircleVectors.get(3).x-mid.x, alphaCircleVectors.get(3).y-mid.y);
+ vertex(alphaCircleVectors.get(5).x-mid.x, alphaCircleVectors.get(5).y-mid.y);
+ vertex(alphaCircleVectors.get(5).x-mid.x, alphaCircleVectors.get(5).y-mid.y);
+ vertex(alphaCircleVectors.get(7).x-mid.x, alphaCircleVectors.get(7).y-mid.y);
+ vertex(alphaCircleVectors.get(7).x-mid.x, alphaCircleVectors.get(7).y-mid.y);
+ vertex(alphaCircleVectors.get(9).x-mid.x, alphaCircleVectors.get(9).y-mid.y);
+ vertex(alphaCircleVectors.get(9).x-mid.x, alphaCircleVectors.get(9).y-mid.y);
+ vertex(alphaCircleVectors.get(11).x-mid.x, alphaCircleVectors.get(11).y-mid.y);
+ vertex(alphaCircleVectors.get(11).x-mid.x, alphaCircleVectors.get(11).y-mid.y);
+ vertex(alphaCircleVectors.get(1).x-mid.x, alphaCircleVectors.get(1).y-mid.y);
+ endShape();
+ popMatrix();
+ translate(mid.x*(-1), mid.y*(-1));
+ }
+
void display() {
createAlphaCircle();
}