depth analysis

Mar 2, 2016 at 8:32 AM
is that surface depth analysis possible in triangle.net? suggest me algorithm if it is.
Coordinator
Mar 2, 2016 at 10:13 AM
Edited Mar 3, 2016 at 9:13 AM
It's not particularly helpful if you are opening all these discussions with just one line of text.
  1. Give more details about what you actually want. What is surface depth analysis?
  2. I already said that contour plotting will not be part of Triangle.NET. Did you have a look at CONREC? It's really easy to adapt the algorithm to triangle meshes.
  3. The DISCUSSIONS section is not about requesting something, it's about discussing!
Mar 3, 2016 at 2:51 AM
Edited Mar 3, 2016 at 2:51 AM
constructs the surface plot by connecting neighboring matrix elements to form a mesh of quadrilaterals.
Displaying both connecting lines and faces of the surface in colors.
is that possible like ocean map with different surface color or oceanic wave movement etc.
Coordinator
Mar 3, 2016 at 9:49 AM
Edited Mar 3, 2016 at 9:55 PM
Rendering capabilities of Triangle.NET are very limited. Using the Triangle.Rendering assembly, you can render the following images:

contour-plot-01.png
Dropbox: contour-plot-01.png

contour-plot-02.png
Dropbox: contour-plot-02.png

This is done using GDI, so it's very slow. If you want to render high quality images (or 3D), you should use OpenGL.

The contours in the second image were computed using CONREC.
// The region to plot.
var region = new Rectangle(-1.4, -1.4, 2.8, 2.8);

// Generate mesh.
var mesh = (Mesh)GenericMesher.StructuredMesh(region, 36, 36);

// Render mesh.
renderManager.Set(mesh, true);

// The function to render.
Func<double, double, double> f = (x, y) => Math.Sin(2 * x) * Math.Cos(2 * y);

var values = new float[mesh.Vertices.Count];

// Ensure linear numbering of nodes.
mesh.Renumber();

float value, min, max;

// Compute function values for each node.
foreach (var v in mesh.Vertices)
{
    values[v.ID] = value = (float)f(v.X, v.Y);

    min = Math.Min(min, value);
    max = Math.Max(max, value);
}

// Render function.
renderManager.Context.ColorManager.ColorMap = ColorMap.Jet(256);
renderManager.Update(values);

// Compute 10 contour levels using CONREC.
var data = ContourGenerator.Contour(mesh, values, 10);

// Render contours.
renderManager.Set(data.Points, data.Edges, false);
Mar 7, 2016 at 3:09 AM
wo80 wrote:
Thank you for providing me an idea .