summaryrefslogtreecommitdiffstats
path: root/AutoVisual
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2016-01-04 14:44:39 +0100
committerDavid Runge <dave@sleepmap.de>2016-01-04 14:44:39 +0100
commit36905d62db8c3f66edb4347109c02f16f4222835 (patch)
tree237c45869c8d15b9298b359588338e00e8ca1976 /AutoVisual
parentb832291263537a5e6e196c387e6e73b9e09d11ef (diff)
downloadprocessing-sketchbook-36905d62db8c3f66edb4347109c02f16f4222835.tar.gz
processing-sketchbook-36905d62db8c3f66edb4347109c02f16f4222835.tar.bz2
processing-sketchbook-36905d62db8c3f66edb4347109c02f16f4222835.tar.xz
processing-sketchbook-36905d62db8c3f66edb4347109c02f16f4222835.zip
AutoVisual/IGPSquare.pde: Adding greenish color code to the creation of mid level construction lines. Deleting redundant createDividingConstructionLines() function. Renaming createDividingLines() to more declarative createDividingLinesOnOuterSquare(). Creating createVectorIndicatorOnOuterSquare() function for marking PVectors on the outer square, for better debugging.
Diffstat (limited to 'AutoVisual')
-rw-r--r--AutoVisual/IGPSquare.pde33
1 files changed, 11 insertions, 22 deletions
diff --git a/AutoVisual/IGPSquare.pde b/AutoVisual/IGPSquare.pde
index 40185cb..bc3cff4 100644
--- a/AutoVisual/IGPSquare.pde
+++ b/AutoVisual/IGPSquare.pde
@@ -1,5 +1,6 @@
class IGPSquare extends IGPFamily {
int parts;
+ ArrayList <PVector> vectorsOnOuterSquare;
IGPSquare(float x, float y, float d, int p){
super(x, y, d);
@@ -51,7 +52,7 @@ class IGPSquare extends IGPFamily {
sixteenBaseVectorsOnOuterSquare.add(getVectorOnExtendedLine(mid, alphaCircleVectorsSixteen.get(15), mid.x+radius, false));
}
- void createDividingLines(){
+ void createDividingLinesOnOuterSquare(){
if(parts == 12){
createLine(twelveBaseVectorsOnOuterSquare.get(0), twelveBaseVectorsOnOuterSquare.get(6));
createLine(twelveBaseVectorsOnOuterSquare.get(1), twelveBaseVectorsOnOuterSquare.get(7));
@@ -71,35 +72,23 @@ class IGPSquare extends IGPFamily {
}
}
- void createDividingConstructionLines(){
- if(parts == 12){
- createLine(twelveBaseVectorsOnOuterSquare.get(0), twelveBaseVectorsOnOuterSquare.get(6));
- createLine(twelveBaseVectorsOnOuterSquare.get(1), twelveBaseVectorsOnOuterSquare.get(7));
- createLine(twelveBaseVectorsOnOuterSquare.get(2), twelveBaseVectorsOnOuterSquare.get(8));
- createLine(twelveBaseVectorsOnOuterSquare.get(3), twelveBaseVectorsOnOuterSquare.get(9));
- createLine(twelveBaseVectorsOnOuterSquare.get(4), twelveBaseVectorsOnOuterSquare.get(10));
- createLine(twelveBaseVectorsOnOuterSquare.get(5), twelveBaseVectorsOnOuterSquare.get(11));
- }else if (parts == 16){
- createLine(sixteenBaseVectorsOnOuterSquare.get(0), sixteenBaseVectorsOnOuterSquare.get(8));
- createLine(sixteenBaseVectorsOnOuterSquare.get(1), sixteenBaseVectorsOnOuterSquare.get(9));
- createLine(sixteenBaseVectorsOnOuterSquare.get(2), sixteenBaseVectorsOnOuterSquare.get(10));
- createLine(sixteenBaseVectorsOnOuterSquare.get(3), sixteenBaseVectorsOnOuterSquare.get(11));
- createLine(sixteenBaseVectorsOnOuterSquare.get(4), sixteenBaseVectorsOnOuterSquare.get(12));
- createLine(sixteenBaseVectorsOnOuterSquare.get(5), sixteenBaseVectorsOnOuterSquare.get(13));
- createLine(sixteenBaseVectorsOnOuterSquare.get(6), sixteenBaseVectorsOnOuterSquare.get(14));
- createLine(sixteenBaseVectorsOnOuterSquare.get(7), sixteenBaseVectorsOnOuterSquare.get(15));
+ void createVectorIndicatorOnOuterSquare(float diameter){
+ useStrokeColor();
+ useFillColor();
+ for (PVector vector: vectorsOnOuterSquare){
+ createCircle(vector, diameter);
}
}
void displayConstructionLines(){
super.displayConstructionLines();
- createOuterSquare();
- createDiagonalConstructionLinesOnOuterSquare();
- createDividingLines();
+ setStrokeColor(new Float[] {0.4, 0.8, 0.4, 1.0});
+ setFillColor(new Float[] {0.0, 0.0, 0.0, 0.0});
if (parts == 16){
createInnerSquare();
createInnerSquareTilted(45);
}
- createDividingConstructionLines();
+ createOuterSquare();
+ createDividingLinesOnOuterSquare();
}
}