Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribedimage text in transcribed

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 nails

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part I Lnai 8724

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448475, 978-3662448472

More Books

Students also viewed these Databases questions