title: Trying to make a rainbow using 2 arcs and filling the lines between with the FXgraphics2D drawArc and drawLine functions
body: <p>Trying to make a rainbow using 2 arcs and filling the lines between with the FXgraphics2D drawArc and drawLine functions. Its not working as expected. The assignment is to make a rainbow starting and ending with red displaying the huespectrum within it.</p>
  <p>The requested result:</p>
  <p><img src="https://i.stack.imgur.com/RVJt8.png" alt="The requested result" /></p>
  <pre><code>public class Rainbow extends Application {
  @Override
  public void start(Stage primaryStage) throws Exception {
      Canvas canvas = new Canvas(1920, 1080);
      draw(new FXGraphics2D(canvas.getGraphicsContext2D()));
      primaryStage.setScene(new Scene(new Group(canvas)));
      primaryStage.setTitle(&quot;Rainbow&quot;);
      primaryStage.show();
  }
  
  
  public void draw(FXGraphics2D g2d) {
      int radiusBuiten = 1000;
      int radiusBinnen = radiusBuiten/2;
      for (int i = 0; i &lt; 180; i++) {
          g2d.drawArc(0, 0, radiusBuiten, radiusBuiten, 0, i);
          g2d.drawArc(radiusBinnen/2, radiusBinnen/2, radiusBinnen, radiusBinnen, 0, i);
          float hoek = i;
          double x1 = radiusBinnen * Math.cos(hoek);
          double y1 = radiusBinnen * Math.sin(hoek);
          double x2 = radiusBuiten * Math.cos(hoek);
          double y2 = radiusBuiten * Math.sin(hoek);
          g2d.setColor(Color.getHSBColor(i/500.0f, 1, 1));
          g2d.draw(new Line2D.Double((int)x1,(int)y1, (int)x2, (int)y2));
      }
  
  
  }
  
  
  
  
  public static void main(String[] args) {
      launch(Rainbow.class);
  }
  </code></pre>
  <p>}</p>
  <p>Drawing the arcs is going as pleased but filling in the lines between the arcs is giving me trouble. Im also not sure what the value should be for the angle variabel and how to get the correct color values.</p>