rent-now

Rent More, Save More! Use code: ECRENTAL

5% off 1 book, 7% off 2 books, 10% off 3+ books

9780471355991

Visual Basic Graphics Programming Hands-On Applications and Advanced Color Development

by Stephens, Rod
  • ISBN13:

    9780471355991

  • ISBN10:

    0471355992

  • Edition: 2nd
  • Format: Paperback
  • Copyright: 1999-11-10
  • Publisher: Wiley
  • Purchase Benefits
List Price: $60.00 Save up to $0.06
  • Buy New
    $59.94
    Add to Cart Free Shipping Icon Free Shipping

    PRINT ON DEMAND: 2-4 WEEKS. THIS ITEM CANNOT BE CANCELLED OR RETURNED.

Summary

All the tools you need to create the full range of Visual Basic(r) color graphics applications Expert Rod Stephens provides you with everything you need to add advanced graphics to your applications in this in-depth introduction to graphic programming with Microsoft Visual Basic. From images using as few as 16 colors to "true-color" applications that use more than 16 million, he shows you how to create the full range of color graphics applications. You'll learn how to use Visual Basic controls to create impressive graphic effects without having to buy expensive add-on products. This book/CD-ROM package also explains how to integrate imaging, animation, and two- and three-dimensional graphics into an application. And you'll find the tools to manipulate color images, overlay one image on another, build scrolled windows, and much more. The Second Edition covers: * New API functions * Bitmap image morphing * New algorithms for hidden surface removal * Print preview with multiple pages and scales * Image processing, including high color and true color * Examples of controlling animation using simulation * New examples that demonstrate shape-distorting transformations * New examples of fractals and tilings * Gouraud shading, Phong shading, and texturing * Ray tracing speed improvements * Ray tracing for new kinds of objects The CD-ROM includes: * More than 400 complete, ready-to-run example programs * Pictures to use with the example programs * Images generated by the programs * Color images of many of the figures from the book * Source code for all example programs from the First Edition

Author Biography

<b>Rod Stephens</B> is a contract software engineer specializing in graphical user interface, algorithms, and database systems. He has published over 120 articles and nine books including Bug Proofing Visual Basic and Ready-to-Run Visual Basic Algorithms.

Table of Contents

