Symbolic Continuous Collision Detection (CCD) using Mathematica.
src:roots_ee.wl/roots_vf.wl: Mathematica sources for computing the CCD rootscompare_toi.wl: Utility for comparing TOI accuracy
scripts: Python scripts we used to process our dataset- These scripts call the Mathematica code using the
wolframclientpackage
- These scripts call the Mathematica code using the
hpc: Scripts designed for an HPC environment where jobs can be dispatched to process queries
The source files roots_ee.wl and roots_vf.wl each contains a root function that performs CCD using symbolic mathematics and returns a Boolean answer. Optionally, you can provide an outfile argument to save the symbolic expressions for the roots to a .wxf Mathematica file.
The input data is an
- Edge-edge queries:
ea0_t0,ea1_t0,eb0_t0,eb1_t0,ea0_t1,ea1_t1,eb0_t1,eb1_t1whereaorbindicates which edge,0or1indicates the end-point of the edge, andt0ort1indicates the starting or ending positions of the edge. - Vertex-face queries:
v_t0,f0_t0,f1_t0,f2_t0,v_t1,f0_t1,f1_t1,f2_t1wherevindicates the vertex,f0,f1, orf2indicates the face vertices, andt0ort1indicates the starting or ending positions of the vertex.
Each pair of columns (1/2, 3/4, and 5/6) comprise a single rational number for the x, y, and z coordinates of the vertex, respectively.
- If you want the TOI and not only the Boolean result, you can modify the
rootsfunctions to return them in your desired format. - We chose to use rational numbers because we saved our data from C++ and found it was the only reliable way to transfer the data unchanged from C++ to Python to Mathematica (esp., cross-platform and for data longevity).
- You can try changing the input data format to an
$8\times3$ matrix of doubles, but this may or may not introduce a round-off error.
- You can try changing the input data format to an