Sie sind auf Seite 1von 6

# OpenGL 3D: 3D Modeling Techniques 1.

Recursive subdivision

2. Revolution (lathing)

3. Extrusion

## 4. Manual assembly from primitives

OpenGL 3D: Glut 3D Primitives void void void void void void glutSolidSphere (Gldouble radius, Glint slices, Glint stacks); glutWireSphere (Gldouble radius, Glint slices, Glint stacks); glutSolidCube (Gldouble size); glutWireCube (Gldouble size); glutSolidCone (Gldouble base, Gldouble height, Glint slices, Glint stacks); glutWireCone (Gldouble base, Gldouble height, Glint slices, Glint stacks);

void glutSolidTorus (GldoubleinnerRadius, Gldouble outerRadius, Glint nsides, Glint rings); void glutWireTorus (GldoubleinnerRadius, Gldouble outerRadius, Glint nsides, Glint rings); void void void void void void void void void void glutSolidDodecahedron (void); glutWireDodecahedron (void); glutSolidOctahedron (void); glutWireOctahedron (void); glutSolidTetrahedron (void); glutWireTetrahedron (void); glutSolidIcosahedron (void); glutWireIcosahedron (void); glutSolidTeapot (Gldouble size); glutWireTeapot (Gldouble size);

## Components: Slices Stacks Normals

OpenGL 3D: Quadrics Curves of form a1 x2 + a2 y 2 + a3 z 2 + a4 xy + a5 yz + a6 xz + a7 x + a8 y + a9 z + a10 = 0 Steps in using: 1. Create quadric objects GLUquadricObj* gluNewQuadric(void); Generally only create one May be used for many shapes 2. Specify attributes void gluQuadricDrawStyle(GLUquadricObj *obj, GLenum drawStyle); drawStyle: GLU POINT, GLU LINE, GLU SILHOUETTE, GLU FILL void gluQuadricOrientation(GLUquadricObj *obj, GLenum orientation); orientation: GLU OUTSIDE, GLU INSIDE void gluQuadricNormals(GLUquadricObj *obj, GLenum normals); normals: GLU NONE, GLU FLAT, GLU SMOOTH void gluQuadricTexture(GLUquadricObj *obj, GLboolean textureCoords); textureCoords: GL TRUE, GL FALSE 3. Register error handler void gluQuadricCallback(GLUquadricObj *obj, GLenum type, void(*fn(GLenum)); type: GLU ERROR