Skip to main content
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

An example can be found herehere.

An example can be found here.

An example can be found here.

added 402 characters in body
Source Link
Silvia
  • 27.7k
  • 3
  • 86
  • 172

Edit:

SimplePolygonPartition can be used to divide self-intersecting Polygon to simple pieces. The usage is like

SimplePolygonPartition[Polygon[...]] SimplePolygonPartition[Polygon[...],Graphics`Region`RegionDump`FillingMethod->"OddEvenRule"] 

An example can be found here.

Edit:

SimplePolygonPartition can be used to divide self-intersecting Polygon to simple pieces. The usage is like

SimplePolygonPartition[Polygon[...]] SimplePolygonPartition[Polygon[...],Graphics`Region`RegionDump`FillingMethod->"OddEvenRule"] 

An example can be found here.

deleted 65 characters in body
Source Link
Silvia
  • 27.7k
  • 3
  • 86
  • 172
AppendTo[$ContextPath, "Region`"] Clear[testfunc] testfunc[reg_] := {ToString /@ #, Through[#[reg]]} &[{ ConvexRegionQ, BoundedRegionQ, Module[{dim = RegionDimension[#]}RegionDimension, Module[{dim = RegionEmbeddingDimension[#]},  var = Symbol["x" <> ToString[#]] & /@ Range[dim];  var = Symbol["x" <> ToString[#]] & /@ Range[dim];  dim] &,  RegionEmbeddingDimension dim] &, RegionMeasure, RegionCentroid, RegionProperty[#, var, "FastDescription"] &, RegionProperty[#, var, "ImplicitDescription"] &, RegionElement, LevelFunction[RegionProperty[#, var, "FastDescription"][[1, 2]]] & }] // Grid[Insert[#, {ConvexRegionQ, BoundedRegionQ, RegionDimension, RegionEmbeddingDimension, RegionMeasure, RegionCentroid, FastDescription, ImplicitDescription, RegionElement, LevelFunction}, 2]\[Transpose], Dividers -> All, FrameStyle -> GrayLevel[.8], Alignment -> Left] & // Quiet 

In addition of BoxRegionBoxRegion, other *Regions also seems to be used to declare regions:

test for 7D triangletest for 7D triangle

Maybe some of them (FastDescription, ImplicitDescription, LevelFunction) work only on "full-rank" regions?

test for simplextest for simplex

Some regions look verylike special (or should I say general?)cases:

AppendTo[$ContextPath, "Region`"] Clear[testfunc] testfunc[reg_] := {ToString /@ #, Through[#[reg]]} &[{ ConvexRegionQ, BoundedRegionQ, Module[{dim = RegionDimension[#]}, var = Symbol["x" <> ToString[#]] & /@ Range[dim];  dim] &,  RegionEmbeddingDimension, RegionMeasure, RegionCentroid, RegionProperty[#, var, "FastDescription"] &, RegionProperty[#, var, "ImplicitDescription"] &, RegionElement, LevelFunction[RegionProperty[#, var, "FastDescription"][[1, 2]]] & }] // Grid[Insert[#, {ConvexRegionQ, BoundedRegionQ, RegionDimension, RegionEmbeddingDimension, RegionMeasure, RegionCentroid, FastDescription, ImplicitDescription, RegionElement, LevelFunction}, 2]\[Transpose], Dividers -> All, FrameStyle -> GrayLevel[.8], Alignment -> Left] & // Quiet 

In addition of BoxRegion, other *Regions also seems to be used to declare regions:

test for 7D triangle

Maybe some of them (FastDescription, ImplicitDescription, LevelFunction) work only on "full-rank" regions?

test for simplex

Some regions look very special (or should I say general?):

AppendTo[$ContextPath, "Region`"] Clear[testfunc] testfunc[reg_] := {ToString /@ #, Through[#[reg]]} &[{ ConvexRegionQ, BoundedRegionQ, RegionDimension, Module[{dim = RegionEmbeddingDimension[#]},  var = Symbol["x" <> ToString[#]] & /@ Range[dim];   dim] &, RegionMeasure, RegionCentroid, RegionProperty[#, var, "FastDescription"] &, RegionProperty[#, var, "ImplicitDescription"] &, RegionElement, LevelFunction[RegionProperty[#, var, "FastDescription"][[1, 2]]] & }] // Grid[Insert[#, {ConvexRegionQ, BoundedRegionQ, RegionDimension, RegionEmbeddingDimension, RegionMeasure, RegionCentroid, FastDescription, ImplicitDescription, RegionElement, LevelFunction}, 2]\[Transpose], Dividers -> All, FrameStyle -> GrayLevel[.8], Alignment -> Left] & // Quiet 

In addition of BoxRegion, other *Regions also seems to be used to declare regions:

test for 7D triangle

Maybe some of them (LevelFunction) work only on "full-rank" regions?

test for simplex

Some regions look like special cases:

Source Link
Silvia
  • 27.7k
  • 3
  • 86
  • 172
Loading