Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Working with for loops. Objectives Working with for loops. String Art String art is a form of art de by wrapping colored string around a
Working with for loops.
Objectives Working with for loops. String Art String art is a form of art de by wrapping colored string around a pattern of nails. B0 A20 20 E00 E1 A1 CO C20 Part 1 (5 points) Edge Nails First you are going to calculate the x,y coordinates of the nails. You will be using a DrawingPanel of size 401 by 401 (coordinate value are o 400 Write a for loop counting from O to 20. Your first task is to calculate and print the coordinates of the A points as shown in the diagram above. The coordinates are A0 0,400 A1 0,380 A2 0,360 A20. Print out the result just like this. Next write loops to calculate and print the B, C, and D coordinates. Now create a 401 by 401 DrawingPanel and draw all of the edge nails as 1 pixel ovals. Part 2 (5 points) Drawing the A-B corner gusset write a new for loop from 0 to 20 and draw the lines connecting Ao to B0, A1 to B 1, etc. You can choose the colors. You will be using the same formulas to calculate the points that you used to draw the nailsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started