Advanced Graphics on VGA and XGA Cards Using Borland C++ by Ian O. Angell

By Ian O. Angell

This e-book exploits the mixed merits of an object-orientated method of programming, the consumer pleasant surroundings of Borland C++, and the top of the range special effects available with VGA and XGA photo adapters operating on IBM PS/2 (and suitable) machines. issues akin to modelling and transformation of items, hidden floor elimination, gentle shading, shadows, transparency and reflections are coated. an evidence of these kind of suggestions, the underlying arithmetic and knowledge constructions is supplied via the authors. This ebook will allow readers, even if an person built with an appropriate microcomputer, or a pupil taking a complicated functional direction in special effects, to procure huge services during this region of visible verbal exchange. This ebook could be of curiosity to undergraduates and machine lovers attracted to programming.

Show description

Read or Download Advanced Graphics on VGA and XGA Cards Using Borland C++ PDF

Best c & c++ books

A Numerical Library in C for Scientists and Engineers

It is a large library of c exercises to just do approximately whatever. the one sore spots are a few of the vector and matrix workouts. they're divided up in order that a few extremely simple operations require numerous workouts. after all this was once performed for flexibility, yet a few could locate that writing their very own is extra effective.

Objects, Abstraction, Data Structures and Design: Using C++

Imagine, Then CodeWhen it involves writing code, instruction is important to good fortune. earlier than you can start writing profitable code, you want to first paintings via your ideas and research the anticipated functionality of your layout. Thats why Elliot Koffman and Paul Wolfgangs gadgets, Abstraction, facts buildings, and layout: utilizing C++ encourages you to imagine, Then Code, that can assist you make reliable judgements in these serious first steps within the software program layout strategy.

Algorithms in a nutshell

Developing strong software program calls for using effective algorithms, yet programmers seldom take into consideration them until eventually an issue happens. This up to date version of Algorithms in a Nutshell describes a lot of latest algorithms for fixing numerous difficulties, and is helping you decide and enforce the best set of rules in your needs—with barely enough math to allow you to comprehend and examine set of rules functionality.

Additional info for Advanced Graphics on VGA and XGA Cards Using Borland C++

Example text

These algorithms colour in each component pixel on the line in a logical colour which is calculated from the line colour and the original colour of the pixel. 1 0 1 2 3 4 s 6 7 Binary bits ()()() 001 010 011 100 101 110 111 OR with 6(110) 110 111 110 111 110 111 110 111 AND with 6 ()()() ()()() 010 010 100 100 110 110 XOR with 6 110 111 100 101 010 011 ()()() 001 Original colour In the book thus far we have used the default line type - that is, a solid line of pixels in the given fixed line colour and intensity that obliterates the original colour of every pixel it covers.

H> #define #define #define #define #define // Needed for a call to function bioskey SPACE 32 UPKEY 328 DOWNKEY 336 LEFTKEY 331 RIGHTKEY 333 Viewport vpt ; 11----------------11 int getkey(void) 11----------------11 II Uses the BIOS to read the next keyboard character { int key, lo, hi ; key = bioskey(O) ; lo = key & OXOOFF ; hi = (key & OXFFOO) >> 8 return((lo == 0) ? y = 100 ; rubber(p1,&p2) ; vpt. 4 Use rubber-banding in a program that modifies a polygon on the viewport. A mouse is used first to indicate a vertex of the polygon, and then it must indicate movement of the chosen vertex about the viewport (the two polygon edges that enter that vertex must also move).

3 Draw a spiral centred on the origin with six turns, and which has an outer radius of six units. A typical point on a spiral of n turns centred on the origin is again of the form (rcose , rsin9), where now 0 < e < 2n1t, and the radius r depends on 9 - it equals the outer radius multiplied by 9/2n1t. Give a general function which centres the spiral of outer radius radius and n turns at any vector2 point centre. Also generalize your function so that the value of 9 now varies between a given angle phi and phi+2n1t.

Download PDF sample

Rated 4.62 of 5 – based on 34 votes

Related posts