Profile Picture

3D Surface Inaccurate Display

Posted By Daniel Csimszi 10 Years Ago
Author
Message
Daniel Csimszi
Question Posted 10 Years Ago
View Quick Profile
Forum Guru

Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)Forum Guru (50 reputation)

Group: Forum Members
Last Active: 8 Years Ago
Posts: 61, Visits: 35
Hi,

I am trying to display a 3D object with NTriangulatedSurfaceSeries but unfortunately I does no really get the object that I would like. I double checked the coordinates that I input and they seems to be right.

I would like to make a bend with a V shape in it, please find attached example.png. It is made with paint so do not except a lotBigGrin

I have attached how it looks just now as well, mesh.png

This is code how I create the coordinate:
for (int i = 90; i < 180; i++)
      {
       for (int j = 0; j < 5; j++)
         {
            //x
            surface.XValues.Add(Math.Cos(i * Math.PI / 180) * 90 + 100 + Math.Abs(j-2) * 10);
            //y
            surface.Values.Add(Math.Sin(i * Math.PI / 180) * 90);
            //z
            surface.ZValues.Add(Math.Sin(180 / 4 * j * Math.PI / 180) * 4);
            surface.Colors.Add(Color.Green);
            Console.WriteLine(j + ", " + Math.Sin(i * Math.PI / 180) * 90 + ", " + (Math.Cos(i * Math.PI / 180) * 90 + 100 + Math.Abs(-2 + j)*10));
          }
      }

Here is the output of the bottom line:

z  y                           x
0, 1.57071657935551, 30.0137074359248
1, 1.57071657935551, 20.0137074359248
2, 1.57071657935551, 10.0137074359248
3, 1.57071657935551, 20.0137074359248
4, 1.57071657935551, 30.0137074359248

The coordinates seems to be OK, any idea why it does not display the way I think it should?

Thank you,
Daniel

Attachments
example.png (863 views, 4.00 KB)
surface.png (904 views, 98.00 KB)
Nevron Support
Posted 10 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3,039, Visits: 3,746
Hi Joel,

From the "example.png" image it is a bit hard to understand what the surface should look like, but it seems that the triangulated surface is not the right choice. As you know, for the triangulated surface you have to specify just a set of points (with x,y,z coordinates) and no adjacency information. The surface series builds a triangular network in such a way that if you project the surface on the XZ plane, you will get a convex polygon. The surface that you are trying to display doesn't look like this, probably you have to use the Mesh Surface series.

Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic