diff options
author | David Runge <dave@sleepmap.de> | 2016-01-02 06:30:21 +0100 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2016-01-02 06:30:21 +0100 |
commit | d8aa68606dd8596309d3f3c1a69c3c84b0471bf5 (patch) | |
tree | c1ece7fcd5dbbf9948b4aab2b58d2f3095284360 | |
parent | 50bbc71690373ae49cef78578e64aec97f7ac751 (diff) | |
download | processing-sketchbook-d8aa68606dd8596309d3f3c1a69c3c84b0471bf5.tar.gz processing-sketchbook-d8aa68606dd8596309d3f3c1a69c3c84b0471bf5.tar.bz2 processing-sketchbook-d8aa68606dd8596309d3f3c1a69c3c84b0471bf5.tar.xz processing-sketchbook-d8aa68606dd8596309d3f3c1a69c3c84b0471bf5.zip |
AutoVisual/IGPSquare.pde: Switching to extendLine() when calculating
PVectors for 12 and 16 parts setups on outer square.
-rw-r--r-- | AutoVisual/IGPSquare.pde | 57 |
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(){ |