Abstract
One of the main problems of 3D-computer graphics is the description of geometrical objects. The most straightforward way is to give the computer a list of all the vertices, including a list that explains how to connect these vertices to faces or edges, respectively. Then the computer can apply a general hidden-line or hidden-surface algorithm.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
The C preprocessor will replace the constant by the result of the shift operation every time it appears in the code.
Pointers into pools will often begin with the prefix “cur.” (which stands for “current” or, if you want, for “cursor”). This indicates that they will usually run through loops. The upper limit of such a loop will frequently also be a pointer of the same type, the name of which will usually have the prefix “hi...”,
If you do not cast the function mem-alloc(), you will at least get a warning message from the compiler.
We would prefer to simply write Face **neighbor.faces. However, this is not possible, because the compiler does not yet know about the structure Face.
A “palette” in our sense is a chart of different shades of one and the same color. Therefore, the constant PALETTESIZE means the number of the different shades of one single color.
In TURBO C use the function ItoaQ instead.
Memory organization can be a “bottleneck” even in fast programs.
With many systems, the amount of bytes that are allocated by the function mallocQ is always divisible by 8. If we allocate space for the three pointers of a triangle (which need 12 bytes), the system will provide 16 bytes and some memory will be wasted.
The keyword static is essential for those local pointer variables that are used for a dynamic allocation of the memory that is needed outside the function. It prevents an error that is hard to find and that causes a program to do strange things or to crash later on.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 1994 Springer Science+Business Media New York
About this chapter
Cite this chapter
Glaeser, G. (1994). How to Describe Three-Dimensional Objects. In: Fast Algorithms for 3D-Graphics. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-25798-2_3
Download citation
DOI: https://doi.org/10.1007/978-3-662-25798-2_3
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-94288-7
Online ISBN: 978-3-662-25798-2
eBook Packages: Springer Book Archive