![]() |
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Index C++ Code Documentation geom::surface0::Vertex File: GEOM/geom/surface0/Vertex.H Vertex data structure A Vertex represents a point on a surface. There are two projection modes: central and stereographic. A Vertex is exported according to the projection mode. Let N = the dimension of the ambient space of the surface. A Vertex stores N+2 real numbers (v[0]...v[N+1]). In the following comments, these are called (y[1]...y[N], y[0], y[inf]). In central projection mode, only the first N+1 real numbers (y[1]...y[N], y[0]) are used. The last real number y[inf] is not used. The first N+1 coordinates are interpreted as homogeneous coordinates in RP^N. The Vertex is exported in either of two ways: point in RP^N: [ y[1] ... y[N] ] point in R^N via central projection: ( y[1] ... y[N-1] ) / y[N] In stereographic projection mode, all N+2 real numbers are used. First, comments in a different coordinate system x[1]...x[N],x[0],x[inf]. The last real number x[inf] is precomputed so that (x[1]...x[N],x[0],x[inf]) lies in the projective quadric Q: x[1]^2 + ... + x[N]^2 + x[0]^2 - x[inf]^2 = 0. The Vertex is exported as point in RP^(N+1): [ x[0] ... x[N], x[inf] - x[0] ] point in R^N via stereographic projection: ( x[1] ... x[N] ) / (x[inf] - x[0]) The numbers x[1]...x[N],x[0],x[inf] are stored in a memory-efficient way, namely as y[1]...y[n],y[0],y[inf] where y[1] = x[1] ... y[N] = x[N] y[0] = x[inf]-x[0] y[inf] = x[inf] + x[0] so x[1] = y[1] ... x[N] = y[N] x[0] = (y[inf]-y[0])/2 x[inf] = (y[inf] + y[0])/2 Under this change of coordinates, the quadric Q: x[1]^2 + ... + x[N]^2 + x[0]^2 - x[inf]^2 = 0. becomes Q': y[1]^2 + ... + y[N]^2 - y[0] y[inf] = 0. Thus y[inf] is computed as y[inf] = (y[1]^2 + ... + y[N]^2)/y[0]. public:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|