I`m beginning a small project using computer graphics and i wonder if
you could give me a kind of start.
First problem i have ist a polygon in 3d space (n vertices in a plane)
and want to split the polygon in little patches for further calculations.
My first idea ist to transform the plane, so that after transformation
the normal vector of the plane if identical to the z-axis. When finished
transformation i want to place a simple cartesian grid on the plane to
get my patches.
To come to the point: Is there any good literature on such topic you
could advise me or some other technics for such a problem i could use?
Thanks for your help,
Tim
Let the plane contain point P and have unit-length normal N. Let the n
vertices be V[k] for 0 <= k < n. Let U and V be unit-length vectors such
that U, V, and N are mutually perpendicular. You can represent V[k] as
V[k] = P + x[k]*U + y[k]*V + z[k]*N
It must be that z[k] = 0, because V[k] is on the plane. The algebra for
this is
0 = Dot(N, V[k]-P) = x[k]*Dot(N,U) + y[k]*Dot(N,V) + z[k]*Dot(N,N) =
z[k]
Also,
x[k] = Dot(N, V[k] - P), y[k] = Dot(N, V[k] - P)
The 2-tuples (x[k], y[k]) are what you need to process to get patches.
--
Dave Eberly
http://www.geometrictools.com
Are the any basic books, where i can look up such alogrithms?
Thanks a lot,
Tim
Books on vector/matrix algebra, and possibly books on linear algebra.
At the risk of getting flamed for self-promotion, "Geometric Tools for
Computer Graphics" covers these topics. Perhaps you have a university
library nearby that has a copy you can borrow.