diff options
author | David Runge <dave@sleepmap.de> | 2015-12-30 19:56:27 +0100 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2015-12-30 19:56:27 +0100 |
commit | 7e8160b047d99ef69a919d737210a3920b88da4e (patch) | |
tree | 24f5cbff195d334ce6fb2193212125b87c006795 /AutoVisual | |
parent | c459459fe6ad31d8af65fb305617005cf1028ed1 (diff) | |
download | processing-sketchbook-7e8160b047d99ef69a919d737210a3920b88da4e.tar.gz processing-sketchbook-7e8160b047d99ef69a919d737210a3920b88da4e.tar.bz2 processing-sketchbook-7e8160b047d99ef69a919d737210a3920b88da4e.tar.xz processing-sketchbook-7e8160b047d99ef69a919d737210a3920b88da4e.zip |
AutoVisual/IGPSquare.pde: Setting up constructionCircleCenters properly. Separating display() and displayConstructionLines() functionality.
Diffstat (limited to 'AutoVisual')
-rw-r--r-- | AutoVisual/IGPSquare.pde | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/AutoVisual/IGPSquare.pde b/AutoVisual/IGPSquare.pde index 80e3700..88d6e14 100644 --- a/AutoVisual/IGPSquare.pde +++ b/AutoVisual/IGPSquare.pde @@ -3,19 +3,11 @@ class IGPSquare extends IGPFamily { IGPSquare(float x, float y, float d, int p){ super(x, y, d); - parts = p; +// parts = p; setVectorsOnAlphaCircle(); -// setConstructionCircleCenters(); + setConstructionCircleCenters(); setVectorsOnOuterSquare(); } - - void setVectorsOnAlphaCircle(){ - constructionCircleCenters = new ArrayList <PVector> (4); - constructionCircleCenters.add(getVectorOnAlphaCircle(0)); - constructionCircleCenters.add(getVectorOnAlphaCircle(90)); - constructionCircleCenters.add(getVectorOnAlphaCircle(180)); - constructionCircleCenters.add(getVectorOnAlphaCircle(270)); - } void setConstructionCircleCenters(){ constructionCircleCenters = new ArrayList <PVector> (4); @@ -88,10 +80,14 @@ class IGPSquare extends IGPFamily { if (parts == 16){ createInnerSquare(); createInnerSquareTilted(45); + } + } + void displayConstructionLines(){ + super.displayConstructionLines(); + createDiagonalConstructionLines(); + createDividingConstructionLines(12); + if (parts == 16){ createDividingConstructionLines(16); - }else if (parts == 12){ - createDividingConstructionLines(12); } } - } |