libmgcd -- fast contact detection..

DEMO



About

Documentation

Download

Demo


Links

SourceForge.net Logo












Demo

In this demo, a list of AABBs (Axis-aligned Bounding Box) is fed to the libmgcd library, and libmgcd returns a list of intersecting bodies.

Upload input data file

Please choose the file containing AABB (Axis-aligned Bounding Box) data.
(Limit file size 30 K Bytes)



The format of the input data file

The format of the input data file is quite simple.
1. The first line contains the number of AABBs in the system (NUM) and the number of dimensions of the system.
2. The second line contains the name or title of the data file. It can be blank if desired.
3. The rest of the file is composed of one line for each AABB in the system. Each AABB is designated by the number, the x/y/z coordinate values and then the half lengths of x/y/z dimensions. These AABBs should be numbered from 1 to NUM orderly. Separate each value by at least 1 space. There is no strict format for these lines.


Below is an example for a 2D problem.
9 2
MagicSquare.dat, 3x3 magic square, neighboring cells overlap slightly
1 2.0 1.0 0.6 0.6
2 0.0 2.0 0.6 0.6
3 1.0 0.0 0.6 0.6
4 0.0 0.0 0.6 0.6
5 1.0 1.0 0.6 0.6
6 2.0 2.0 0.6 0.6
7 1.0 2.0 0.6 0.6
8 2.0 0.0 0.6 0.6
9 0.0 1.0 0.6 0.6


Below is an example for a 3D problem.
27 3
MagicCube.dat, 3x3x3 simple magic cube, neighboring cells overlap slightly.
1 1.0 2.0 1.0 0.6 0.6 0.6
2 0.0 0.0 1.0 0.6 0.6 0.6
3 2.0 1.0 1.0 0.6 0.6 0.6
4 1.0 0.0 0.0 0.6 0.6 0.6
5 0.0 1.0 0.0 0.6 0.6 0.6
6 2.0 2.0 0.0 0.6 0.6 0.6
7 1.0 1.0 2.0 0.6 0.6 0.6
8 0.0 2.0 2.0 0.6 0.6 0.6
9 2.0 0.0 2.0 0.6 0.6 0.6
10 2.0 2.0 2.0 0.6 0.6 0.6
11 1.0 0.0 2.0 0.6 0.6 0.6
12 0.0 1.0 2.0 0.6 0.6 0.6
13 2.0 0.0 1.0 0.6 0.6 0.6
14 1.0 1.0 1.0 0.6 0.6 0.6
15 0.0 2.0 1.0 0.6 0.6 0.6
16 2.0 1.0 0.0 0.6 0.6 0.6
17 1.0 2.0 0.0 0.6 0.6 0.6
18 0.0 0.0 0.0 0.6 0.6 0.6
19 0.0 2.0 0.0 0.6 0.6 0.6
20 2.0 0.0 0.0 0.6 0.6 0.6
21 1.0 1.0 0.0 0.6 0.6 0.6
22 0.0 0.0 2.0 0.6 0.6 0.6
23 2.0 1.0 2.0 0.6 0.6 0.6
24 1.0 2.0 2.0 0.6 0.6 0.6
25 0.0 1.0 1.0 0.6 0.6 0.6
26 2.0 2.0 1.0 0.6 0.6 0.6
27 1.0 0.0 1.0 0.6 0.6 0.6


Upload input data file

Please choose the file containing AABB (Axis-aligned Bounding Box) data.
(Limit file size 30 K Bytes)