From b6891a9a081cbfdaebe4ac2407aa90006e243e4b Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 31 Dec 2015 04:36:31 +0100 Subject: AutoVisual/IGPFamily.pde: Adding function to add a inner hexagon, tilted (createInnerHexagonTilted()). --- AutoVisual/IGPFamily.pde | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) 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(); } -- cgit v1.2.3-70-g09d2