What’s New in Geometry

Charles Pooh
Algorithms R&D, Wolfram Research

Join the Conversation #WolframTechConf

Overview

1. Improvements

2. New features

3. Plans

Improvements

Improvements – Boolean Operations

(RefLink[RegionIntersection, paclet:ref/RegionIntersection]) (updated) — greatly improved support for Boolean operations

(RefLink[RegionUnion, paclet:ref/RegionUnion])  ▪  (RefLink[RegionDifference, paclet:ref/RegionDifference])  ▪  (RefLink[BooleanRegion, paclet:ref/BooleanRegion])  ▪  (RefLinkPlain[..., paclet:guide/DerivedRegions])

RegionUnion[Cuboid[],Cuboid[{0.5,0.5,0.5}]]

RegionIntersection[,]

Improvements – Boolean Operations

(RefLink[RegionIntersection, paclet:ref/RegionIntersection]) (updated) — greatly improved support for Boolean operations

(RefLink[RegionUnion, paclet:ref/RegionUnion])  ▪  (RefLink[RegionDifference, paclet:ref/RegionDifference])  ▪  (RefLink[BooleanRegion, paclet:ref/BooleanRegion])  ▪  (RefLinkPlain[..., paclet:guide/DerivedRegions])

Improvements – Region Discretization

(RefLink[DiscretizeGraphics, paclet:ref/DiscretizeGraphics]), (RefLink[BoundaryDiscretizeGraphics, paclet:ref/BoundaryDiscretizeGraphics])(updated) — improved graphics discretization

(RefLink[DiscretizeRegion, paclet:ref/DiscretizeRegion])  ▪  (RefLink[BoundaryDiscretizeRegion, paclet:ref/BoundaryDiscretizeRegion])

GraphicsRow[{,},Frame -> True]

bspline=BSplineSurface[,SplineKnots->,SplineDegree->2,SplineWeights->,SplineClosed->{False,True}];

mesh=DiscretizeGraphics[bspline]

Improvements – Topological Operations

(RefLink[CylindricalDecomposition, paclet:ref/CylindricalDecomposition]) (updated) — now compute interior, exterior, boundary, etc.

"Boundary"  ▪  "Closure"  ▪  "Interior"  ▪  "Components"

CylindricalDecomposition[(x^4)≥(x^2)+(y^2),{x,y}]

CylindricalDecomposition[(x^4)≥(x^2)+(y^2),{x,y},"Boundary"]

Improvements – Topological Operations

(RefLink[CylindricalDecomposition, paclet:ref/CylindricalDecomposition]) (updated) — now compute interior, exterior, boundary, etc.

"Boundary"  ▪  "Closure"  ▪  "Interior"  ▪  "Components"

CylindricalDecomposition[(x^4)≥(x^2)+(y^2),{x,y}]

CylindricalDecomposition[(x^4)≥(x^2)+(y^2),{x,y},"Components"]

Improvements – Region Measures

(RefLink[SurfaceArea, paclet:ref/SurfaceArea]) — gives the area of the boundary of a volume

ArcLength, Area, Volume, Perimeter, SurfaceArea, RegionMeasure (updated) — now supports Assumptions, GenerateConditions, WorkingPrecision, PrecisionGoal, AccuracyGoal, PerformanceGoal

SurfaceArea[Ball[]]

ℛ=RegionIntersection[Ball[{0,0,0},1],Ball[{0,0,1},1]];

Region[ℛ]

SurfaceArea[ℛ]

Improvements – Region Measures

(RefLink[SurfaceArea, paclet:ref/SurfaceArea]) — gives the area of the boundary of a volume

ArcLength, Area, Volume, Perimeter, SurfaceArea, RegionMeasure (updated) — now supports Assumptions, GenerateConditions, WorkingPrecision, PrecisionGoal, AccuracyGoal, PerformanceGoal

Area[ImplicitRegion[x^2+a y^2≤1,{x,y}],GenerateConditions->True]

Area[ImplicitRegion[x^2+a y^2≤1,{x,y}],Assumptions->a<0]

Improvements – Graphics Integration

EmptyRegion, FullRegion,  MeshRegion, BoundaryMeshRegion – new graphics primitives.

mesh=MengerMesh[2,3]

Graphics3D[mesh]

Improvements – Transformed Regions

TransformedRegion, InverseTransformedRegion (updated) – automatic structure analysis, input-output type preservation

