public void addLines(ArrayList<Line> list, int n, int divs) { double theta = calculateTheta(divs); double r = calculateLineLength(); DoublePoint center = getCenter(); Debug.println("Center pt:" + center); for (int i = 0; i < n; i++) { DoublePoint offShoot = getPolarProjectedPoint(center, r, theta * i); Debug.println("offshoot" + i + ": " + offShoot + " theta: " + theta * i); addLine(center, offShoot, list); } }
private void addArcs(int divs) { double theta = calculateTheta(divs); for (int i = 0; i < circles.size() - 1; i++) { Line nextLine = circles.get((i + 1) % circles.size()); DoublePoint start = circles.get(i).getEnd(); Arc temp = new Arc( new DoublePoint(0, 0), new DoublePoint(getWidth(), getHeight()), -90 + (int) (i * theta), (int) theta + 5); Debug.println( start + ", " + nextLine.getEnd() + "start: " + (i * theta) + ", with sweep: " + theta); arcs.add(temp); } }