This program is worth 20 pts extra credit.
The image below shows the steps in creating a picture which is constructed as follows:
- First a black triangle is drawn.
- 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.
- Next each of the smaller black triangles is subdivided recursively.
- 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.