diff options
author | David Runge <dave@sleepmap.de> | 2016-01-01 17:29:07 +0100 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2016-01-01 17:29:07 +0100 |
commit | 4c8c61a6241e4b1f92a35e92004d550474895644 (patch) | |
tree | 4a986fcb9381e168d98b6ff7bc387a3a26c8b15c /AutoVisual | |
parent | 8fccb64111837bbb05eae5bd8a58721c141c7ad2 (diff) | |
download | processing-sketchbook-4c8c61a6241e4b1f92a35e92004d550474895644.tar.gz processing-sketchbook-4c8c61a6241e4b1f92a35e92004d550474895644.tar.bz2 processing-sketchbook-4c8c61a6241e4b1f92a35e92004d550474895644.tar.xz processing-sketchbook-4c8c61a6241e4b1f92a35e92004d550474895644.zip |
AutoVisual/IGP{Family,Square}.pde: Simplifying createDiagonalConstructionLines{OnOuterSquare,OnAlphaCircle}(). Adding createDiagonalconstructionLinesOnOuterSquare() to IGPSquare class.
Diffstat (limited to 'AutoVisual')
-rw-r--r-- | AutoVisual/IGPFamily.pde | 13 | ||||
-rw-r--r-- | AutoVisual/IGPSquare.pde | 2 |
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); |