title: Java: Draw a circular spiral using drawArc
body: <p>I'm working on a java programming exercise where we have to draw a circular spiral using the drawArc method so that the result looks similar to this: 
  <img src="https://i.stack.imgur.com/SSHS3.jpg" alt="enter image description here"></p>
  
  <p>I've been working on this for a while and this is what I have so far: </p>
  
  <pre><code>import java.awt.Graphics;
  import javax.swing.JPanel;
  import javax.swing.JFrame;
  
  public class CircSpiral extends JPanel {
     public void paintComponent(Graphics g) {
        int x = 100;
        int y = 120;
        int width = 40;
        int height = 60;
        int startAngle = 20;
        int arcAngle = 80;
        for (int i = 0; i &lt; 5; i++) {
           g.drawArc(x, y, width, height, startAngle, arcAngle);
           g.drawArc(x + 10, y + 10, width, height, startAngle + 10, arcAngle);
           x = x + 5;
           y = y + 5;
           startAngle = startAngle - 10;
           arcAngle = arcAngle + 10;
        }
     }
  
     public static void main(String[] args) {
        CircSpiral panel = new CircSpiral();
        JFrame application = new JFrame();
        application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        application.add(panel);
        application.setSize(300, 300);
        application.setVisible(true);
     }
  }
  </code></pre>
  
  <p>My code gives me this result:
  <img src="https://i.stack.imgur.com/KGVsR.jpg" alt="enter image description here"></p>
  
  <p>I know the problem lies in my arguments for the drawArc method because the numbers aren't right, but I don't know how to go about making the numbers go in a circular manner. Any help is appreciated. Thank you!</p>