DeletThinTriangles
Moderator: DPlotAdmin
DeletThinTriangles
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.
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
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)]");
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
support@dplot.com
why you choose 5 degrees?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)]");
Last edited by simply on Mon Sep 12, 2011 2:21 pm, edited 2 times in total.
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
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
support@dplot.com