This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Geometry

Define geometry

Include a 2-D or 3-D geometry into your model by using one of these approaches:

  • Import an STL file into MATLAB®by using importGeometry. The STL file format is very common and supported by most CAD software. In case of a planar STL geometry, the toolbox converts it to a 2-D geometry by mapping it to the X-Y plane.

  • Reconstruct a geometry from a mesh by using geometryFromMesh. This function works with triangulated meshes, including planar, volume, and surface triangulation that bounds a closed volume.

For 3-D problems, you can create a geometry by stacking or nesting cubes, cylinders, or spheres.

For 2-D problems, you can create a geometry via the constructive solid geometry (CSG), by writing a geometry function, or by using the polyshape function. The CSG approach uses a set of solid building blocks (square, rectangle, circle, ellipse, and polygon) and combines them to define complex geometries. Alternatively, you can create a 2-D geometry in the PDE Modeler app. The app uses the CSG approach.

Functions

expand all

geometryFromMeshCreate geometry from mesh
importGeometryImport geometry from STL data
pdegplotPlot PDE geometry
geometryFromEdgesCreate 2-D geometry
decsgDecompose constructive solid geometry into minimal regions
csgchkCheck validity of Geometry Description matrix
csgdelDelete borders between minimal regions
pdearclInterpolation between parametric representation and arc length
wgeomWrite geometry specification function
pdecircDraw circle in PDE Modeler app
pdeellipDraw ellipse in PDE Modeler app
pdepolyDraw polygon in PDE Modeler app
pderectDraw rectangle in PDE Modeler app
multicuboidCreate geometry formed by several cubic cells
multicylinderCreate geometry formed by several cylindrical cells
multisphereCreate geometry formed by several spherical cells

Apps

PDE ModelerSolve partial differential equations in 2-D regions

Properties

AnalyticGeometry Properties2-D geometry description
DiscreteGeometry Properties3-D geometry description

Topics

2-D and 3-D Geometry

STL File Import

Include a geometry into your PDE model by importing an STL file.

Geometry from Triangulated Mesh

Reconstruct a geometry from a tetrahedral mesh and from a planar multidomain mesh.

Geometry from polyshape

Reconstruct a geometry from a triangulated mesh created by the MATLAB polyshape function.

Geometry from alphaShape

Reconstruct a geometry from a triangulated surface mesh created by the MATLAB alphaShape function.

2-D Geometry Only

Three Ways to Create 2-D Geometry

Choose an approach for creating a 2-D geometry.

2-D Geometry Creation in PDE Modeler App

Draw, rotate, and combine basic shapes in the PDE Modeler app.

2-D Geometry Creation at Command Line

Use constructive solid geometry (CSG) modeling approach to combine basic shapes at the command line.

Parametrized Function for 2-D Geometry Creation

Create a 2-D geometry by using a parametrized function.

3-D Geometry Only

Cuboids, Cylinders, and Spheres

Create a 3-D geometry by stacking or nesting three basic volumes.