1Shape Debugging
2===============
3``show_axes shape``
4  Add an X/Y or X/Y/Z axis display to the shape.
5
6``show_bbox shape``
7  Visualize the bounding box, so you can check if it is bad
8  (too small to contain the shape).
9
10  * The bounding box is rendered in charcoal grey.
11  * The parts of the shape inside the bounding box are rendered in green.
12  * The parts of the shape outside the bounding box are rendered in red.
13  * For a 3D bounding box, shape boundary points on the surface
14    of the bounding box appear as shimmering green and red dots
15    as you interactively rotate the shape in the viewer.
16  * Use ``slice`` to investigate the interior of a 3D bounding box.
17
18``set_bbox bbox shape``
19  Manually fix a bad bounding box.
20
21``show_dist shape``
22  Visualize the signed distance field on the XY plane.
23  Green channel: contour lines inside the shape (distance <= 0).
24  Blue channel: contour lines outside the shape (distance > 0).
25  Red channel: > 0 at points where the gradient > 1, ramping to full
26  intensity where gradient >= 2.
27  If distance is NaN (something that can only happen on the GPU),
28  the colour is white.
29  If distance is infinity, the colour is vivid cyan.
30  If distance is -infinity, the colour is dark cyan.
31
32``show_gradient [j,k] shape``
33  Visualize the signed distance field (in the XY plane)
34  by displaying gradient values.
35  Gradient values < j are displayed in black.
36  Gradient values > k are displayed in white.
37  Gradient values between j and k are displayed using an sRGB.hue spectrum.
38
39  To find the Lipschitz constant of a shape with a bad distance field,
40  start with [j,k]=[1,2], then use binary search to find the smallest value of k
41  that doesn't produce white. Then you can plug that
42  value into the ``lipschitz`` function to fix the bad distance field.
43
44``lipschitz k shape``
45  Repair a distance field whose Lipschitz constant k is != 1.
46  If k < 1 then rendering via sphere tracing is slower than necessary.
47  If k > 1 then rendering will fail.
48  The argument ``k`` is the actual Lipschitz constant of ``shape``.
49
50  If an experimental shape isn't rendering correctly,
51  then ``shape >> lipschitz 2`` is often a quick way to fix the problem.
52  If the distance field is not Lipschitz continuous, then ``lipschitz`` can't help you.
53