-
Notifications
You must be signed in to change notification settings - Fork 0
DiGi.Geometry.Planar.Random
public static class CreateInheritance System.Object → Create
Generates a random DiGi.Geometry.Planar.Classes.Point2D within the specified X and Y coordinate ranges.
public static DiGi.Geometry.Planar.Classes.Point2D? Point2D(DiGi.Core.Classes.Range<double>? x, DiGi.Core.Classes.Range<double>? y, int seed=-1);x DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> defining the range for the X coordinate.
y DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> defining the range for the Y coordinate.
seed System.Int32
The integer seed used to initialize the random number generator. Defaults to -1.
DiGi.Geometry.Planar.Classes.Point2D
A DiGi.Geometry.Planar.Classes.Point2D if both x and y are not null; otherwise, null.
Generates a random DiGi.Geometry.Planar.Classes.Point2D within the specified X and Y ranges using the provided System.Random instance.
public static DiGi.Geometry.Planar.Classes.Point2D? Point2D(DiGi.Core.Classes.Range<double>? x, DiGi.Core.Classes.Range<double>? y, System.Random? random);x DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> of System.Double values defining the range for the X coordinate.
y DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> of System.Double values defining the range for the Y coordinate.
random System.Random
The System.Random instance used to generate random numbers within the specified ranges.
DiGi.Geometry.Planar.Classes.Point2D
A new DiGi.Geometry.Planar.Classes.Point2D if x, y, and random are not null; otherwise, null.
Generates a DiGi.Geometry.Planar.Classes.Point2D within the specified DiGi.Geometry.Planar.Classes.BoundingBox2D.
public static DiGi.Geometry.Planar.Classes.Point2D? Point2D(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, int seed=-1);boundingBox2D DiGi.Geometry.Planar.Classes.BoundingBox2D
The DiGi.Geometry.Planar.Classes.BoundingBox2D that defines the boundaries for the point generation.
seed System.Int32
An System.Int32 used as a seed for the random number generator to ensure reproducibility.
DiGi.Geometry.Planar.Classes.Point2D
A DiGi.Geometry.Planar.Classes.Point2D located within the boundingBox2D, or null if the boundingBox2D or its minimum and maximum corners are null.
Generates a random DiGi.Geometry.Planar.Classes.Point2D within the boundaries of the specified DiGi.Geometry.Planar.Classes.BoundingBox2D.
public static DiGi.Geometry.Planar.Classes.Point2D? Point2D(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, System.Random? random);boundingBox2D DiGi.Geometry.Planar.Classes.BoundingBox2D
The DiGi.Geometry.Planar.Classes.BoundingBox2D that defines the area from which to generate the point.
random System.Random
The System.Random instance used to generate the random coordinates.
DiGi.Geometry.Planar.Classes.Point2D
A DiGi.Geometry.Planar.Classes.Point2D located within the boundingBox2D, or null if boundingBox2D is null, random is null, or if the bounding box's minimum or maximum corners are not defined.
Generates a random DiGi.Geometry.Planar.Classes.Point2D located within the boundaries of the specified DiGi.Geometry.Planar.Classes.PolygonalFace2D.
public static DiGi.Geometry.Planar.Classes.Point2D? Point2D(DiGi.Geometry.Planar.Classes.PolygonalFace2D? polygonalFace2D, System.Random? random, double tolerance=0.001);polygonalFace2D DiGi.Geometry.Planar.Classes.PolygonalFace2D
The DiGi.Geometry.Planar.Classes.PolygonalFace2D from which to sample a random point.
random System.Random
The System.Random instance used to generate the random coordinates.
tolerance System.Double
The System.Double tolerance value used for geometric validation and intersection tests.
DiGi.Geometry.Planar.Classes.Point2D
A DiGi.Geometry.Planar.Classes.Point2D that is inside the polygonalFace2D, or null if the polygonalFace2D or random are null, or if the face's bounding box dimensions are smaller than the specified tolerance.
Generates a random DiGi.Geometry.Planar.Classes.Point2D located on the specified DiGi.Geometry.Planar.Classes.Segment2D.
public static DiGi.Geometry.Planar.Classes.Point2D? Point2D(DiGi.Geometry.Planar.Classes.Segment2D? segment2D, System.Random? random, double tolerance=0.001);segment2D DiGi.Geometry.Planar.Classes.Segment2D
The DiGi.Geometry.Planar.Classes.Segment2D from which to sample a random point.
random System.Random
The System.Random instance used to generate the random coordinates.
tolerance System.Double
The System.Double distance tolerance used to determine if the segment is vertical or horizontal, defaulting to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Point2D
A randomly sampled DiGi.Geometry.Planar.Classes.Point2D on the segment2D, or null if the segment2D is null, the random instance is null, or the segment length is smaller than the specified tolerance.
Generates a DiGi.Geometry.Planar.Classes.Point2D from the specified DiGi.Geometry.Planar.Interfaces.IPolygonal2D object.
public static DiGi.Geometry.Planar.Classes.Point2D? Point2D(DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D, int seed=-1, double tolerance=0.001);polygonal2D DiGi.Geometry.Planar.Interfaces.IPolygonal2D
The DiGi.Geometry.Planar.Interfaces.IPolygonal2D instance to process. This parameter can be null.
seed System.Int32
An System.Int32 value used as the seed for the random number generator.
tolerance System.Double
A System.Double representing the distance tolerance, defaulting to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Point2D
A DiGi.Geometry.Planar.Classes.Point2D instance if polygonal2D is not null; otherwise, null.
Generates a random DiGi.Geometry.Planar.Classes.Point2D within the bounds of the specified DiGi.Geometry.Planar.Interfaces.IPolygonal2D geometry.
public static DiGi.Geometry.Planar.Classes.Point2D? Point2D(DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D, System.Random? random, double tolerance=0.001);polygonal2D DiGi.Geometry.Planar.Interfaces.IPolygonal2D
The DiGi.Geometry.Planar.Interfaces.IPolygonal2D geometry used as the sampling area.
random System.Random
The System.Random instance used to generate random coordinates.
tolerance System.Double
The System.Double tolerance value for geometric operations, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Point2D
A randomly sampled DiGi.Geometry.Planar.Classes.Point2D if a point could be determined; otherwise, null.
Generates a list of random DiGi.Geometry.Planar.Classes.Point2D instances within the specified X and Y ranges.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? Point2Ds(DiGi.Core.Classes.Range<double>? x, DiGi.Core.Classes.Range<double>? y, int count, int seed=-1);x DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> defining the bounds for the X coordinates.
y DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> defining the bounds for the Y coordinates.
count System.Int32
The number of DiGi.Geometry.Planar.Classes.Point2D instances to generate.
seed System.Int32
The seed value used to initialize the random number generator.
System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>
A System.Collections.Generic.List<> containing the generated points, or null if either x or y is null.
Generates a collection of DiGi.Geometry.Planar.Classes.Point2D objects within the specified X and Y ranges.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? Point2Ds(DiGi.Core.Classes.Range<double>? x, DiGi.Core.Classes.Range<double>? y, int count, System.Random random);x DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> defining the range for the X coordinates.
y DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> defining the range for the Y coordinates.
count System.Int32
The number of points to attempt to generate.
random System.Random
The System.Random instance used to generate random values.
System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>
A System.Collections.Generic.List<> containing the generated points, or null if either the x or y range is null.
Generates a list of random DiGi.Geometry.Planar.Classes.Point2D instances within the specified DiGi.Geometry.Planar.Classes.BoundingBox2D.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? Point2Ds(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, DiGi.Core.Classes.Range<int>? count, int seed=-1);boundingBox2D DiGi.Geometry.Planar.Classes.BoundingBox2D
The DiGi.Geometry.Planar.Classes.BoundingBox2D that defines the boundaries for generating the points.
count DiGi.Core.Classes.Range<System.Int32>
The DiGi.Core.Classes.Range<> of integers specifying the number of points to generate.
seed System.Int32
The seed value used to initialize the random number generator.
System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>
A System.Collections.Generic.List<> containing the generated points, or null if boundingBox2D or count is null.
Generates a list of random DiGi.Geometry.Planar.Classes.Point2D instances within the specified DiGi.Geometry.Planar.Classes.BoundingBox2D based on a quantity randomly selected from the provided DiGi.Core.Classes.Range<>.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? Point2Ds(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, DiGi.Core.Classes.Range<int>? count, System.Random random);boundingBox2D DiGi.Geometry.Planar.Classes.BoundingBox2D
The DiGi.Geometry.Planar.Classes.BoundingBox2D that defines the spatial boundaries for generating points.
count DiGi.Core.Classes.Range<System.Int32>
The DiGi.Core.Classes.Range<> of integers used to determine a random number of points to generate.
random System.Random
The System.Random instance used for random number generation.
System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>
A System.Collections.Generic.List<> containing the generated points, or null if boundingBox2D, count, or random is null, or if the bounding box lacks a minimum or maximum corner.
Generates a collection of random points within the specified axis-aligned bounding box.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? Point2Ds(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, int count, int seed=-1);boundingBox2D DiGi.Geometry.Planar.Classes.BoundingBox2D
The DiGi.Geometry.Planar.Classes.BoundingBox2D defining the area from which to generate points.
count System.Int32
The number of DiGi.Geometry.Planar.Classes.Point2D instances to create.
seed System.Int32
The seed value used for the random number generator to ensure reproducibility.
System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>
An array of DiGi.Geometry.Planar.Classes.Point2D objects contained within the boundingBox2D, or null if boundingBox2D is null.
Generates a list of random DiGi.Geometry.Planar.Classes.Point2D instances within the specified DiGi.Geometry.Planar.Classes.BoundingBox2D.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? Point2Ds(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, int count, System.Random? random);boundingBox2D DiGi.Geometry.Planar.Classes.BoundingBox2D
The DiGi.Geometry.Planar.Classes.BoundingBox2D that defines the boundaries for generating points.
count System.Int32
The number of random points to generate.
random System.Random
The System.Random instance used to produce the random values.
System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>
A System.Collections.Generic.List<> containing the generated DiGi.Geometry.Planar.Classes.Point2D instances, or null if the boundingBox2D is null, the random instance is null, or the bounding box corners are not defined.
Generates a list of DiGi.Geometry.Planar.Classes.Point2D objects from the specified DiGi.Geometry.Planar.Interfaces.IPolygonal2D instance based on a count range and randomization seed.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? Point2Ds(DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D, DiGi.Core.Classes.Range<int>? count, int seed=-1, double tolerance=0.001);polygonal2D DiGi.Geometry.Planar.Interfaces.IPolygonal2D
The DiGi.Geometry.Planar.Interfaces.IPolygonal2D object used to generate points.
count DiGi.Core.Classes.Range<System.Int32>
The DiGi.Core.Classes.Range<> of System.Int32 values specifying the number of points to be generated.
seed System.Int32
An System.Int32 value used as the seed for the random number generator. Defaults to -1.
tolerance System.Double
A System.Double value representing the distance tolerance, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>
A System.Collections.Generic.List<> containing the generated points, or null if polygonal2D or count is null.
Generates a list of random DiGi.Geometry.Planar.Classes.Point2D instances from the specified polygonal object based on a random count within a given range.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? Point2Ds(DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D, DiGi.Core.Classes.Range<int>? count, System.Random random, double tolerance=0.001);polygonal2D DiGi.Geometry.Planar.Interfaces.IPolygonal2D
The DiGi.Geometry.Planar.Interfaces.IPolygonal2D instance used as the source for point generation.
count DiGi.Core.Classes.Range<System.Int32>
The DiGi.Core.Classes.Range<> of integers from which the number of points to generate is randomly selected.
random System.Random
The System.Random instance used to perform random sampling.
tolerance System.Double
The System.Double tolerance value for point generation, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>
A System.Collections.Generic.List<> containing the generated points, or null if polygonal2D, count, or random is null.
Generates a collection of random DiGi.Geometry.Planar.Classes.Point2D instances within the specified polygonal area.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? Point2Ds(DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D, int count, int seed=-1, double tolerance=0.001);polygonal2D DiGi.Geometry.Planar.Interfaces.IPolygonal2D
The polygonal object used as the boundary for generating points.
count System.Int32
The number of DiGi.Geometry.Planar.Classes.Point2D instances to generate.
seed System.Int32
The seed value for the random number generator; a value of -1 indicates that a random seed should be used.
tolerance System.Double
The distance tolerance applied during point generation, defaulting to DiGi.Core.Constants.Tolerance.MacroDistance.
System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>
A System.Collections.Generic.List<> containing the generated points, or null if the polygonal2D is null.
Generates a list of random DiGi.Geometry.Planar.Classes.Point2D instances based on the provided DiGi.Geometry.Planar.Interfaces.IPolygonal2D object.
public static System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>? Point2Ds(DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D, int count, System.Random random, double tolerance=0.001);polygonal2D DiGi.Geometry.Planar.Interfaces.IPolygonal2D
The DiGi.Geometry.Planar.Interfaces.IPolygonal2D instance used to generate points.
count System.Int32
The number of DiGi.Geometry.Planar.Classes.Point2D instances to attempt to create.
random System.Random
The System.Random instance used for random generation.
tolerance System.Double
The distance tolerance value, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
System.Collections.Generic.List<DiGi.Geometry.Planar.Classes.Point2D>
A System.Collections.Generic.List<> containing the successfully generated points; otherwise, null if polygonal2D or random is null.
Generates a DiGi.Geometry.Planar.Classes.Polygon2D based on specified coordinate and point count ranges.
public static DiGi.Geometry.Planar.Classes.Polygon2D? Polygon2D(DiGi.Core.Classes.Range<double>? x, DiGi.Core.Classes.Range<double>? y, DiGi.Core.Classes.Range<int>? pointCount, int seed=-1, double tolerance=0.001);x DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> of double values defining the X-axis boundaries.
y DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> of double values defining the Y-axis boundaries.
pointCount DiGi.Core.Classes.Range<System.Int32>
The DiGi.Core.Classes.Range<> of integer values defining the possible number of vertices in the polygon.
seed System.Int32
An integer seed used to initialize the random number generator. A value of -1 indicates a non-deterministic seed.
tolerance System.Double
A double value representing the macro distance tolerance for geometric operations.
DiGi.Geometry.Planar.Classes.Polygon2D
A DiGi.Geometry.Planar.Classes.Polygon2D instance if both X and Y ranges are provided; otherwise, null.
Generates a random DiGi.Geometry.Planar.Classes.Polygon2D within the specified X and Y ranges, with a number of points determined by the provided point count range.
public static DiGi.Geometry.Planar.Classes.Polygon2D? Polygon2D(DiGi.Core.Classes.Range<double>? x, DiGi.Core.Classes.Range<double>? y, DiGi.Core.Classes.Range<int>? pointCount, System.Random random, double tolerance=0.001);x DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> defining the boundaries for the X-axis.
y DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> defining the boundaries for the Y-axis.
pointCount DiGi.Core.Classes.Range<System.Int32>
The DiGi.Core.Classes.Range<> used to randomly determine the number of vertices in the polygon.
random System.Random
The System.Random instance used for random generation.
tolerance System.Double
The System.Double tolerance value, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Polygon2D
A randomly generated DiGi.Geometry.Planar.Classes.Polygon2D if both the X and Y ranges are provided; otherwise, null.
Creates a DiGi.Geometry.Planar.Classes.Polygon2D based on the specified X and Y ranges, point count, seed, and tolerance.
public static DiGi.Geometry.Planar.Classes.Polygon2D? Polygon2D(DiGi.Core.Classes.Range<double>? x, DiGi.Core.Classes.Range<double>? y, int pointCount, int seed=-1, double tolerance=0.001);x DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> for the X-axis coordinates.
y DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> for the Y-axis coordinates.
pointCount System.Int32
The integer number of points to generate for the polygon.
seed System.Int32
The integer seed used for random point generation; a value of -1 uses a default random seed.
tolerance System.Double
The double precision tolerance for geometric operations, defaulting to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Polygon2D
A DiGi.Geometry.Planar.Classes.Polygon2D if both the X and Y ranges are provided; otherwise, null.
Generates a DiGi.Geometry.Planar.Classes.Polygon2D based on the specified X and Y ranges, point count, random number generator, and tolerance.
public static DiGi.Geometry.Planar.Classes.Polygon2D? Polygon2D(DiGi.Core.Classes.Range<double>? x, DiGi.Core.Classes.Range<double>? y, int pointCount, System.Random random, double tolerance=0.001);x DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> defining the extent of the polygon along the X-axis.
y DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> defining the extent of the polygon along the Y-axis.
pointCount System.Int32
The integer number of points to generate for the DiGi.Geometry.Planar.Classes.Polygon2D.
random System.Random
The System.Random instance used to generate random coordinates.
tolerance System.Double
The double value representing the geometric tolerance, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Polygon2D
A DiGi.Geometry.Planar.Classes.Polygon2D if the X range, Y range, and random generator are provided; otherwise, null.
Creates a DiGi.Geometry.Planar.Classes.Polygon2D based on the provided DiGi.Geometry.Planar.Classes.BoundingBox2D.
public static DiGi.Geometry.Planar.Classes.Polygon2D? Polygon2D(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, int pointCount, int seed=-1, double tolerance=0.001);boundingBox2D DiGi.Geometry.Planar.Classes.BoundingBox2D
The DiGi.Geometry.Planar.Classes.BoundingBox2D used to derive the polygon vertices.
pointCount System.Int32
The number of points to be included in the resulting DiGi.Geometry.Planar.Classes.Polygon2D.
seed System.Int32
An optional integer seed for random point generation. Defaults to -1.
tolerance System.Double
The double value representing the distance tolerance, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Polygon2D
A DiGi.Geometry.Planar.Classes.Polygon2D instance if the DiGi.Geometry.Planar.Classes.BoundingBox2D is valid and contains at least three points; otherwise, null.
Creates a DiGi.Geometry.Planar.Classes.Polygon2D based on the provided axis-aligned bounding box, point count, and random number generator.
public static DiGi.Geometry.Planar.Classes.Polygon2D? Polygon2D(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, int pointCount, System.Random? random, double tolerance=0.001);boundingBox2D DiGi.Geometry.Planar.Classes.BoundingBox2D
The DiGi.Geometry.Planar.Classes.BoundingBox2D used to derive the initial points for the polygon.
pointCount System.Int32
The integer number of points required for the resulting polygon.
random System.Random
The System.Random instance used for randomization during polygon generation.
tolerance System.Double
The double value specifying the distance tolerance, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Polygon2D
A DiGi.Geometry.Planar.Classes.Polygon2D if the boundingBox2D and random are not null and the pointCount is at least 3; otherwise, null.
Generates a DiGi.Geometry.Planar.Classes.Polygon2D from an DiGi.Geometry.Planar.Interfaces.IPolygonal2D source using a randomly determined number of points.
public static DiGi.Geometry.Planar.Classes.Polygon2D? Polygon2D(DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D, DiGi.Core.Classes.Range<int>? pointCount, System.Random? random, double tolerance=0.001);polygonal2D DiGi.Geometry.Planar.Interfaces.IPolygonal2D
The DiGi.Geometry.Planar.Interfaces.IPolygonal2D object to be converted into a polygon.
pointCount DiGi.Core.Classes.Range<System.Int32>
A nullable System.Int32 used as the basis for determining the random number of points.
random System.Random
The System.Random instance used to generate the random point count.
tolerance System.Double
The System.Double tolerance value for geometric operations, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Polygon2D
A DiGi.Geometry.Planar.Classes.Polygon2D instance if the operation is successful; otherwise, null if polygonal2D, pointCount, or random is null.
Creates a DiGi.Geometry.Planar.Classes.Polygon2D from the specified DiGi.Geometry.Planar.Interfaces.IPolygonal2D source using a defined number of points and an optional random seed.
public static DiGi.Geometry.Planar.Classes.Polygon2D? Polygon2D(DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D, int pointCount, int seed=-1, double tolerance=0.001);polygonal2D DiGi.Geometry.Planar.Interfaces.IPolygonal2D
The DiGi.Geometry.Planar.Interfaces.IPolygonal2D source geometry used to generate the polygon.
pointCount System.Int32
The integer number of points to be included in the resulting DiGi.Geometry.Planar.Classes.Polygon2D.
seed System.Int32
The integer seed used for random point generation. A value of -1 indicates a non-deterministic seed.
tolerance System.Double
The double precision tolerance used for geometric operations, defaulting to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Polygon2D
A DiGi.Geometry.Planar.Classes.Polygon2D instance if the polygonal2D is not null and the pointCount is 3 or greater; otherwise, null.
Generates a random DiGi.Geometry.Planar.Classes.Polygon2D with a specified number of vertices based on the provided DiGi.Geometry.Planar.Interfaces.IPolygonal2D geometry, ensuring that the resulting polygon does not self-intersect and its segments do not intersect the source geometry.
public static DiGi.Geometry.Planar.Classes.Polygon2D? Polygon2D(DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D, int pointCount, System.Random random, double tolerance=0.001);polygonal2D DiGi.Geometry.Planar.Interfaces.IPolygonal2D
The DiGi.Geometry.Planar.Interfaces.IPolygonal2D object used as the basis for sampling random points.
pointCount System.Int32
The desired number of vertices (System.Int32) for the generated polygon; must be at least 3.
random System.Random
The System.Random instance used to generate random point coordinates.
tolerance System.Double
The System.Double distance tolerance used for proximity and intersection calculations, defaulting to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Polygon2D
A DiGi.Geometry.Planar.Classes.Polygon2D instance containing the generated vertices if successful; otherwise, null if the inputs are invalid or a valid polygon cannot be constructed.
Generates a DiGi.Geometry.Planar.Classes.PolygonalFace2D based on the specified coordinate ranges and complexity constraints.
public static DiGi.Geometry.Planar.Classes.PolygonalFace2D? PolygonalFace2D(DiGi.Core.Classes.Range<double>? x, DiGi.Core.Classes.Range<double>? y, DiGi.Core.Classes.Range<int>? pointCount, DiGi.Core.Classes.Range<int>? internalEdgeCount, int seed=-1, double tolerance=0.001);x DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> defining the range of X-coordinates.
y DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> defining the range of Y-coordinates.
pointCount DiGi.Core.Classes.Range<System.Int32>
The DiGi.Core.Classes.Range<> defining the allowed number of points.
internalEdgeCount DiGi.Core.Classes.Range<System.Int32>
The DiGi.Core.Classes.Range<> defining the allowed number of internal edges.
seed System.Int32
An System.Int32 used as a seed for random generation. A value of -1 indicates a random seed.
tolerance System.Double
A System.Double specifying the geometric tolerance, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.PolygonalFace2D
A DiGi.Geometry.Planar.Classes.PolygonalFace2D if x, y, pointCount, and internalEdgeCount are provided; otherwise, null.
Generates a random DiGi.Geometry.Planar.Classes.PolygonalFace2D based on the specified coordinate ranges, point counts, and number of internal edges.
public static DiGi.Geometry.Planar.Classes.PolygonalFace2D? PolygonalFace2D(DiGi.Core.Classes.Range<double>? x, DiGi.Core.Classes.Range<double>? y, DiGi.Core.Classes.Range<int>? pointCount, DiGi.Core.Classes.Range<int>? internalEdgeCount, System.Random? random, double tolerance=0.001);x DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> specifying the range for the X-axis coordinates.
y DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> specifying the range for the Y-axis coordinates.
pointCount DiGi.Core.Classes.Range<System.Int32>
The DiGi.Core.Classes.Range<> specifying the number of points to be used in the polygons.
internalEdgeCount DiGi.Core.Classes.Range<System.Int32>
The DiGi.Core.Classes.Range<> specifying the number of internal edges (holes) to generate within the face.
random System.Random
The System.Random instance used for random generation.
tolerance System.Double
The System.Double value representing the geometric tolerance, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.PolygonalFace2D
A randomly generated DiGi.Geometry.Planar.Classes.PolygonalFace2D if all required parameters are provided; otherwise, null.
Generates a random DiGi.Geometry.Planar.Classes.Segment2D based on the provided coordinate ranges, a random seed, and a geometric tolerance.
public static DiGi.Geometry.Planar.Classes.Segment2D? Segment2D(DiGi.Core.Classes.Range<double>? x, DiGi.Core.Classes.Range<double>? y, int seed=-1, double tolerance=0.001);x DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> defining the boundaries for the X-axis.
y DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> defining the boundaries for the Y-axis.
seed System.Int32
The System.Int32 seed value used to initialize the random number generator.
tolerance System.Double
The System.Double tolerance value used for geometric operations, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Segment2D
A DiGi.Geometry.Planar.Classes.Segment2D if both x and y are not null; otherwise, null.
Generates a random DiGi.Geometry.Planar.Classes.Segment2D within the specified X and Y ranges, ensuring that the resulting segment's length is at least the specified tolerance.
public static DiGi.Geometry.Planar.Classes.Segment2D? Segment2D(DiGi.Core.Classes.Range<double>? x, DiGi.Core.Classes.Range<double>? y, System.Random random, double tolerance=0.001);x DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> defining the boundaries for the X coordinate.
y DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> defining the boundaries for the Y coordinate.
random System.Random
The System.Random instance used to generate random coordinates.
tolerance System.Double
The minimum length required for the generated DiGi.Geometry.Planar.Classes.Segment2D. Defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Segment2D
A DiGi.Geometry.Planar.Classes.Segment2D that satisfies the length requirement, or null if any of the required parameters (x, y, or random) are null.
Generates a random DiGi.Geometry.Planar.Classes.Segment2D within the specified DiGi.Geometry.Planar.Classes.BoundingBox2D using a provided seed and tolerance.
public static DiGi.Geometry.Planar.Classes.Segment2D? Segment2D(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, int seed=-1, double tolerance=0.001);boundingBox2D DiGi.Geometry.Planar.Classes.BoundingBox2D
The DiGi.Geometry.Planar.Classes.BoundingBox2D that defines the boundaries for the generated segment.
seed System.Int32
An System.Int32 value used to seed the random number generator; a value of -1 indicates a non-deterministic seed.
tolerance System.Double
A System.Double specifying the geometric tolerance, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Segment2D
A new DiGi.Geometry.Planar.Classes.Segment2D instance if boundingBox2D is not null; otherwise, null.
Generates a random DiGi.Geometry.Planar.Classes.Segment2D within the specified DiGi.Geometry.Planar.Classes.BoundingBox2D.
public static DiGi.Geometry.Planar.Classes.Segment2D? Segment2D(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, System.Random? random, double tolerance=0.001);boundingBox2D DiGi.Geometry.Planar.Classes.BoundingBox2D
The DiGi.Geometry.Planar.Classes.BoundingBox2D that defines the boundaries for generating the segment.
random System.Random
The System.Random instance used to generate random coordinates.
tolerance System.Double
The System.Double tolerance value, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Segment2D
A randomly generated DiGi.Geometry.Planar.Classes.Segment2D, or null if the boundingBox2D is null, the random instance is null, or the bounding box's minimum or maximum points are null.
Generates a random DiGi.Geometry.Planar.Classes.Vector2D within the specified X and Y ranges using a provided seed and distance tolerance.
public static DiGi.Geometry.Planar.Classes.Vector2D? Vector2D(DiGi.Core.Classes.Range<double>? x, DiGi.Core.Classes.Range<double>? y, int seed=-1, double tolerance=0.001);x DiGi.Core.Classes.Range<System.Double>
The nullable DiGi.Core.Classes.Range<> for the X-coordinate. If x is null, the method returns null.
y DiGi.Core.Classes.Range<System.Double>
The nullable DiGi.Core.Classes.Range<> for the Y-coordinate. If y is null, the method returns null.
seed System.Int32
The System.Int32 seed used to initialize the random number generator.
tolerance System.Double
The System.Double distance tolerance, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Vector2D
A DiGi.Geometry.Planar.Classes.Vector2D if both x and y are non-null; otherwise, null.
Generates a random DiGi.Geometry.Planar.Classes.Vector2D within the specified X and Y ranges, ensuring that the length of the resulting vector meets or exceeds the specified tolerance.
public static DiGi.Geometry.Planar.Classes.Vector2D? Vector2D(DiGi.Core.Classes.Range<double>? x, DiGi.Core.Classes.Range<double>? y, System.Random? random, double tolerance=0.001);x DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> for the X coordinate.
y DiGi.Core.Classes.Range<System.Double>
The DiGi.Core.Classes.Range<> for the Y coordinate.
random System.Random
The System.Random instance used to generate random values.
tolerance System.Double
The minimum length threshold that the generated DiGi.Geometry.Planar.Classes.Vector2D must satisfy. Defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Vector2D
A DiGi.Geometry.Planar.Classes.Vector2D that satisfies the tolerance requirement, or null if x, y, or random is null.
Generates a DiGi.Geometry.Planar.Classes.Vector2D based on the provided DiGi.Geometry.Planar.Classes.BoundingBox2D, using a random seed and a specified distance tolerance.
public static DiGi.Geometry.Planar.Classes.Vector2D? Vector2D(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, int seed=-1, double tolerance=0.001);boundingBox2D DiGi.Geometry.Planar.Classes.BoundingBox2D
The DiGi.Geometry.Planar.Classes.BoundingBox2D used to define the area for vector generation.
seed System.Int32
An System.Int32 value used as a seed for the random number generator.
tolerance System.Double
A System.Double value representing the distance tolerance, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Vector2D
A DiGi.Geometry.Planar.Classes.Vector2D if the boundingBox2D is not null; otherwise, null.
Generates a DiGi.Geometry.Planar.Classes.Vector2D based on the provided DiGi.Geometry.Planar.Classes.BoundingBox2D, using a random generator and a specified tolerance.
public static DiGi.Geometry.Planar.Classes.Vector2D? Vector2D(DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D, System.Random? random, double tolerance=0.001);boundingBox2D DiGi.Geometry.Planar.Classes.BoundingBox2D
The DiGi.Geometry.Planar.Classes.BoundingBox2D used to define the spatial bounds for vector generation.
random System.Random
The System.Random instance used to generate random values within the ranges of the bounding box.
tolerance System.Double
The System.Double tolerance value, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Vector2D
A DiGi.Geometry.Planar.Classes.Vector2D if the boundingBox2D and its minimum and maximum corners are not null; otherwise, null.
Creates a random DiGi.Geometry.Planar.Classes.Vector2D based on the specified seed and tolerance.
public static DiGi.Geometry.Planar.Classes.Vector2D? Vector2D(int seed=-1, double tolerance=0.001);seed System.Int32
The System.Int32 seed used to initialize the random number generator.
tolerance System.Double
The System.Double tolerance value, which defaults to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Vector2D
A randomly generated DiGi.Geometry.Planar.Classes.Vector2D instance.
Generates a random unit DiGi.Geometry.Planar.Classes.Vector2D by iteratively creating vectors until the length exceeds the specified tolerance.
public static DiGi.Geometry.Planar.Classes.Vector2D? Vector2D(System.Random random, double tolerance=0.001);random System.Random
The System.Random instance used to generate random values.
tolerance System.Double
The minimum length threshold that a generated vector must exceed before being normalized, defaulting to DiGi.Core.Constants.Tolerance.MacroDistance.
DiGi.Geometry.Planar.Classes.Vector2D
A unit DiGi.Geometry.Planar.Classes.Vector2D representing the normalized direction of the generated vector, or null if the random instance is null.