3D Theory - Raytracing

There are two methods of creating a 2 dimensional image from the 3 dimensional information about the scene:

We have already looked at openGL where the colour and brightness are determined by the angle between the camera, the polygon and the sources of light.

Ray tracing is more accurate, but also more computationally intensive.


A ray is sent out from each pixel of the camera, when it hits something one or more reflected rays are generated until we reach a source of light. That it we work backwards in the opposite direction to which the photons of light travel.

Although ray tracing is more computationally intensive it is more accurate, especially when shadows or ra fraction of light (such as surface of water) are involved, these are more difficult to do with a render pipeline like openGL.

metadata block
see also:
Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.


cover Graphics Gems - Lots of useful algorithms and snippets of theory - These are reference books rather than books you read from cover to cover. If you can afford it they are worth having on the shelf (I wish I could!) They might just solve a problem which could otherwise take days to work out.

cover Graphics Gems II

cover Graphic Gems III: IBM Version (with diskette)

cover Graphics Gems IV: IBM Version (with Diskette)

cover Graphics Gems V: IBM Version (with disk)

Commercial Software Shop

Where I can, I have put links to Amazon for commercial software, not directly related to this site, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them.


cover Dark Basic Professional Edition - It is better to get this professional edition

cover This is a version of basic designed for building games, for example to rotate a cube you might do the following:
make object cube 1,100
for x=1 to 360
rotate object 1,x,x,0
next x

cover Game Programming with Darkbasic - book for above software

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2015 Martin John Baker - All rights reserved - privacy policy.