copyleft.lazy_cage
lazy_cage(V, F, grid_size=50, max_iter=10, num_faces=100, force_output=True)
Constructs a coarse surface fully containing a given mesh
Given a fine triangle mesh, output a coarser cage triangle mesh that fully contains the input, useful for animation and physics-based simulation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
V |
numpy double array
|
Matrix of vertex coordinates |
required |
F |
numpy int array
|
Matrix of triangle indices |
required |
grid_size |
int, optional (default 50)
|
Size of the grid on which distances are computed during cage construction (higher should give a more tightly fitting cage) |
50
|
max_iter |
int, optional (default 10)
|
Iterations in cage construction binary search (more gives a more tightly fitting cage) |
10
|
num_faces |
int, optional (default 100)
|
Desired number of faces in the cage (will be passed as an argument to decimate) |
100
|
force_output |
bool, optional (default True)
|
Makes the algorithm output a cage even if it intersects the input (otherwise, returns (None, None) if unsucessful) |
True
|
Returns:
Name | Type | Description |
---|---|---|
U |
numpy double array
|
Matrix of cage mesh vertices |
G |
numpy int array
|
Matrix of cage triangle indices |
See Also
decimate.
Notes
This construction follows the algorithm introduced by Sellán et al. in "Breaking Good: Fracture Modes for Realtime Destruction"
Examples:
TO-DO
Source code in src/gpytoolbox/copyleft/lazy_cage.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|