Java Graphics Programming Library: Concepts to Source Code / Edition 1

Java Graphics Programming Library: Concepts to Source Code / Edition 1

by Oswald Campesato
     
 

Java Graphics Programming Library is a comprehensive reference for the experienced Java developer, providing hundreds of pages of source code for fully functional Java graphics classes. This book/CD-ROM package saves valuable programming time by offering ready-to-use, customizable code for commonly used graphics, including a variety of polygons, polyhedra, ellipses,… See more details below

Overview

Java Graphics Programming Library is a comprehensive reference for the experienced Java developer, providing hundreds of pages of source code for fully functional Java graphics classes. This book/CD-ROM package saves valuable programming time by offering ready-to-use, customizable code for commonly used graphics, including a variety of polygons, polyhedra, ellipses, cones, cylinders, and more. Each chapter contains a thematic selection of graphics and covers the necessary mathematics, programming concepts, and source code for each image. At the end of each chapter are thumbnails of the graphics in the chapter and the additional graphics available on the companion CD-ROM. Both advanced and less experienced users will find an abundance of code they can use ?as is,? customize, or extend to suit a variety of programming needs.

Product Details

ISBN-13:
9781584500926
Publisher:
Cengage Learning
Publication date:
03/01/2002
Series:
Charles River Media Programming Series
Edition description:
1ST
Pages:
550
Product dimensions:
6.14(w) x 9.28(h) x 1.21(d)

Table of Contents