reg=Tetrahedron[{{1,0,0},{1,0,1},{1,1,1},{0,0,1}}];

f=Function[x,{(IndexedDefault[x, 1]) +(IndexedDefault[x, 2]),(IndexedDefault[x, 1])+(IndexedDefault[x, 3]),(IndexedDefault[x, 1])}];

InverseTransformedRegion[reg,f]

mesh=BoundaryMeshRegion[{{0,0},{1,0},{0,1}},Line[{1,2,3,1}]];

f=Function[x,{(IndexedDefault[x, 1]) (IndexedDefault[x, 2]),(IndexedDefault[x, 1])+(IndexedDefault[x, 2])}];

TransformedRegion[mesh,f]

reg=ImplicitRegion[(x^2)+(y^2)≤1,{x,y}];

f=Function[x,{(IndexedDefault[x, 1]) (IndexedDefault[x, 2]),(IndexedDefault[x, 1])+(IndexedDefault[x, 2])}];

InverseTransformedRegion[reg,f]

More Improvements

∘ Automatic selection of algorithms

∘ Multi-representation support and recognition

∘ Canonicalization of basic primitives

∘ Support of Assumptions, GenerateConditions, WorkingPrecision, PrecisionGoal, AccuracyGoal, PerformanceGoal, …

∘ Performance improvements

∘ And more

New in 12 – Angles

({{,                                                                  }, {"", ""}})

PlanarAngle

PlanarAngle[p->{(Subscript[q, 1]),(Subscript[q, 2])}] – angle between two half-lines

({{, }, {"Counterclockwise", "Clockwise"}})

PlanarAngle[{0,0}->{{1,0},{1,1}}]

PlanarAngle[{0,0}->{{1,0},{1,1}}, "Counterclockwise"]

PlanarAngle[{0,0}->{{1,0},{1,1}}, "Clockwise"]

PlanarAngle[{0,0}->{{1,0},{1,a}}]

PlanarAngle

PlanarAngle[{(Subscript[q, 1]),p,(Subscript[q, 2])}] – angle between two half-lines

({{, , }, {"Interior", "Exterior", "FullExterior"}})

PlanarAngle[{{0,0},{1,0},{1,1}}, "Interior"]

PlanarAngle[{{0,0},{1,0},{1,1}}, "Exterior"]

PlanarAngle[{{0,0},{1,0},{1,1}}, "FullExterior"]

DihedralAngle

DihedralAngle[{(Subscript[p, 1]),(Subscript[p, 2])},{v,w}] – angle between two half-planes

DihedralAngle[{{0,0,0},{0,1,0}},{{1,0,1},{1,0,0}}]

DihedralAngle[HalfPlane[{{0,0,0},{0,1,0}},{0,1,1}],HalfPlane[{{0,0,0},{0,1,0}},{1,0,0}]]

Graphics3D[{HalfPlane[{{0,0,0},{0,1,0}},{0,1,1}],HalfPlane[{{0,0,0},{0,1,0}},{1,0,0}]}]

DihedralAngle

DihedralAngle[{(Subscript[p, 1]),(Subscript[p, 2])},{v,w}] – angle between two half-planes

coords=QuantityMagnitude[ChemicalData["Chloral","AtomPositions"]];
Show[{ChemicalData["Chloral","MoleculePlot"],Graphics3D[Table[Style[Text[i,coords[[i]]],Bold],{i,Length[coords]}]]}]

coords=QuantityMagnitude[ChemicalData["Chloral","AtomPositions"]];

DihedralAngle[coords[[{5,6}]], {Subtract@@coords[[{3,5}]],Subtract@@coords[[{4,6}]]}]

SolidAngle

SolidAngle[p,{u,v,...}] – angle at a p and spanned by vectors {u,v,...}

({{, }, {"2D", "3D"}})

SolidAngle[{0,0}, {{1,0}, {1,1}}]

SolidAngle[{0,0,0},{{1,0,1},{1,1,1},{0,0,1}}]

New in 12 - Synthetic Geometry [Experimental]

GeometricScene  ▪  FindGeometricConjecture  ▪  GeometricAssertion  ▪  RandomInstance

TriangleConstruct  ▪  TriangleCenter  ▪  AngleBisector  ▪  Midpoint

