Contents

Relation to matGeom

octCLIP

Piece-wise 2D polynomial polygons

Tutorials

Loading SVG files

Meshing Octave

Under construction

This tutorial shows the workflow to generate a triangular mesh inside an arbitrary region.
This tutorial requires that you install the package fpl and msh (which requires Gmsh installed in your system). Alternatively, the core function delaunay could be used (the tutorial explains how) but the result aren't so pretty.

The first part of the tutorial requires an interesting shape. If you have Inkscape you can use the previous tutorial to load it into octave. Here I will be using this SVG.

Now we have our SVG as a polygon compatible with the Geometry package format. You can plot the polygon using the function drawPolygon. the next step is to mesh the interior of the polygon. To do this we could just call delaunay on the polygon and be done with it, but in general such mesh wont be so nice (you will need to add interior points). A very effective way of generating a good mesh is to use the package msh, which requires Gmsh installed in your system. The function data2geo in the Geometry package makes our work very easy: