DeletThinTriangles

Have a suggestion for improving DPlot or a question about existing features? Let us know

Moderator: DPlotAdmin

Post Reply
simply
Posts: 40
Joined: Mon Sep 25, 2006 1:53 pm

DeletThinTriangles

Post by simply »

Is it possible to get an example of use of this command?
Last edited by simply on Mon Sep 12, 2011 2:21 pm, edited 2 times in total.
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

If you have the DPLOTLIB demo programs run ctest.exe. Select 3 (contour plot with randomly-spaced points). Use 1000 or so points.

Once the plot is produced switch to a 3D view so it will be a little more obvious what is going on. You'll probably see near-vertical triangles along the edges of the surface. Those are the triangles we want to eliminate.

Select File>Macro. Type a name for the macro, then click Edit/Create. In the macro editor type

DeleteThinTriangles(5)

This will delete all triangles along the exterior of the surface with interior angles less than 5 degrees.

From your own program, you'd use

DPlot_Command(DocNum,"[DeleteThinTriangles(5)]");
Visualize Your Data
support@dplot.com
simply
Posts: 40
Joined: Mon Sep 25, 2006 1:53 pm

Post by simply »

DPlotAdmin wrote:I

DeleteThinTriangles(5)

This will delete all triangles along the exterior of the surface with interior angles less than 5 degrees.

From your own program, you'd use

DPlot_Command(DocNum,"[DeleteThinTriangles(5)]");
why you choose 5 degrees?
Last edited by simply on Mon Sep 12, 2011 2:21 pm, edited 2 times in total.
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

No particular reason. If you're looking for an answer to "what's the best angle to use?" - there isn't one. 5 will generally get rid of most problem triangles. Any value greater than 15 or so and you risk deleting triangles you might have wanted to keep. But there is no standard, always correct answer; you need to know something about the layout of your data to know what value is appropriate.
Visualize Your Data
support@dplot.com
Post Reply