CS 225 Homework 13
Due at 11:59 PM, Friday December 15, 2017.
This program is worth 20 pts extra credit.

The image below shows the steps in creating a picture which is constructed as follows:

  1. First a black triangle is drawn.
  2. Next each of the midpoints of the edges of the triangles are used as vertices to draw a white triangle. This leaves 3 smaller black triangles.
  3. Next each of the smaller black triangles is subdivided recursively.
  4. This process is repeated to some level of recursion.

Write a JavaFX program called Triangle.java to draw the triangle (the final triangle only, not the steps). The recursion depth will be a command line argument. If it is omitted, it should default to 5. Make the triangle fairly large (say a width of 600 pixels). Also, make it equilateral. This means that the height will not be 600.