#ifndef toposlice_skip_fig_H #define toposlice_skip_fig_H /* Copyright (C) 2024 Jorge Stolfi, UNICAMP */ /* Last edited on 2024-05-24 05:12:05 by stolfi */ #include #include #include #include void toposlice_skip_fig_make(char *name, int32_t phase); /* Creates a figure to illustrate the use of {.skip} pointers in the {Extract-Polygon} procedure. Let {F} be the main face, at the center of the figure If {phase} is 0, draws only one slicing plane, at height {Z0}. The algorithm is assumed to be processing plane {Z0}, in the middle of the inner loop of {Extract-Polygon}, with {e'} (the arc {e} at the start of the outer loop) being the arc on the left side of {F} that crosses {Z0}, directed upwards. All {.skip} pointers are still set to {.next}. Some of them have been followed already; they are painted red and the last one leads to an arc that will be labelled {e}. If {phase} is 1, assumes the algorithm is still processing the slicing plane at {Z0}, and has just finished the inner loop of {Extract-Polygon} and executed the statement {e'.skip <-- e}. At this point {e} is the edge on the right side of {F} that crosses {Z0} upwards. The edges that are bypassed by {.skip} are drawn in light red and their {.skip} pointers are omitted. If {phase} is 2, the algorithm is assumed to be again in the middle of the inner loop of {Extract-Polygon}, but now processing a second plane {Z1} aboce {Z0}. There will be several vertices of {F} between the two planes, on both sides. Arc {e'} will then be the one on the left side of {F} that crosses {Z1} upwards. The {.skip} pointers are now like they were at the end of the processing of {Z0}. Some of them have been traversed and will be drawn in red. Edges of {e} that are skipped over by {.skip} are omitted. */ #endif