Introduction xiii
Part One: Working with Windows 1(162)
Chapter 1 Visual Basics
3(52)
Visual Basic Coordinate Systems
3(10)
Custom Coordinates
5(3)
Coordinate Overflow
8(1)
Scale Conversions
8(1)
Size and Positioning
9(1)
Interior Sizing
10(3)
The Move Method
13(1)
Graphic Container Controls
13(14)
Line Method
14(1)
Circle Method
15(5)
PaintPicture Method
20(2)
PSet Method
22(2)
Point Method
24(1)
Print Method
25(2)
Scrolled Windows
27(3)
Scrolled Windows Controls
30(1)
When to Draw
30(4)
AutoRedraw Property
31(1)
Paint Events
31(1)
Redrawing During Resize Events
31(3)
Controlling Controls
34(13)
Text Properties
35(3)
Other Graphic Properties
38(9)
Graphical Controls
47(2)
Image Control
47(1)
Label Control
48(1)
Line Control
48(1)
Shape Control
49(1)
Color
49(5)
RGB Colors
50(1)
System Colors
50(2)
Decomposing Colors
52(1)
QBColor
53(1)
Summary
54(1)
Chapter 2 Using the API
55(26)
The Genie
55(1)
Using the API
56(9)
Identifying the Routine
56(1)
Defining Data Structures
56(2)
Declaring the Routine
58(5)
Calling the Routine
63(2)
Useful API Functions
65(15)
Drawing
65(7)
Drawing Attributes
72(6)
Metafiles
78(2)
Summary
80(1)
Chapter 3 Advanced Color
81(32)
Color Models
81(3)
Bitmaps
84(7)
Device-Dependent Bitmaps
84(5)
Device-Independent Bitmaps
89(2)
Color Palettes
91(20)
Static Colors
94(1)
Inverting Static Colors
94(2)
Colors in Visual Basic
96(15)
Summary
111(2)
Chapter 4 Advanced Text
113(28)
Multiple Colors and Fonts
114(3)
Text Metrics
117(2)
CreateFont Function
119(15)
Height
120(1)
Width
120(1)
Escapement
120(1)
Orientation
121(1)
Weight
121(1)
Italic, Underline, StrikeOut
122(1)
CharacterSet
122(1)
OutputPrecision
123(1)
ClipPrecision
123(1)
Quality
124(1)
PitchAndFamily
124(1)
Face
125(1)
Standard Fonts
125(1)
Programming with CreateFont
126(1)
Curved Text
127(4)
Centering Rotated Text
131(3)
Editable Text
134(5)
Summary
139(2)
Chapter 5 Printing
141(22)
Printer Objects
141(1)
Selecting a Printer
142(2)
Printer Properties
144(2)
Printer Control Methods
146(1)
The PrintForm Method
146(1)
High-Resolution Printing
147(1)
Printing Text
148(2)
Print Preview
150(2)
Multipage Print Preview
152(4)
Printer Scale Properties
156(2)
Scaling Objects to Fit
158(2)
High Resolution PrintForm
160(2)
Summary
162(1)
Part Two: Image Processing 163(60)
Chapter 6 Point Processes
165(26)
Obtaining Images
165(1)
Programming Tools
166(5)
LoadPicture
166(1)
LoadImage
167(2)
SavePicture Routine
169(1)
Point and PSet Functions
170(1)
Point Processes
171(14)
Grayscale
171(2)
Complement
173(1)
Brightness
174(1)
Color Balance
175(1)
Contrast
176(6)
Binary Contrast Enhancement
182(3)
Multiple Image Processing
185(5)
Image Subtraction
186(1)
Image Averaging
187(1)
Image Compositing
188(2)
Summary
190(1)
Chapter 7 Area Processes
191(32)
Spatial Filtering
191(12)
Initializing Kernels
195(1)
Low-Pass Filters
196(1)
Unsharp Masking
197(1)
High-Pass Filters
197(3)
Edge Detection
200(2)
Embossing
202(1)
Restricting an Operation Using a Mask
202(1)
Summary of Spatial Filters
203(1)
Rank Filters
203(1)
Geometric Transformations
204(18)
Bilinear Interpolation
205(2)
A Transformation Framework
207(2)
Enlargement
209(2)
Reduction
211(2)
Cheating with LoadImage
213(2)
Rotation
215(3)
Reflection
218(1)
Complex Reflection
219(2)
Shape-Distorting Transformation
221(1)
Summary
222(1)
Part Three: Animation 223(56)
Chapter 8 Bitmap Animation
225(20)
Animation Basics
225(11)
Timing Is Everything
226(1)
Timing in Visual Basic
227(1)
Fast Display
227(1)
Timer Controls
228(2)
Clock Watching
230(1)
Displaying Files Directly
231(1)
Storing Image Bits
232(3)
The Need for Speed
235(1)
Drawing Animation
236(8)
Clear and Redraw
237(4)
Save and Restore
241(2)
Using the API
243(1)
Summary
244(1)
Chapter 9 Advanced Animation
245(34)
Controlling Animation
245(8)
Simulation
245(3)
Scripts
248(2)
Sprites
250(3)
Tweening and Morphing
253(9)
Tweening
254(5)
Morphing
259(3)
Specialized Animation
262(15)
Scene Transitions
263(8)
Screen Savers
271(5)
Animating Program Icons
276(1)
Summary
277(2)
Part Four: Two-Dimensional Graphics 279(138)
Chapter 10 Fractals and Tilings
281(42)
Fractals
281(37)
Trees
282(6)
Snowflakes
288(8)
Space-Filling Curves
296(6)
Gaskets
302(6)
The Mandelbrot Set
308(5)
Julia Sets
313(3)
Strange Attractors
316(2)
Tilings
318(3)
Summary
321(2)
Chapter 11 Drawing Curves
323(40)
Lines and Circles
323(1)
Parametric Curves
324(6)
DrawCurve
325(2)
Rotating Points
327(3)
Curve Fitting
330(1)
Polynomial Curve Fitting
331(13)
Linear Least Squares
331(3)
Quadratic Least Squares
334(2)
Higher-Order Least Squares
336(8)
Parametric Curve Fitting
344(17)
Hermite Curves
344(4)
Bezier Curves
348(3)
Higher-Order Bezier Curves
351(2)
B-Splines
353(5)
Closed B-Splines
358(3)
Summary
361(2)
Chapter 12 Two-Dimensional Transformations
363(54)
Modeling Two-Dimensional Objects
363(6)
Windows and Viewports
369(15)
Panning and Zooming
369(2)
Aspect Ratios
371(4)
Windows and Viewports in Visual Basic
375(2)
Zooming and Panning in Visual Basic
377(7)
Two-Dimensional Transformations
384(24)
Simple Transformations
385(3)
Combining Transformations
388(7)
Transformation Matrices in Visual Basic
395(6)
Vector and Matrix Operations in Visual Basic
401(2)
Transforming Objects
403(1)
Shape-Distorting Transformations
404(3)
Treating Types of Transformation Differently
407(1)
Display Data Structure
408(8)
Quadtrees
409(1)
Locating Objects
409(1)
Quadtrees in Visual Basic
410(1)
A Quadtree Implementation
411(5)
Summary
416(1)
Part Five: Three-Dimensional Graphics 417(226)
Chapter 13 Three-Dimensional Transformations
419(46)
Simple Transformations
419(10)
Homogeneous Coordinates
420(1)
Vector and Matrix Operations in Visual Basic
420(2)
Translation
422(1)
Scaling
423(1)
Reflection
424(1)
Right-Handed Coordinates
425(1)
Rotation
426(3)
Inverse Transformations
429(1)
Projections
429(13)
Parallel Projection
430(8)
Perspective Projection
438(4)
Summary of Projections
442(1)
Perspective Viewing
442(4)
Composing Transformations
446(15)
Scaling without Translation
446(1)
Reflection across an Arbitrary Plane
447(5)
Rotation around an Arbitrary Line
452(2)
Projection onto an Arbitrary Plane
454(1)
The UP Vector
455(1)
Using Subroutine m3Project
456(3)
Spherical Coordinates
459(2)
Three-Dimensional Objects
461(3)
Summary
464(1)
Chapter 14 Surfaces
465(66)
Simple Surfaces
465(33)
Grids
466(15)
The Hi-Lo Algorithm
481(9)
The Z-Order Algorithm
490(2)
Fractal Surfaces
492(6)
Parametric Surfaces
498(16)
Bezier Surfaces
499(7)
B-Splines
506(8)
Surfaces of Transformation
514(16)
Extruded Surfaces
514(6)
Surfaces of Revolution
520(4)
Other Surfaces of Transformation
524(6)
Summary
530(1)
Chapter 15 Hidden Surface Removal
531(30)
Backface Removal
531(8)
Finding Surface Normals
532(1)
Testing Angles with Normals
533(1)
Putting It All Together
534(1)
Convex Solids
534(1)
Backface Removal in Visual Basic
535(4)
Depth-Sort
539(20)
Nonconvex Solids
541(13)
Surfaces Revisited
554(5)
Summary
559(2)
Chapter 16 Shading Models
561(24)
The Physics of Lighting
561(1)
Diffuse Reflection
562(4)
Ambient Light
566(1)
Distance
567(3)
Specular Reflection
570(6)
Smooth Shading
576(7)
Gouraud Shading
576(5)
Phong Shading
581(2)
Summary
583(2)
Chapter 17 Ray Tracing
585(58)
A Brief Warning
587(1)
Ray-Tracing Basics
587(2)
Ray-Tracing in Visual Basic
589(9)
Calculating Hit Color
592(1)
Tracing Rays
593(4)
Performance
597(1)
Bounding Volumes
598(1)
Scanline Culling
599(2)
Other Objects
601(21)
Planes
601(4)
Disks
605(3)
Polygons
608(3)
Checkerboards
611(3)
Cylinders
614(8)
Recursive Ray Tracing
622(14)
Reflected Light
623(2)
Transparent Surfaces
625(9)
Assumptions
634(2)
Adaptive Depth Control
636(1)
Texture Mapping
637(4)
Normal Perturbation
637(1)
Environment Mapping
638(1)
Special Environment Mapping
639(2)
Summary
641(2)
Part Six Beyond Three Dimensions 643(50)
Chapter 18 Higher-Dimensional Transformations
645(18)
Temporal Projection
645(2)
Spatial Projection
647(1)
Four-Dimensional Transformations
647(14)
Homogeneous Coordinates
648(1)
Translation
648(1)
Scaling
649(1)
Reflection
649(1)
Rotation
650(1)
Inverse Transformations
651(1)
Projections
651(5)
Rotating a Hypercube
656(1)
Folding a Hypercube
656(5)
Summary
661(2)
Chapter 19 Mathematical Tools
663(30)
Vectors and Matrices
663(7)
Vector Arithmetic
664(1)
Vector Length
665(1)
Dot Product
665(1)
Projection of a Vector onto a Vector
666(1)
Cross Product
667(1)
Matrix-Vector Multiplication
668(1)
Matrix-Matrix Multiplication
669(1)
Transformation Matrices
670(5)
Two-Dimensional Transformations
670(1)
Three-Dimensional Transformations
670(3)
Four-Dimensional Transformations
673(1)
Spherical Coordinates
674(1)
Distances
675(3)
Point-to-Point
675(1)
Point-to-Line
675(1)
Point-to-Plane
676(1)
Line-to-Line
677(1)
Plane-to-Plane
677(1)
Platonic Solids
678(14)
Regular Solids
679(1)
Duals
679(1)
Tetrahedron
680(3)
Cube
683(1)
Octahedron
684(1)
Dodecahedron
684(5)
Icosahedron
689(3)
Summary
692(1)
Index 693

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program