# Some input data sets for illustrations of the paper - variant "B". # Last edited on 2021-10-01 19:32:40 by stolfi import paper_figures_B_IMP def make_figure(fig, mp_cont, mp_fill, mp_jump): # Returns results {PCS,PFS,PLS,CCS,VGS,EGS} where # # {PCS} is a list of paths that comprise the contour of a simple # slice. # # {PFS} is a list of paths that comprise a solid raster fill for the slice. # # {PLS} is a list of paths that are links tof the paths in {PFS}. # # {CCS} is a list of contacts betwen the filling paths. # # {VGS} is a list of points that are vertices of the contact graph. # # {EGS} is a list of segments that a are the edges of the contact graph. # # The list {PCS} always has the outline paths. Each componet of the outline # is a separate closed path, oriented so that the interior of the slice is # on the left margin of the outline. # # The list {CTL}, when not {Null} or empty, is a list of pairs {(y,kk)} # {y} is the ordinate of a cul-line, and where {kk} may be 0, 1, or 2, # as explained below. # # The paths in {PFS} always use the same set {TRS} of filling raster # traces, but may connect them (or not) in different ways. The precise # contents of {PFS} and the other lists depends on the parametr {fig}, as # follows: # # "input": {PFS} has only the raster traces {TRS}, as # one-move paths, oriented left to right, and {PLS} has all the # potential link paths, oriented bottom to top. The list {CCS} has # all the contacts between those rasters. {VGS} and {EGS} are the # vertices and edhes of those rasters and contacts. # All other lists other than {PCS} are {None}. # # "zigzig": {PFS} has a single path with the traces {TRS}, # the non-alternating scan-line-order path. Normally it should not # use any links. The list {CCS} has a single contact with possibly # max cooling time. All other lists except {PCS} are {None}. # # "zigzag": {PFS} has a single path with the traces {TRS}, the # alternating scan-line-order path that starts at the bottom, left # to right. Links are used when available. The list {CCS} has a # single contact with possibly max cooling time. All other lists # except {PCS} are {None}. # # "cold": {PFS} has a single path as could be produced by {RP3} or # {slic3r}. It uses the minimum number of jumps. The list {CCS} has # one or more contacts with possibly excessive cooling time. The # other lists except {PCS} are {None}. # # "rivers": {PFS} has one path for each river, each consisting of # all the rasters of each river, oriented left to right, connected # by jumps. {CTL} has an entry {(y,kk)} for each cut-line, with # {kk=2} if essential and {kk=0} otherwise. The other lists except # {PCS} are {None}. # # "canon": {PFS} has two paths, one a canonical {i}-path and # another one a canonical {(i,j)}-bandpath. {CCS} has a list of # contacts betwen the two, on cut-line {i}. The list {CCL} has an # entry {(y,kk)} for each cut-line, where {kk=2} if essential, # {kk=1} if it separates banpaths in {PFS}, and {kk=0} otherwise. # The other lists except {PCS} are {None}. # # "blocks": {PFS} has all the choices of all blocks to be used for # {BestHotPath}, e.g. those chosen by {HotPath}. {PLS} has the links # that can be used to connect those paths. {CCS} has the contacts # between those paths. The lists {VGS} and {EGS} have the vertices # and edges of the contact graph between the blocks. The other lists # except {PCS} are {None}. # # The parameters {mp_cont,mp_fill,mp_jump} are used for the # outer contour traces, the filling traces (rasters and links), and the # filling jumps, respectively. return paper_figures_B_IMP.make_figure(fig, mp_cont, mp_fill, mp_jump) def plot_figure(name, fig, subfig, wdc,wdf, PCS,PFS,PLS,CCS,VGS,EGS): # Plots the figure {fig}, sub-figure {subfig} from the lists # {PCS,PFS,PLS,CCS,VGS,EGS} generated by {make_figure(fig, # mp_cont, mp_fill, mp_jump)}. Creates three files called # "{name}.{ext}" where {ext} is "png", "jpg", "eps". # # Where needed, the plot will assume that the contour is drawn with # traces of nominal width {wdc} and the filling rasters with nominal # width {wdf}. paper_figures_B_IMP.plot_figure(name, fig,subfig, wdc,wdf, PCS,PFS,PLS,CCS,VGS,EGS)