dist_plot
dist_plot,
an Octave code which
creates a color contour plot of the distance function, as used in Strang and
Persson's distmesh() program.
Usage:
dist_plot ( p, t, @fd )
where
-
p, a list of node coordinates;
-
t, a list of node indices forming a triangulation of the nodes;
-
@fd, points to a distance function d = fd ( p )
which computes the distance d from the region to any
point p.
Licensing:
DIST_PLOT is based in part on DISTMESH, which
is Copyright (C) 2004 Per-Olof Persson.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
If you use DISTMESH in any program or publication, please
acknowledge its authors by citing the reference.
Languages:
dist_plot is available in
a MATLAB version and
an Octave version.
Related Data and Programs:
dist_plot_test
distmesh,
an Octave code which
is Strang and Persson's code for generating meshes over regions
with an associated distance function.
levels,
an Octave code which
makes a contour plot, choosing the contour levels using random sampling.
table_io,
an Octave code which
reads and writes files
using the TABLE format.
test_triangulation,
an Octave code which
defines some test regions for triangulation.
triangulation_order3,
a data directory which
discusses order 3 triangulations;
The node and triangle files input to DIST_PLOT are an example
of such triangulations.
triangulation_plot,
an Octave code which
can make a plot of a triangulation.
Reference:
-
Per-Olof Persson, Gilbert Strang,
A Simple Mesh Generator in MATLAB,
SIAM Review,
Volume 46, Number 2, June 2004, pages 329-345.
Source Code:
-
dcircle.m
returns the signed distance of one or more points to a circle.
-
ddiff.m
returns the signed distance of one or more points to a region
defined as the set difference of two regions.
-
dexpr.m
computes the signed distance for a general implicit expression.
-
dintersect.m
returns the signed distance to a region that is the intersection
of two regions.
-
dist_plot.m
displays a plot of the distance function over the region.
-
dpoly.m
returns the signed distance of one or more points to a polygon.
-
drectangle.m
returns the signed distance of one or more points to a rectangle.
-
dsegment.m
returns the signed distance
of one or more points to a set of line segments.
-
dsegment.dll
(binary file), a Windows DLL file, returns the signed distance
of one or more points to a set of line segments. This version
is faster than the M-file.
-
dunion.m
returns the signed distance to a region that is the union of
two regions.
-
file_column_count.m
counts the number of columns in a table file.
-
file_row_count.m
counts the number of rows in a table file.
-
i4mat_data_read.m
reads the data of an I4MAT file.
-
i4mat_header_read.m
reads the header of an I4MAT file.
-
i4mat_read.m
reads an I4MAT file.
-
i4mat_write.m
writes an I4MAT file.
-
protate.m
rotates a set of points by a given angle.
-
pshift.m
shifts a set of points by a given increment.
-
r8mat_data_read.m
reads the data of an R8MAT file.
-
r8mat_header_read.m
reads the header of an R8MAT file.
-
r8mat_write.m
writes an R8MAT file.
-
s_len_trim.m
returns the length of a string to the last nonblank.
-
s_word_count.m
counts the number of "words" in a string.
Last revised on 13 June 2023.