public final class PGS_Coloring extends Object
This class differentiates between "conforming meshes" and "non-conforming meshes".
Conforming Meshes : Consist of adjacent cells that share edges and
every pair of shared edges are identical, meaning they have the same
coordinates. An example of a conforming mesh is a triangulation.
Non-Conforming Meshes : Consist of adjacent cells that share edges
(i.e. edges may overlap) but adjacent edges do not necessarily have identical
start and end coordinates.
Modifier and Type | Class and Description |
---|---|
static class |
PGS_Coloring.ColoringAlgorithm
Specifies the algorithm/heuristic used by the underlying graph coloring
process to find a coloring for mesh faces.
|
Modifier and Type | Method and Description |
---|---|
static Map<processing.core.PShape,Integer> |
colorMesh(Collection<processing.core.PShape> shapes,
PGS_Coloring.ColoringAlgorithm coloringAlgorithm)
Computes a coloring of the given mesh shape, returning a color class for each
mesh face.
|
static Map<processing.core.PShape,Integer> |
colorMesh(processing.core.PShape meshShape,
PGS_Coloring.ColoringAlgorithm coloringAlgorithm)
Computes a coloring of the given mesh shape, returning a color class for each
mesh face.
|
static processing.core.PShape |
colorMesh(processing.core.PShape shape,
PGS_Coloring.ColoringAlgorithm coloringAlgorithm,
int[] colorPalette)
Computes a coloring of the given mesh shape and colors its faces using the
colors provided.
|
static processing.core.PShape |
colorMesh(processing.core.PShape shape,
PGS_Coloring.ColoringAlgorithm coloringAlgorithm,
String[] colorPalette)
Computes a coloring of the given mesh shape and colors its faces using the
colors provided.
|
static Map<processing.core.PShape,Integer> |
colorNonMesh(processing.core.PShape shape,
PGS_Coloring.ColoringAlgorithm coloringAlgorithm)
Computes a coloring of the given non-conforming mesh shape, returning a color
class for each face of the pre-processed (noded) mesh.
|
static processing.core.PShape |
colorNonMesh(processing.core.PShape shape,
PGS_Coloring.ColoringAlgorithm coloringAlgorithm,
int[] colorPalette)
Computes a coloring of the given non-conforming mesh shape and colors the
faces of its noded representation using the colors provided.
|
static processing.core.PShape |
colorNonMesh(processing.core.PShape shape,
PGS_Coloring.ColoringAlgorithm coloringAlgorithm,
String[] colorPalette)
Computes a coloring of the given non-conforming mesh shape and colors the
faces of its noded representation using the colors provided.
|
public static Map<processing.core.PShape,Integer> colorMesh(processing.core.PShape meshShape, PGS_Coloring.ColoringAlgorithm coloringAlgorithm)
meshShape
- a GROUP PShape, whose children constitute the faces
of a conforming meshcoloringAlgorithm
- coloring algorithm used to color the meshpublic static Map<processing.core.PShape,Integer> colorMesh(Collection<processing.core.PShape> shapes, PGS_Coloring.ColoringAlgorithm coloringAlgorithm)
shapes
- a collection of shapes that constitute the faces of
a conforming meshcoloringAlgorithm
- coloring algorithm used to color the meshpublic static processing.core.PShape colorMesh(processing.core.PShape shape, PGS_Coloring.ColoringAlgorithm coloringAlgorithm, int[] colorPalette)
shape
- a GROUP PShape, whose children constitute the faces
of a conforming meshcoloringAlgorithm
- coloring algorithm used to color the meshcolorPalette
- the (integer) colors with which to color the meshpublic static processing.core.PShape colorMesh(processing.core.PShape shape, PGS_Coloring.ColoringAlgorithm coloringAlgorithm, String[] colorPalette)
shape
- a GROUP PShape, whose children constitute the faces
of a conforming meshcoloringAlgorithm
- coloring algorithm used to color the meshcolorPalette
- the string colors (e.g. "#FFFFFF", or "cba5e8") with
which to color the meshpublic static Map<processing.core.PShape,Integer> colorNonMesh(processing.core.PShape shape, PGS_Coloring.ColoringAlgorithm coloringAlgorithm)
shape
- a GROUP PShape, whose children constitute the faces
of a non-conforming meshcoloringAlgorithm
- coloring algorithm used to color the meshpublic static processing.core.PShape colorNonMesh(processing.core.PShape shape, PGS_Coloring.ColoringAlgorithm coloringAlgorithm, int[] colorPalette)
shape
- a GROUP PShape, whose children constitute the faces
of a non-conforming meshcoloringAlgorithm
- coloring algorithm used to color the meshcolorPalette
- the (integer) colors with which to color the meshpublic static processing.core.PShape colorNonMesh(processing.core.PShape shape, PGS_Coloring.ColoringAlgorithm coloringAlgorithm, String[] colorPalette)
shape
- a GROUP PShape, whose children constitute the faces
of a non-conforming meshcoloringAlgorithm
- coloring algorithm used to color the meshcolorPalette
- the string colors (e.g. "#FFFFFF", or "cba5e8") with
which to color the meshCopyright © 2023. All rights reserved.