summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2015-12-30 19:58:08 +0100
committerDavid Runge <dave@sleepmap.de>2015-12-30 19:58:08 +0100
commit2410cb823929472f5d3eba81cf36992e85a9e04e (patch)
treee14dbb8601dc04231e63414f410387a41ffb4718
parent7e8160b047d99ef69a919d737210a3920b88da4e (diff)
downloadprocessing-sketchbook-2410cb823929472f5d3eba81cf36992e85a9e04e.tar.gz
processing-sketchbook-2410cb823929472f5d3eba81cf36992e85a9e04e.tar.bz2
processing-sketchbook-2410cb823929472f5d3eba81cf36992e85a9e04e.tar.xz
processing-sketchbook-2410cb823929472f5d3eba81cf36992e85a9e04e.zip
AutoVisual/IGPPentagon.pde: Further finishing on the basic construction circles for a Pentagon setup. Separating display() and displayConstructionLines() functionality.
-rw-r--r--AutoVisual/IGPPentagon.pde45
1 files changed, 30 insertions, 15 deletions
diff --git a/AutoVisual/IGPPentagon.pde b/AutoVisual/IGPPentagon.pde
index 155027f..6dd4b1a 100644
--- a/AutoVisual/IGPPentagon.pde
+++ b/AutoVisual/IGPPentagon.pde
@@ -3,25 +3,40 @@ class IGPPentagon extends IGPFamily{
IGPPentagon(float x, float y, float d){
super(x, y, d);
setVectorsOnAlphaCircle();
+ setConstructionCircleCenters();
}
- void setVectorsOnAlphaCircle(){
- constructionCircleCenters = new ArrayList <PVector> (6);
- constructionCircleCenters.add(getVectorOnAlphaCircle(0));
- constructionCircleCenters.add(getVectorOnAlphaCircle(30));
- constructionCircleCenters.add(getVectorOnAlphaCircle(60));
- constructionCircleCenters.add(getVectorOnAlphaCircle(90));
- constructionCircleCenters.add(getVectorOnAlphaCircle(120));
- constructionCircleCenters.add(getVectorOnAlphaCircle(150));
- constructionCircleCenters.add(getVectorOnAlphaCircle(180));
- constructionCircleCenters.add(getVectorOnAlphaCircle(210));
- constructionCircleCenters.add(getVectorOnAlphaCircle(240));
- constructionCircleCenters.add(getVectorOnAlphaCircle(270));
- constructionCircleCenters.add(getVectorOnAlphaCircle(300));
- constructionCircleCenters.add(getVectorOnAlphaCircle(330));
- }
+ void setConstructionCircleCenters(){
+ constructionCircleCenters = new ArrayList <PVector> (5);
+ constructionCircleCenters.add(getVectorOnAlphaCircle(342));
+ constructionCircleCenters.add(getVectorOnAlphaCircle(54));
+ constructionCircleCenters.add(getVectorOnAlphaCircle(126));
+ constructionCircleCenters.add(getVectorOnAlphaCircle(198));
+ constructionCircleCenters.add(getVectorOnAlphaCircle(270));
+ }
+
+ void createInnerPentagon(){
+ stroke(0.0, 0.0, 0.66, 0.4);
+ beginShape(LINES);
+ vertex(constructionCircleCenters.get(0).x, constructionCircleCenters.get(0).y);
+ vertex(constructionCircleCenters.get(1).x, constructionCircleCenters.get(1).y);
+ vertex(constructionCircleCenters.get(1).x, constructionCircleCenters.get(1).y);
+ vertex(constructionCircleCenters.get(2).x, constructionCircleCenters.get(2).y);
+ vertex(constructionCircleCenters.get(2).x, constructionCircleCenters.get(2).y);
+ vertex(constructionCircleCenters.get(3).x, constructionCircleCenters.get(3).y);
+ vertex(constructionCircleCenters.get(3).x, constructionCircleCenters.get(3).y);
+ vertex(constructionCircleCenters.get(4).x, constructionCircleCenters.get(4).y);
+ vertex(constructionCircleCenters.get(4).x, constructionCircleCenters.get(4).y);
+ vertex(constructionCircleCenters.get(0).x, constructionCircleCenters.get(0).y);
+ endShape();
+ }
void display() {
+ super.display();
+ createInnerPentagon();
+ }
+ void displayConstructionLines(){
+ super.displayConstructionLines();
createConstructionCircles();
}
}