pappusHyps=GeometricScene[
{"A","B","C","D","E","F","X","Y","Z"},
{
Line[{{"A","B","C"},{"D","E","F"},{"A","X","E"},{"B","X","D"},{"A","Y","F"},{"C","Y","D"},{"B","Z","F"},{"C","Z","E"}}],
Style[InfiniteLine[{"X","Z"}],Red]
}
];

pappusPic=RandomInstance[pappusHyps,RandomSeeding->1]

FindGeometricConjectures[pappusPic]["Conclusions"]

New in 12 – Polygons

Polygon

(RefLink[Polygon, paclet:ref/Polygon])[{(Subscript[p, 1]),…,(Subscript[p, n])}] is a plane region, representing all the points inside the closed curve with line segments {(Subscript[p, 1]),(Subscript[p, 2])},…,{(Subscript[p, n-1]),(Subscript[p, n])} and {(Subscript[p, n]),(Subscript[p, 1])}.

A point is an element of the polygon if a ray from the point in any direction in the plane crosses the boundary line segments an odd number of times.

({{, , (Spacer1), , }})

Polygon[{{0.35, 0.2}, {0.9, 0.75}, {0.1, 0.55}, {0.9, 0.35}, {0.42, 0.9}}]

Region[%]

Polygon

(RefLink[Polygon, paclet:ref/Polygon])[{(Subscript[p, 1]),…,(Subscript[p, n])}->{{(Subscript[q, 1]),…,(Subscript[q, m])},…}] specifies a polygon with holes consisting of an outer polygon (RefLink[Polygon, paclet:ref/Polygon])[{(Subscript[p, 1]),…,(Subscript[p, n])}] and one or several inner polygons (RefLink[Polygon, paclet:ref/Polygon])[{(Subscript[q, 1]),…,(Subscript[q, m])}],….

A point is an element of the polygon if it is in the outer polygon, but not in any inner polygon.

({{, }})

Polygon[{{0.1, 0.55}, {0.37, 0.48}, {0.35, 0.2}, {0.58, 0.43},{0.9, 0.35}, {0.71, 0.56}, {0.9, 0.75}, {0.61,0.67}, {0.42, 0.9}, {0.39, 0.62}}->{{0.39,0.62},{0.61,0.67},{0.71,0.56},{0.58,0.43},{0.37,0.48}}]

Region[%]

Polygon

(RefLink[Polygon, paclet:ref/Polygon])[{(Subscript[p, 1]),…,(Subscript[p, n])},data] represents a polygon in which coordinates given as integers i in data are taken to be (Subscript[p, i]).

