
From Pixels to Animation
An Introduction to Graphics Programming
- 1st Edition - January 1, 1994
- Imprint: Academic Press
- Author: James Alan Farrell
- Language: English
- eBook ISBN:9 7 8 - 1 - 4 8 3 2 - 6 5 6 8 - 1
From Pixels to Animation: An Introduction to Graphics Programming deals with the C programming language, particularly for the Borland C and Microsoft C languages. The book reviews… Read more

Purchase options

Institutional subscription on ScienceDirect
Request a sales quoteFrom Pixels to Animation: An Introduction to Graphics Programming deals with the C programming language, particularly for the Borland C and Microsoft C languages. The book reviews the basics of graphics programming, including graphics hardware, graphs, charts, changing colors, 3D graphics, high level functions provided by Borland and Microsoft C. The text also explains low-level graphics, getting around the limitations of standard, graphics libraries, SVGA programming, and creating graphics functions. Advanced topics include linear transformations, ray tracing, and fractals. The book explains in detail the aspect ratio of pixels (length of the pixel dot divided by its width), pixel colors, line styles, and the functions to create the graphic. The text also describes the presentation of a three-dimensional object by using perspective, shading, and texturing. Between the operating system, which carries out the instruction of the program, and the hardware, which displays the output of the program, is the Basic Input/Output Services (BIOS). The BIOS is a set of routine instruction inside the different parts or hardware devices in the computer. The book explains programing animation effects by utilizing routines provided by Microsoft or Borland. The text also notes that a programmer can create good animation effects by directly addressing the graphics adapter, bypassing the BIOS or the high-level routines created by Microsoft or Borland. The book is suitable for beginning programmers, computer science, operators, animators, and artists involved with computer aided designs.
PrefaceChapter 1 Graphics Displays Overview The Basic Monochrome Monitor Pixels and the Frame Buffer Other Things that are Good to Know A More Advanced Monochrome Monitor Dot Pitch Color Monitors Color Mixing Additive and Subtractive Color Mixing How Color Monitors Work Color Palettes and the Color Frame Buffer IBM PC Monitors The Hercules Monitor The CGA Monitor The EGA Monitor The MCGA Monitor The VGA Monitor SVGA MonitorsChapter 2 The Borland Graphics Interface Setting Up to do Graphics Initgraph( ) and Detectgraph( ) Graphresult( ) and Grapherrormsg( ) Getgraphmode( ), Setgraphmode( ) Closegraph( ) Graphics Primitives Pixels and Putpixel( ) Getmaxx( ), Getmaxy( ) and Getmaxcolor( ) Cleardevice( ) Lines Lineto( ), Linerel( ), Moveto( ), Moverel( ) Circles, Ellipses, Arcs, and Sectors Drawpoly( ) and Rectangle( ) More Advanced Primitives Line Styles Filling Things: Fillpoly( ), Fillellipse( ), Floodfill( ) Changing Fill Styles and the Fill Color Linking .BGI Files into a Program BGIOBJ.EXE Methods of LinkingChapter 3 Text in Graphics Modes Fonts Borland Supplied Fonts Bitmapped Triplex Small SanSerif Gothic Creating New Fonts Creating a Bitmapped Font Creating a Stroked FontChapter 4 Microsoft C Graphics Setting Up to do Graphics _Setvideomode( ) and _Getvideoconfig( ) Graphics Primitives _Setpixel( ), _Setcolor( ) Viewports and Windows _Clearscreen( ) Drawing Lines Drawing Circles, Ellipses, Arcs, and Pie Slices Drawing Rectangles and Polygons Patterned Lines Filling Shapes Text in Graphics Mode Registering Fonts Setting the Current Font Writing Text in Graphics ModeChapter 5 Graphs and Charts Graphing Data Cartesian Coordinates Polar Coordinates Drawing Charts Bar Charts Pie ChartsChapter 6 Color Models and Programming Colors Color Mixing and Color Models The CMY and RGB Color Models Other Color Models Changing the Palette The VGA Monitor Half-Toning and Dithering Dithering Half-Toning Programming the CGAChapter 7 Three-Dimensional Graphics Perspective Projecting a 3D Image Onto a 2D Screen Single Vanishing Point Perspective Double Vanishing Point Perspective Shading Texturing Texturing and Reflection Texturing and PerspectiveChapter 8 The BIOS Graphics Interface DOS and BIOS Layers of DOS Communicating with DOS and BIOS BIOS Interrupt 0x10 Graphics Services Setting Pixels Using BIOS Clearing the Screen using BIOS Changing Color Palettes Using BIOSChapter 9 SVGA Programming VESA SVGA Graphics Modes SVGA BIOS Interrupts SVGA BIOS Service 0x00—Return SVGA Information SVGA BIOS Service 0x01—Return Mode Information SVGA BIOS Service 0x02—Setting the Video Mode Plotting Pixels on SVGA Monitors The SVGA Library Functions in SVGALib Inside SVGALib Global Variables SVGALib FunctionsChapter 10 Creating Your Own Graphics Primitives Drawing Lines The Obvious Method Bresenham's Method Drawing Circles Drawing Ellipses Drawing ArcsChapter 11 Filling Primitives SVGA_Set_Fil_Pattern( ) The Fill_Line( ) Function SVGA_Fill_Rectangle( ) and SVGA_Fill_Ellipse( ) SVGA_Floodfill( ) SVGA_Polyfill( )Chapter 12 Animation Simple Animation Using Getimage( ) and Putimage( ) for Animation Using Paging Animation by Manipulating ColorsChapter 13 Linear Transformations in Computer Graphics Matrices for C Programmers Linear Transformations in Graphics An Example: Rotating an Ellipse Other Transformations Translation Rotation with a 3 x 3 Matrix Scaling Shear in X Shear in Y Mirror Across the X Axis Mirror Across the Y Axis Mirror Across Both Axes MiscellaneousChapter 14 Ray Tracing Theory of Ray Tracing Tracing a Ray in Two Dimensions 3D Cartesian Geometry 3D Coordinate Space Lines in 3 Dimensions Surfaces in 3 Dimensions Ellipses in 3 Dimensions Refraction Ray Tracing in 3 Dimensions Representing a 3D World in the Computer Practical Concerns Other SuggestionsChapter 15 Fractals The History of Fractals Problems with Conventional Math Fractional Dimensions Cellular Automata Chaos The Mandelbrot Set Fractals Practical Fractals A Simplified Symmetric Tree A Less Simplified Asymmetric Tree A Surprisingly Realistic Tree A Windblown Tree Other Shapes How Fractals Model Nature Iterated Function Systems Sierpinsky's Triangle Again A Deeper look at Self-Similarity The Iterated Function SystemAppendix A Borland Graphies InterfaceAppendix B Microsoft Graphies FunctionsAppendix C SVGALib Constants and FunctionsAppendix D Interrupt 0x10, BIOS Graphies InterfaceAppendix E VESA VBE 1.2 SVGA Data Structures and FunctionsAppendix F PC Monitor ModesAppendix G Mouse BIOS FunctionsAppendix H IBM PC Extended ASCII CodesAppendix I The IBM PC KeyboardIndex
- Edition: 1
- Published: January 1, 1994
- No. of pages (eBook): 692
- Imprint: Academic Press
- Language: English
- eBook ISBN: 9781483265681
Read From Pixels to Animation on ScienceDirect