class IGPHexagon extends IGPFamily{ IGPHexagon(float x, float y, float d){ super(x, y, d); setVectorsOnAlphaCircle(); setVectorsOnConstructionCircles(); } void setVectorsOnConstructionCircles(){ int amount = 12; constructionPartsTwelve = new ArrayList (12); // 0° constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(0), 0)); // 30° constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(2), 0)); // 60° constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(2), 60)); // 90° constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(2), 120)); // 120° constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(4), 120)); // 150° constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(6), 120)); // 180° constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(6), 180)); // 210° constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(8), 180)); // 240° constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(8), 240)); // 270° constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(8), 300)); // 300° constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(10), 300)); // 330° constructionPartsTwelve.add(getVectorOnCircle(constructionCircleCenters.get(10), 0)); } void createDividingConstructionLines(int amount){ stroke(0.66, 0.66, 0.66, 0.4); createLine(constructionPartsTwelve.get(0), constructionPartsTwelve.get(6)); createLine(constructionPartsTwelve.get(1), constructionPartsTwelve.get(7)); createLine(constructionPartsTwelve.get(2), constructionPartsTwelve.get(8)); createLine(constructionPartsTwelve.get(3), constructionPartsTwelve.get(9)); createLine(constructionPartsTwelve.get(4), constructionPartsTwelve.get(10)); createLine(constructionPartsTwelve.get(5), constructionPartsTwelve.get(11)); } 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)); } 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); endShape(); } void display() { super.display(); createDividingLines(12); createInnerHexagon(); } void displayConstructionLines(){ super.displayConstructionLines(); createDividingConstructionLines(12); } }