Acknowledgmentsxv
Introductionxvii
The Goalxvii
Why Buy This Book?xvii
What Does This Book Cover?xviii
What Has Been Omitted from This Book?xviii
Which Version of Java Is Required?xix
How Difficult Is the Code?xix
Are There Any Prerequisites?xix
Is This Book for Me?xix
Where to Get Ideasxx
Code Portabilityxx
What Graphics Capability Is Available in Java?xxi
Graphics Versus Codexxi
Why So Much Code?xxii
1Colors and Basic Shapes1
Overview1
Concept: The Java Coordinate System1
Concept: Drawing Lines to Render Rectangles2
Concept: Using drawRect() to Render Rectangles4
Concept: Colors and Their Components6
Concept: Standard Colors6
Concept: Rectangles and Gradient Shading7
Concept: Rectangles as Polygons9
Concept: Shaded Rectangles11
Concept: Parallelograms as Polygons13
CD Library17
Summary17
2Building Blocks19
Overview19
Concept: Building Blocks20
Concept: Triangles as Building Blocks20
Concept: Parallelograms as Building Blocks25
Concept: Oscillating Polyhedra30
Concept: Ellipses as Core Building Blocks37
Concept: Ellipses as Building Blocks for Cylinders39
CD Library45
Summary46
3Line Segments and Trigonometry (I)47
Overview47
Concept: Drawing Line Segments and Conchoids48
Concept: Line Segments and Nephroids52
Concept: Tilting Line Segments and Lissajous Curves56
Concept: Line Segments and Hypocycloids61
CD Library65
Summary66
4Line Segments and Trigonometry (II)67
Overview67
Concept: Oscillating Line Segments and Folium Curves67
Concept: Variable-Length Oscillating Line Segments and Folium Curves71
Concept: Oscillating Line Segments and Tschirnhaus Curves76
Concept: Gradient Oscillating Line Segments and Tschirnhaus Curves80
Concept: Striped Oscillating Line Segments and Tschirnhaus Curves85
CD Library91
Summary93
5Rectangles and Trigonometry95
Overview95
Concept: Rectangles and Deltoids95
Concept: Rectangles and Epicycloids99
Concept: Rectangles and Oscillating Epicycloids103
Concept: Rectangles and Hypocycloids107
Concept: Rectangles and Oscillating Hypocycloids112
Concept: Rectangles and Multi Polar Loops116
CD Library120
Summary121
6Polynomials and Line Segments123
Overview123
Concept: Computing Polynomial Values123
Concept: Polynomials and Line Segments124
Concept: Polynomials and Striped Line Segments129
Concept: Multiple Polynomials and Line Segments135
Concept: Multiple Polynomials and Striped Line Segments139
CD Library145
Summary146
7Polygons and 3D Polar Coordinates147
Overview147
Concept: Mapping 3D Points to a 2D Coordinate System147
Concept: Polygons and 3D Polar Coordinates148
Concept: Polygons and Cylinders152
Concept: Gradient Polygons and Partial Cylinders156
Concept: Gradient Polygons and Cylinders160
Concept: Polygons and Distended Cylinders164
Concept: Polygons and Multi-Colored Distended Cylinders169
CD Library173
Summary174
8Ellipse-Based Objects175
Overview175
Concept: Drawing an Ellipse175
Concept: Drawing Ellipses with Shading175
Concept: Drawing Ellipses Using Line Segments178
Concept: Ellipses with Gradient and Diagonal Shading179
Concept: Drawing Shrinking Ellipses182
Concept: Drawing Organ Pipes186
Concept: Drawing a Rotated Ellipse189
CD Library193
Summary194
9Ellipses and Simple Shading195
Overview195
Concept: Drawing Ellipses with Horizontal Stripes195
Concept: Drawing Nested Ellipses with a Common End Point198
Concept: Drawing Nested Ellipses in Rectangles201
Concept: Drawing Gradient Ellipses204
Concept: Drawing Hollow Ellipses207
CD Library211
Summary211
10Ellipses, Shading, and Simple Motion213
Overview213
Concept: Drawing Elliptic Pillars with Venetian Shading213
Concept: Drawing Overlapping Elliptic Pillars with Venetian Shading217
Concept: Drawing Shifting Ellipses and Wire Frames221
Concept: Drawing Oscillating Shifting Ellipses and Wire Frames225
CD Library229
Summary230
11Ellipses and Basic Animation231
Overview231
Concept: Drawing Wind Chimes with Ellipses231
Concept: Drawing Chains with Ellipses238
Concept: Drawing Pulleys with Ellipses244
Concept: Drawing Curling Sheets of Paper253
CD Library263
Summary263
12Spinning Objects with Lines and Elliptic Arcs265
Overview265
Concept: Drawing Spinning Cones with Elliptic Wedges265
Concept: Drawing Spinning Cone-Like Objects with Elliptic Arcs271
Concept: Drawing Spinning Horizontal Cones277
Concept: Drawing Rotating Elliptic Bowls with Elliptic Wedges283
Concept: Drawing Rotating Elliptic Bowls with Elliptic Arcs288
CD Library296
Summary298
13Ellipses and Cubic Functions299
Overview299
Concept: Drawing Horizontal Elliptic Sectors with Cubic Functions299
Concept: Drawing Spinning Horizontal Elliptic Sectors with Cubic Functions303
Concept: Drawing Contra-Spinning Horizontal Elliptic Sectors with Cubic Functions308
Concept: Drawing Oscillating Horizontal Elliptic Sector Wire Frames with Cubic Functions314
Concept: Drawing Bands of Horizontal Oscillating Elliptic Sector Wire Frames with Cubic Functions319
CD Library324
Summary325
14Ellipses and Lava-Like Patterns327
Overview327
Concept: Drawing Oscillating Elliptic Patterns327
Concept: Drawing Elliptic Lava332
Concept: Elliptic Lava and Colors336
Concept: Elliptic Flow Lava and Colors341
CD Library346
Summary348
15Striated Ellipses and Arcs349
Overview349
Concept: Drawing Cones with Elliptic Arcs349
Concept: Drawing Cones with Swirling Elliptic Swaths352
Concept: Drawing Swirling Cones with Elliptic Arcs and Venetian Shading356
Concept: Drawing Swirling Cones with Multi-Colored Elliptic Arcs360
Concept: Drawing Swirling Cones with Elliptic Arcs364
CD Library369
Summary370
16Checkerboard Patterns371
Overview371
Concept: Drawing Checkerboard Patterns371
Concept: Drawing 3D Checkerboard Patterns374
Concept: Drawing a Checkerboard of Gradient Cells376
Concept: Drawing Vertical Blinds379
Concept: Drawing a Checkerboard Grid Pattern382
CD Library386
Summary388
17Recursion389
Overview389
Concept: Fibonacci Numbers390
Concept: Drawing Lines via Recursion390
Concept: Drawing Lines via Recursion to Create Tree-Like Patterns393
Concept: Drawing Lines via Recursion to Create Tendril-Like Patterns397
Concept: Drawing Squares via Recursion401
Concept: Drawing Triangles via Recursion406
Concept: Drawing Hexagons via Recursion412
CD Library418
Summary420
18Circles and Common Objects421
Overview421
Concept: Drawing Clock-Like Images421
Concept: Drawing 3D Traffic Lights428
Concept: Drawing Iron Gates431
Concept: Drawing Umbrellas437
CD Library442
Summary442
19Loading Images443
Overview443
Concept: Displaying a GIF File443
Concept: Displaying Multiple GIF Files445
Concept: Displaying Grids of GIF Files447
Concept: Displaying Patterns of GIF Files450
Concept: Resizing and Displaying GIF Files453
Concept: Displaying GIF Files as Connected Circles455
Concept: Displaying Digital Dates with GIF Files462
CD Library469
Summary470
20Miscellaneous Graphics471
Overview471
CommonObjects Folder471
Flags Folder473
Miscellaneous Folder474
PlayingCards Folder474
PolarEquations Folder474
Astroids Folder475
PseudoFractals Folder475
Stripes Folder476
Appendix AEssential Mathematical Concepts477
Overview477
Scale Factors478
Essential Trigonometry478
The Pythagorean Theorem480
Slopes of Line Segments482
Trigonometric Identities482
Additional Formulas483
Radians483
Converting between Radians and Degrees484
Circles and Ellipses484
Polar Coordinates487
Polar Coordinates to Cartesian487
Cartesian to Polar Coordinates488
Polygons488
Rotating Points in the Plane489
Mapping (x, y, z) Points to (X, Y) Values489
Appendix BJava Essentials491
Overview491
Terminology in This Book491
Reference Points492
Rectangles492
Ellipses492
Polygons492
Double Buffering493
Miscellaneous493
Bar Graphs495
Coding Style495
Defining Java Classes496
Compiling Java Classes497
Template for Java Classes498
Fast Redrawing via Double Buffering500
Overview of AWT Drawing Methods500
Ellipses500
Arcs501
Circles and Semi-Circles501
Lines501
Rectangles502
Polygons502
Overview of Shading Techniques503
Wire Frames505
Dithering506
Summary506
Appendix CAbout the CD-ROM507
CD Folders507
System Requirements508
Installation509
Index511

Read More

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >