19.09.2015 Views

Prentice.Hall.Introduction.to.Java.Programming,.Brief.Version.9th.(2014).[sharethefiles.com]

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

512 Chapter 13 Graphics<br />

Hint: The Unicode for π is \u03c0. To display 2π, use<br />

g.drawString("-2\u03c0", x, y). For a trigonometric function like<br />

sin(x), x is in radians. Use the following loop <strong>to</strong> add the points <strong>to</strong> a polygon p:<br />

for (int x = -170; x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!