DIST_PLOT
Contour Plots of Distance Function
DIST_PLOT
is a MATLAB program 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.
Related Data and Programs:
DISTMESH,
a MATLAB program which
is Strang and Persson's code for generating meshes over regions
with an associated distance function.
LEVELS,
a MATLAB library which
makes a contour plot, choosing the contour levels using random sampling.
TABLE_IO,
a MATLAB library which
reads and writes files
using the TABLE format; these routines are used by
DIST_PLOT_DEMO when reading the input files.
TEST_TRIANGULATION,
a MATLAB library 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,
a MATLAB program which
can make a plot of a triangulation.
TRIANGLE,
a C program which
can triangulate a region.
Reference:
-
http://math.mit.edu/~persson/mesh
Per-Olof Persson's web site.
-
Per-Olof Persson, Gilbert Strang,
A Simple Mesh Generator in MATLAB,
SIAM Review,
Volume 46, Number 2, June 2004, pages 329-345.
Source Code:
-
dist_plot.m
displays a plot of the distance function over the region.
Examples and Tests:
DIST_PLOT_DEMO displays plots for all the standard
problems used in DISTMESH:
-
dist_plot_demo.m
reads the node and triangle data for each of a set of
standard problems for DISTMESH,
and displays a plot of the distance function.
-
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.
-
dintersect.m
returns the signed distance to a region that is the intersection
of two regions.
-
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.
-
timestamp.m
prints the current YMDHMS date as a timestamp.
P01 is the circle:
P02 is the circle with a hole:
P03 is the square with a hole:
P04 is the hexagon with hexagonal hole:
P05 is the horn:
P06 is the superellipse:
P07 is the bicycle seat:
P08 is the holey pie slice:
P09 is Jeff Borggaard's square with two hexagonal holes:
P10 is the unit square:
P11 is the L-shaped region:
P12 is the John Shadid's H-shaped region:
P13 is the Sandia fork:
P14 is Marcus Garvie's Lake Alpha, with Beta Island:
P15 is Sangbum Kim's forward step region:
P16 is Kevin Pond's elbow:
P17 is the channel with a Reuleaux triangle obstruction:
P18 is the dumbbell region:
You can go up one level to
the MATLAB source codes.
Last revised on 14 March 2008.