Geometry package: Difference between revisions

Jump to navigation Jump to search
Line 27: Line 27:
Now we have our SVG as a polygon compatible with the Geometry package format. You can plot the polygon using the function <tt>drawPolygon</tt>. the next step is to mesh the interior of the polygon. To do this we could just call <tt>delaunay</tt> 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 [http://octave.sourceforge.net/msh/index.html msh], which requires [http://geuz.org/gmsh/ Gmsh] installed in your system. The function data2geo in the Geometry package makes our work very easy:
Now we have our SVG as a polygon compatible with the Geometry package format. You can plot the polygon using the function <tt>drawPolygon</tt>. the next step is to mesh the interior of the polygon. To do this we could just call <tt>delaunay</tt> 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 [http://octave.sourceforge.net/msh/index.html msh], which requires [http://geuz.org/gmsh/ Gmsh] installed in your system. The function data2geo in the Geometry package makes our work very easy:


</pre>
<pre>
pkg load msh
pkg load msh
filename = tmpnam ();
filename = tmpnam ();
657

edits

Navigation menu