






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







The more polygons in your scene, the more processing yourscene demands. Less polygons = faster rendering.
gluPerspective(45, 1, 0.01, 1000)
gluPerspective(45, 1, 1, 100)
The second will look
much
nicer than the first, because from
0.01 to 1000 is 10
to 10
3
; that’s five orders of magnitude.
Whereas from 1 to 100 is from 10
0
to 10
2
; much less range,
so GL can store more z-buffer detail about the smaller range.
Matrix operations--especially inversions--are slow andexpensive. Avoid them when possible.
void render(void){
static
GLuint n =
if (!n) {
n = glGenLists(1);glNewList(n, GL_COMPILE_AND_EXECUTE);glutWireSphere(1,10,10);...glEndList(); } else
glCallList(n);
When you render, you draw pixels onto a big 2D array of colorvalues (the screen).
Each pixel comes from a polygon on an object somewhere.
That spot on that object is a certain distance from the camera.
Z-buffer
is a 2D array, the same size as the screen, of
distances from the camera. For each pixel on the screen, a z-buffer stores how far away the spot that generated that pixelwas.
When a new polygon is drawn over an older one, the z-buffervalues are compared for each pixel. Only those pixels wherethe new color comes from a closer distance are drawn.
That’s how objects occlude one another.
Organic forms and nonlinear shapes
Scientific modelling (electron orbitals, some medical imaging)
Muscles and joints with skin
Rapid prototyping
CAD/CAM solid geometry
Paul Bourke(1997)
“Cabrit Model” - Wyvill
Each point in space generates a field of force, which drops offas a function of distance from the point; like gravity weakeningwith distance.
A blobby model is formed from the shells of these force fields,the implicit surface which they define in space.
An
implicit surface
is a surface consisting of all the points in
space where a mathematical function (in this case, the valueof the force field) has a particular key value (such as 0.5).
Force = 2
1 0.5 0. ...