({{      , (RefLink[Polygon, paclet:ref/Polygon])[{(Subscript[p, 1]),…,(Subscript[p, n])},{(Subscript[b, 1]),…,(Subscript[b, n])}]                                                                        , polygon boundary points {(Subscript[p, (Subscript[b, 1])]),…,(Subscript[p, (Subscript[b, k])])}                                               }, {      , (RefLink[Polygon, paclet:ref/Polygon])[{(Subscript[p, 1]),…,(Subscript[p, n])},{{(Subscript[o, 1]),…,(Subscript[o, k])}->{{(Subscript[i, 1]),…,(Subscript[i, l])},…}]                                  , outer polygon boundary points {(Subscript[p, (Subscript[o, 1])]),…,(Subscript[p, (Subscript[o, k])])} and inner polygon boundary {(Subscript[p, (Subscript[i, 1])]),…,(Subscript[p, (Subscript[i, l])])} etc.}, {      , (RefLink[Polygon, paclet:ref/Polygon])[{(Subscript[p, 1]),…,(Subscript[p, n])},{{(Subscript[b, 1]),…,(Subscript[b, n])},{(Subscript[o, 1]),…,(Subscript[o, k])}->{{(Subscript[i, 1]),…,(Subscript[i, l])},…},…}], a collection of several polygons                                                  }})

Polygon[{{0.1,0.55},{0.35,0.2},{0.37,0.48},{0.39,0.62},{0.42,0.9},{0.58,0.43},{0.61,0.67},{0.71,0.56},{0.9,0.35},{0.9,0.75}},{1,3,2,6,9,8,10,7,5,4}->{{4,7,8,6,3}}]

Region[%]

Polygon Functions

Polygons – new guide page

New in 12 – Polyhedra

Region[UniformPolyhedron["GreatIcosidodecahedron"], PlotTheme->"Web"]

Polyhedron

(RefLink[Polyhedron, paclet:ref/Polyhedron])[{(Subscript[f, 1]),…,(Subscript[f, n])}] is a volume region, representing all the points inside the closed surface with polygon faces (Subscript[f, i]).

A point is an element of the polyhedron if a ray from the point in any direction crosses the boundary polygon faces an odd number of times.

({{, }})

Polyhedron[{{{1,0,0},{0,1,0},{0,0,1}},{{0,1,0},{1,0,0},{0,0,0}},{{0,0,1},{0,0,0},{1,0,0}},{{0,0,0},{0,0,1},{0,1,0}}}]

Graphics3D[%]

Polyhedron

(RefLink[Polyhedron, paclet:ref/Polyhedron])[{(Subscript[f, 1]),…,(Subscript[f, n])}->{{(Subscript[g, 1]),…,(Subscript[g, m])},…}] specifies a polyhedron with voids consisting of an outer polyhedron (RefLink[Polyhedron, paclet:ref/Polyhedron])[{(Subscript[f, 1]),…,(Subscript[f, n])}] and one or several inner polyhedra  (RefLink[Polyhedron, paclet:ref/Polyhedron])[{(Subscript[g, 1]),…,(Subscript[g, m])}],….

Polyhedron[{{{-1.11352,0.809017,-0.262866},{-0.688191,0.5,-1.11352},{-0.688191,-0.5,-1.11352},{-1.11352,-0.809017,-0.262866},{-1.37638,0.,0.262866}},{{1.37638,0.,-0.262866},{1.11352,0.809017,0.262866},{0.688191,0.5,1.11352},{0.688191,-0.5,1.11352},{1.11352,-0.809017,0.262866}},{{1.11352,-0.809017,0.262866},{0.688191,-0.5,1.11352},{-0.262866,-0.809017,1.11352},{-0.425325,-1.30902,0.262866},{0.425325,-1.30902,-0.262866}},{{0.688191,-0.5,1.11352},{0.688191,0.5,1.11352},{-0.262866,0.809017,1.11352},{-0.850651,0.,1.11352},{-0.262866,-0.809017,1.11352}},{{0.688191,0.5,1.11352},{1.11352,0.809017,0.262866},{0.425325,1.30902,-0.262866},{-0.425325,1.30902,0.262866},{-0.262866,0.809017,1.11352}},{{1.11352,0.809017,0.262866},{1.37638,0.,-0.262866},{0.850651,0.,-1.11352},{0.262866,0.809017,-1.11352},{0.425325,1.30902,-0.262866}},{{1.37638,0.,-0.262866},{1.11352,-0.809017,0.262866},{0.425325,-1.30902,-0.262866},{0.262866,-0.809017,-1.11352},{0.850651,0.,-1.11352}},{{-0.425325,1.30902,0.262866},{0.425325,1.30902,-0.262866},{0.262866,0.809017,-1.11352},{-0.688191,0.5,-1.11352},{-1.11352,0.809017,-0.262866}},{{0.262866,0.809017,-1.11352},{0.850651,0.,-1.11352},{0.262866,-0.809017,-1.11352},{-0.688191,-0.5,-1.11352},{-0.688191,0.5,-1.11352}},{{0.262866,-0.809017,-1.11352},{0.425325,-1.30902,-0.262866},{-0.425325,-1.30902,0.262866},{-1.11352,-0.809017,-0.262866},{-0.688191,-0.5,-1.11352}},{{-0.425325,-1.30902,0.262866},{-0.262866,-0.809017,1.11352},{-0.850651,0.,1.11352},{-1.37638,0.,0.262866},{-1.11352,-0.809017,-0.262866}},{{-0.850651,0.,1.11352},{-0.262866,0.809017,1.11352},{-0.425325,1.30902,0.262866},{-1.11352,0.809017,-0.262866},{-1.37638,0.,0.262866}}}->{{{0.837158,0.,-0.29598},{-0.418579,0.725,-0.29598},{-0.418579,-0.725,-0.29598}},{{0.,0.,0.88794},{-0.418579,-0.725,-0.29598},{-0.418579,0.725,-0.29598}},{{-0.418579,-0.725,-0.29598},{0.,0.,0.88794},{0.837158,0.,-0.29598}},{{-0.418579,0.725,-0.29598},{0.837158,0.,-0.29598},{0.,0.,0.88794}}}]

Polyhedron

(RefLink[Polyhedron, paclet:ref/Polyhedron])[{(Subscript[p, 1]),…,(Subscript[p, n])},data] effectively replaces integers i that appear as coordinates in data by the corresponding (Subscript[p, i]).

({{      , Polyhedron[{(Subscript[p, 1]),…,(Subscript[p, n])},{(Subscript[f, 1]),…,(Subscript[f, n])}]                                                                            , polyhedron boundary faces (Subscript[f, i]) with points {(Subscript[p, (Subscript[o, 1])]),…,(Subscript[p, (Subscript[o, k])])}                                                                        }, {      , Polyhedron[{(Subscript[p, 1]),…,(Subscript[p, n])},{{(Subscript[f, 1]),…,(Subscript[f, k])}->{{(Subscript[g, 1]),…,(Subscript[g, l])},…}]                                   , outer polyhedron boundary faces (Subscript[f, i]) with points {(Subscript[p, (Subscript[o, 1])]),…,(Subscript[p, (Subscript[o, k])])} and inner polyhedron boundary faces (Subscript[g, j]) with points {(Subscript[p, (Subscript[v, 1])]),…,(Subscript[p, (Subscript[v, l])])} etc.}, {      , Polyhedron[{(Subscript[p, 1]),…,(Subscript[p, n])},{{(Subscript[b, 1]),…,(Subscript[b, n])},{(Subscript[f, 1]),…,(Subscript[f, k])}->{{(Subscript[g, 1]),…,(Subscript[g, l])},…},…}], a collection of several polyhedra                                                                                         }})

Polyhedron[{{-(1/Sqrt[3]), 0, Root[1 - 84*#1^2 + 144*#1^4 & , 2, 0]}, 
  {-1/(2*Sqrt[3]), -1/2, Root[1 - 84*#1^2 + 144*#1^4 & , 3, 0]}, 
  {-1/(2*Sqrt[3]), 1/2, Root[1 - 84*#1^2 + 144*#1^4 & , 3, 0]}, 
  {1/(2*Sqrt[3]), -1/2, Root[1 - 84*#1^2 + 144*#1^4 & , 2, 0]}, 
  {1/(2*Sqrt[3]), 1/2, Root[1 - 84*#1^2 + 144*#1^4 & , 2, 0]}, 
  {1/Sqrt[3], 0, Root[1 - 84*#1^2 + 144*#1^4 & , 3, 0]}, 
  {Root[1 - 9*#1^2 + 9*#1^4 & , 2, 0], 0, Sqrt[1/8 + Sqrt[5]/24]}, 
  {Sqrt[(3 - Sqrt[5])/6], 0, -Sqrt[(3 + Sqrt[5])/6]/2}, 
  {Root[1 - 36*#1^2 + 144*#1^4 & , 2, 0], (1 - Sqrt[5])/4, 
   -Sqrt[(3 + Sqrt[5])/6]/2}, {Root[1 - 36*#1^2 + 144*#1^4 & , 2, 0], 
   (-1 + Sqrt[5])/4, -Sqrt[(3 + Sqrt[5])/6]/2}, 
  {Root[1 - 36*#1^2 + 144*#1^4 & , 3, 0], (1 - Sqrt[5])/4, Sqrt[1/8 + Sqrt[5]/24]}, 
  {Root[1 - 36*#1^2 + 144*#1^4 & , 3, 0], (-1 + Sqrt[5])/4, 
   Sqrt[1/8 + Sqrt[5]/24]}}, {{2, 12, 1, 11, 3}, {10, 4, 1, 8, 2}, {3, 8, 1, 5, 9}, 
 {9, 11, 1, 4, 7}, {7, 5, 1, 12, 10}, {7, 10, 2, 3, 9}, {4, 12, 2, 6, 7}, {9, 6, 2, 
 8, 11}, {7, 6, 3, 11, 5}, {12, 8, 3, 6, 10}, {9, 5, 4, 10, 6}, {8, 12, 4, 5, 11}}]

Region[%]

Polyhedron Functions

Polyhedron – new guide page

What’s next?

1. More improvements (usability, functionality, …)

2. Non-linear primitives

3. More verticals and applications

Related Talks

Everything You Want to Know About Polygons & Polyhedra
          Thursday 2:00-2:30PM
              Fighting Illini

Automated Drawing, Conjectures and Proofs in Planar Geometry
          Thursday 3:30-4:00PM
              Spartan/Golden Gopher