summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2015-12-30 19:54:39 +0100
committerDavid Runge <dave@sleepmap.de>2015-12-30 19:54:39 +0100
commitc459459fe6ad31d8af65fb305617005cf1028ed1 (patch)
tree9cea4bed8fad9ec17c574795c18a9435fd8dc146
parent40f70be0b2a2656cfb80ae7c6c060d2aec7ceb68 (diff)
downloadprocessing-sketchbook-c459459fe6ad31d8af65fb305617005cf1028ed1.tar.gz
processing-sketchbook-c459459fe6ad31d8af65fb305617005cf1028ed1.tar.bz2
processing-sketchbook-c459459fe6ad31d8af65fb305617005cf1028ed1.tar.xz
processing-sketchbook-c459459fe6ad31d8af65fb305617005cf1028ed1.zip
AutoVisual/IGPHexagon.pde: Separating PVectors on alpha circle and mid points of construction circles and PVectors derived from the latter.
-rw-r--r--AutoVisual/IGPHexagon.pde79
1 files changed, 40 insertions, 39 deletions
diff --git a/AutoVisual/IGPHexagon.pde b/AutoVisual/IGPHexagon.pde
index aeb4164..b59c282 100644
--- a/AutoVisual/IGPHexagon.pde
+++ b/AutoVisual/IGPHexagon.pde
@@ -3,36 +3,47 @@ class IGPHexagon extends IGPFamily{
IGPHexagon(float x, float y, float d){
super(x, y, d);
setVectorsOnAlphaCircle();
+ setConstructionCircleCenters();
setVectorsOnConstructionCircles();
}
+ void setConstructionCircleCenters(){
+ constructionCircleCenters = new ArrayList <PVector> (4);
+ constructionCircleCenters.add(alphaCircleVectors.get(0));
+ constructionCircleCenters.add(alphaCircleVectors.get(2));
+ constructionCircleCenters.add(alphaCircleVectors.get(4));
+ constructionCircleCenters.add(alphaCircleVectors.get(6));
+ constructionCircleCenters.add(alphaCircleVectors.get(8));
+ constructionCircleCenters.add(alphaCircleVectors.get(10));
+ }
+
void setVectorsOnConstructionCircles(){
int amount = 12;
constructionPartsTwelve = new ArrayList <PVector>(12);
// 0°
constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(0), 0));
// 30°
- constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(2), 0));
+ constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(1), 0));
// 60°
- constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(2), 60));
+ constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(1), 60));
// 90°
- constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(2), 120));
+ constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(1), 120));
// 120°
- constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(4), 120));
+ constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(2), 120));
// 150°
- constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(6), 120));
+ constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(3), 120));
// 180°
- constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(6), 180));
+ constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(3), 180));
// 210°
- constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(8), 180));
+ constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(4), 180));
// 240°
- constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(8), 240));
+ constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(4), 240));
// 270°
- constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(8), 300));
+ constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(4), 300));
// 300°
- constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(10), 300));
+ constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(5), 300));
// 330°
- constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(10), 0));
+ constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(5), 0));
}
void createDividingConstructionLines(int amount){
@@ -47,39 +58,29 @@ class IGPHexagon extends IGPFamily{
void createDividingLines(int amount){
stroke(0.0, 0.66, 0.0, 0.4);
- createLine(constructionCircleCenters.get(0), constructionCircleCenters.get(6));
- createLine(constructionCircleCenters.get(1), constructionCircleCenters.get(7));
- createLine(constructionCircleCenters.get(2), constructionCircleCenters.get(8));
- createLine(constructionCircleCenters.get(3), constructionCircleCenters.get(9));
- createLine(constructionCircleCenters.get(4), constructionCircleCenters.get(10));
- createLine(constructionCircleCenters.get(5), constructionCircleCenters.get(11));
+ createLine(alphaCircleVectors.get(0), alphaCircleVectors.get(6));
+ createLine(alphaCircleVectors.get(1), alphaCircleVectors.get(7));
+ createLine(alphaCircleVectors.get(2), alphaCircleVectors.get(8));
+ createLine(alphaCircleVectors.get(3), alphaCircleVectors.get(9));
+ createLine(alphaCircleVectors.get(4), alphaCircleVectors.get(10));
+ createLine(alphaCircleVectors.get(5), alphaCircleVectors.get(11));
}
- void createConstructionCircles(){
- stroke(0.66, 0.66, 0.66, 0.4);
- createCircle(constructionCircleCenters.get(0));
- createCircle(constructionCircleCenters.get(2));
- createCircle(constructionCircleCenters.get(4));
- createCircle(constructionCircleCenters.get(6));
- createCircle(constructionCircleCenters.get(8));
- createCircle(constructionCircleCenters.get(10));
- }
-
void createInnerHexagon(){
stroke(0.0, 0.0, 0.66, 0.4);
beginShape(LINES);
- vertex(constructionCircleCenters.get(1).x, constructionCircleCenters.get(1).y);
- vertex(constructionCircleCenters.get(3).x, constructionCircleCenters.get(3).y);
- vertex(constructionCircleCenters.get(3).x, constructionCircleCenters.get(3).y);
- vertex(constructionCircleCenters.get(5).x, constructionCircleCenters.get(5).y);
- vertex(constructionCircleCenters.get(5).x, constructionCircleCenters.get(5).y);
- vertex(constructionCircleCenters.get(7).x, constructionCircleCenters.get(7).y);
- vertex(constructionCircleCenters.get(7).x, constructionCircleCenters.get(7).y);
- vertex(constructionCircleCenters.get(9).x, constructionCircleCenters.get(9).y);
- vertex(constructionCircleCenters.get(9).x, constructionCircleCenters.get(9).y);
- vertex(constructionCircleCenters.get(11).x, constructionCircleCenters.get(11).y);
- vertex(constructionCircleCenters.get(11).x, constructionCircleCenters.get(11).y);
- vertex(constructionCircleCenters.get(1).x, constructionCircleCenters.get(1).y);
+ 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();
}