February 2014
Beginner
1248 pages
62h 25m
English
7.1 (Drawing Spirals) In this exercise, you’ll draw spirals with methods drawLine and drawArc.
a) Draw a square-shaped spiral (as in the left screen capture of Fig. 7.27), centered on the panel, using method drawLine. One technique is to use a loop that increases the line length after drawing every second line. The direction in which to draw the next line should follow a distinct pattern, such as down, left, up, right.
Fig. 7.27 | Drawing a spiral using drawLine (left) and drawArc (right).
b) Draw a circular spiral (as in the right screen capture of Fig. 7.27), using method drawArc to draw one semicircle ...
Read now
Unlock full access