conics.15887.pts |
|
Figure 1: f(p)
at
marching cubes |
Figure 2: resultant triangles |
mechpart.4102.pts |
|
Figure 3: f(p)
at
marching cubes |
Figure 4: resultant triangles |
bitset<8> fb
as the
bit code for the cube, where each bit represents
whether each vertex is above the surface
(f(pi)
is positive) or below it
(f(pi)
is negative), such that for each
k
th vertex the bit value is:
fb[k] =
f(pi)
>= 0.0 ? 1 : 0;
index = (int)fb.to_ulong();
cubeEdges = intersections[index];
intersections
list
(with -1 indicating no further records), e.g.,
int intersections[484][7] = {
{-1,-1,-1,-1,-1,-1,-1},
{0,1,0,4,0,2,-1},
{1,5,1,0,1,3,-1},
{0,2,1,3,0,4,262},
{2,3,2,0,2,6,-1},
{0,1,2,6,2,3,264},
...
};
marchingCube.h
and marchingCube.cpp
.
n =
cross(u,v)
and normalizing.
kdtree
program. Load your field file to view it. You can
then check the "cubes" checkbox in the View menu to
see the marching cubes with signed distance at each vertex.
The program was last compiled on a Linux PC running Fedora
Core 3 with g++ v3.4.3 and so should run on most of the
FX net Linux boxes (but not on the Suns).
phase4.tar.gz
) including:
README
file containing assignment and solution
descriptions, e.g., program design, description of algorithm,
etc., if appropriate.
INSTALL
file containing any specific compliation
quirks peculiar to your program, e.g.,
make
.
USAGE
file containing any specific usage quirks
peculiar to your program, e.g.,
./phase4 < conics.15887.pts
where
./phase4
is the executable and
conics.15887.pts
is the input.
src/
directory with source code.