Wolfram Geometric Computation | Things to Try

Make edits and run any piece of code by clicking inside the code and pressing
+
.
Geometric Modeling & Computing. Wolfram Geometry provides a comprehensive set of integrated tools and solutions for modeling, analyzing, visualizing and synthesizing geometry, tailored to everyone’s needs from beginners to advanced.

Generate and Use Mesh Regions

Create a 3D mesh using built-in functions:
Run
mesh=MengerMesh[2,3]
Compute a region measure of the mesh:
Run
SurfaceArea[mesh]
Compute another:
Run
Volume[mesh]
Use the mesh as the domain of numerical computations:
Run
Integrate[yz,{x,y,z}∈mesh]
Compute meshes from points:
Run
SeedRandom[1324];​​points=RandomReal[{-1,1},{20,2}];​​{VoronoiMesh[points,Epilog{Red,Point[points]}],DelaunayMesh[points,Epilog{Red,Point[points]}]}

Compute Properties of a Geometric Region

Import a region (this may take longer to evaluate):
Run
In[]:=
physicalregion=ResourceData["Stanford Dragon"]
Compute the rotational inertia of this region about its centroid (assuming unit density):
Run
In[]:=
ℐ=MomentOfInertia[physicalregion];
Compute the centroid, principal axes and principal moments of inertia of this region:
Run
In[]:=
center=RegionCentroid[physicalregion];​​principalAxes=Eigenvectors[ℐ];​​principalMoments=Eigenvalues[ℐ];
Visualize the region with principal axes scaled according to their eigenvalues:
Run
In[]:=
Show[physicalregion,Graphics3D[MapThread[{#1,Arrowheads[{-0.05`,0.05`}],Arrow[Tube[{-#2,#2}#30.5`+Threaded[center]]]}&,{{Red,Blue,Green},principalAxes,Normalize[principalMoments]}]]]
Out[]=

Solve Over Regions

Define a set of geometric primitives:
Run
In[]:=
primitives={Cuboid[{-3,-3,-.1},{3,3,.1}],Cylinder[{{-3,0,0},{3,0,0}},1],Cylinder[{{0,-3,0},{0,3,0}},1],Cylinder[{{0,0,-2},{0,0,2}},1]};
Use the primitives to define a constructive solid geometric region:
Run
In[]:=
csgregion=CSGRegion["Difference",{CSGRegion["Union",Most[primitives]],Last[primitives]}]
Represent geometric regions in a variety of ways:
Run
In[]:=
booleanregion=BooleanRegion[(#1||#2||#3)&&!#4&,primitives];​​RegionConvert[booleanregion,"Implicit"]
Solve a differential equation to model temperature changes over this region:
Run
In[]:=
sol=NDSolve​​
∂
t
u[x,y,z,t]==3
2
∇
{x,y,z}
u[x,y,z,t],​​DirichletCondition[u[x,y,z,t]==1,{x==3,x==-3,y==3,y==-3}],​​DirichletCondition[u[x,y,z,t]==5,
2
x
+
2
y
==1],​​u[x,y,z,0]==3,​​u,{t,0,25},{x,y,z}∈booleanregion;
Visualize the solution at a particular time:
Run
In[]:=
SliceContourPlot3DEvaluate[u[x,y,z,25]/.sol],{"ZStackedPlanes",Range[-1,1,0.2]},​​{x,y,z}∈Cuboid[{-3,-3,-3},{3,3,3}],
options

Animate the numerical solution (this may take longer to evaluate):
Run
In[]:=
ListAnimateTable​​RasterizeSliceContourPlot3DEvaluate[u[x,y,z,t]/.sol],"CenterPlanes",​​{x,-3,3},{y,-3,3},{z,-3,3},
options
,{t,0,5.,.1},​​ControlPlacement->Top

Import, Repair, Export and Print a 3D Model

Import a 3D model:
Run
In[]:=
model=ResourceData["Stanford Bunny"]
Find the holes at the bottom of this mesh:
Run
In[]:=
FindMeshDefects[model,ViewPoint->{0.3,-1.3,-1.5}]
Repair the holes:
Run
In[]:=
repairedmodel=RepairMesh[model,ViewPoint->{0.3,-1.3,-1.5}]
Export the model to a file:
Run
In[]:=
Export["example.stl",repairedmodel]
Send the model to a 3D printing service:
Run
Printout3D[repairedmodel,"Sculpteo"]

Explore Synthetic Geometry

Find a random instance of a scene described by geometric propositions:
Run
scene=RandomInstance[​​GeometricScene[{a,b,c,o},{Triangle[{a,b,c}],CircleThrough[{a,b,c},o],o==Midpoint[{a,c}]}]​​]
Explore conjectures associated with a scene’s known propositions:
Run
conjectures=FindGeometricConjectures[scene]
Obtain a list of conjectures associated with the specified scene:
Run
conjectures["Conclusions"]