home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1998 April A
/
Pcwk4a98.iso
/
PROGRAM
/
DELPHI16
/
Disp3d
/
TEAPOT.DOC
< prev
next >
Wrap
Text File
|
1995-10-08
|
6KB
|
175 lines
Drawing the Utah Teapot
10-08-95
Michael Day
The Utah Teapot is the classic 3D object used to teach 3D
techniques. It was originally digitized by M. Newell in 1975.
The original teapot can be found in the Boston Computer Museum.
For more information see:
Crow F.C. (1987) The Origins of the Teapot. IEEE Computer
Graphics and Applications, 7(1), 8-19.
The Teapot data consists of 306 world coordinate data points.
The data points are divided into bicubic Bezier patches.
There are a total of 32 patches. Twelve patches for the body,
four patches for the handle, four patches for the spout, eight
patches for the lid, and four patches for the bottom.
The Teapot data can be found in the file TEAPOT.DAT. The file
consists of 306 lines of text. Each line contains the vertex
number and the X, Y, and Z world coordinate value respectively.
The 32 bicubic patches are found in the file TEAPOT.PAT. The
patch file contains the 32 bicubic patches as 32 lines of text
each of which contains the 16 vertex points that define the
patches. Note that some points in the patches are null points.
You can tell these because all four points are the same value.
It's not overly important other than to be aware that they exist.
That's all well and fine, but what's a bicubic Bezier patch?
A bicubic patch is a way of breaking down an object into easily
definable pieces. The bicubic patch contains the minimum number
of data points that can be used to define the surface. Each patch
consists of 16 data points. The points are arranged in a 4x4
matrix representing the points on a square surface. Using 16
points instead of only 4 allows the curve of the surface to be
defined.
The bicubic points are arranged like this:
13--14--15--16
| | | |
9--10--11--12
| | | |
5---6---7---8
| | | |
1---2---3---4
There are any number of ways that the information can be used to
draw the object. The simplest way is to only draw the data
points. This is the fastest method since it requires minimal
math. Unfortunately, the object is typically difficult to
visualize since it requires the viewer to connect the dots in
their own mind.
The next level up is to draw lines between the data points
defined by the bicubic patches. This connects the dots for the
observer, but doesn't provide a visual surface. There is also a
problem in that all the lines that represent the surfaces are
visible, including the surfaces that would not be visible in a
real object.
There are any number of ways to implement hidden line removal and
hidden suface removal. They are more complex subjects. I would
recommend studying various graphics texts if you are interested
in the subject.
Graphics books
Programmers's Guide to PC and PS/2 Video Systems
ISBN: 1-55615-103-9
by Richard Wilton
Comments: The best book out there for figuring out
how to program PC video cards. Very well
laid out and easy to read.
Programmer's Guide to the EGA and VGA Cards
by Richard Ferraro
Comments: The book to have for SuperVGA good companion
book with the Wilton book. Use the Wilton book
for the basic stuff, use this book for the
SuperVGA stuff.
Computer Graphics Principles and Practice (2nd ed)
ISBN: 0-201-12110-7
by Foley, vanDam, Feiner, Hughes
Comments: The Bible. Describes the whys and wherefors
of graphics. Very little code, lots of descriptions.
If you want to know how and why things are done the
way they are, this is the book to get.
If you are serious about doing graphics, get this book.
Graphics Gems I,II,III,IV (four books)
pub: Academic Press
Comments: Sample code for every graphic function
your fevered mind can think of.
Bitmapped Graphics
ISBN: 0-8306-3558-0
by Steve Rimmer
Comments: Are you doing bitmapped picture stuff
(PCX/TIFF/etc)? Get this book.
3D Graphics in Pascal
ISBN: 0-471-92451-2
by G. Bielig-Schulz
Comments: Good 3D primer (graphics 101)
If you haven't got a clue about what 3D graphics
is about, but you know Pascal. Try this book.
Fundamentals of Three-Dimentional Computer Graphics
ISBN: 0-201-15442-0
by Alan Watt
Comments: Excellant book on ray tracing.
If you want to start doing ray tracing stuff,
get this book.
An Introduction to Ray Tracing
ISBN: 0-12-286160-4
by Andrew Glassner
Comments: Heavy on the Math. If you want to know the
math behind ray tracing this is the book to get.
Advanced Graphics Programming In Turbo Pascal
ISBN: 1-55851-131-8
by Roger Stevens
Comments: Turbo Pascal code for doing 3D graphics.
Fractal Programming in Turbo Pascal
ISBN: 1-55851-107-5
by Roger Stevens
Comments: Worth having if you are doing fractals
CRC Handbook of Mathmatical Curves and Surfaces
ISBN: 0-8493-0155-6
by David H. von Seggern
Comments: If you can't figure out what this is
from the title, you don't want it.
Computer Graphics a Programming Approach
ISBN: 0-07-026753-7
by Steven Harrington
Comments: Good advanced 3D info. If you can't figure
out the other 3D books, try this one.
Computer Graphics
ISBN: 0-13-165382-2
by Donald Hearn, Pauline Baker
Comments: Graphics 102. If you find the primers too
insulting and the advanced text too hard
try this book.
Tricks of the Graphics Gurus
ISBN: 0-672-30308-6
by Dick Oliver, Scott Anderson, James McCord,
Spyro Gumas, and Bob Zigon
Comments: Describes the popular graphics formats
(TIFF, PCX, GIF, and a few others.
Has good description of doing 2D and 3D animation.
Get this one with the included software to really
be useful.
Practical Ray Tracing in C
ISBN: 0-471-57301-9
by Craig A. Lindley
Comments: Want to learn how to do ray tracing? Try this book.