New answers tagged computational-geometry
5
From V12, there is an inbuilt function RandomPolygon
RandomPolygon[7] returns a simple polygon with seven sides. Other types are "Convex", "StarShaped".
Table[Graphics[p, ImageSize -> 100], {p, RandomPolygon[{"Simple", 5}, 3]}],
Table[Graphics[p, ImageSize -> 100], {p, RandomPolygon[{"Convex", 5}, 3]}],
Table[...
4
NMaximize[] is not necessary to compute the positions of the major and minor axes of the ellipse. One only needs to perform an eigendecomposition:
Nodes = {{0, 0}, {48, 44}, {48, 60}, {0, 44}};
ellipsoidBR = BoundingRegion[Nodes, "FastEllipsoid"];
center = ellipsoidBR[[1]];
{vals, vecs} = Eigensystem[ellipsoidBR[[2]]];
{a, b} = Sqrt[vals];
major = {...
5
Nodes = {{0, 0}, {48, 44}, {48, 60}, {0, 44}};
ellipsoidBR = BoundingRegion[Nodes, "FastEllipsoid"];
RegionMember[ellipsoidBR, {x, y}]
(x | y) ∈ Reals && 499 x^2 + 576 (-44 + y) y <= 48 x (-56 + 15 y)
Or
Nodes = {{0, 0}, {48, 44}, {48, 60}, {0, 44}};
ellipsoidBR = BoundingRegion[Nodes, "FastEllipsoid"];
ellipsoidB = ...
7
As a workaround you can use the finite element mesh generator:
Needs["NDSolve`FEM`"]
coordinateList = Tuples[{Range[3], Range[3], Range[3]}];
MeshRegion[ToElementMesh[coordinateList], PlotTheme -> "Lines"]
Top 50 recent answers are included
Related Tags
computational-geometry × 598mesh × 122
regions × 113
geometry × 87
graphics × 58
graphics3d × 57
plotting × 53
performance-tuning × 30
bugs × 30
intersection × 25
graphs-and-networks × 24
finite-element-method × 19
equation-solving × 18
geometric-computation × 18
calculus-and-analysis × 16
polygons × 15
image-processing × 14
differential-geometry × 13
differential-equations × 12
random × 12
geometric-transform × 12
list-manipulation × 11
mathematical-optimization × 11
polyhedra × 11
numerical-integration × 10