LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to cut off some of the cones along the plane for 3D Picture?

Hello dear colleagues 

 

For 3D picture I have set height of 90 cones (X, Y, Z coordinates height of cone and his radius) and two planes left and right (see orange lines in picture below). Cones are in two rows for 45. Planes are with known coordinates.

Is it possible to cut off programmatically some of the cones along the planes left and right? Or may be try to program "Side truncated cone object" for this task? Or my only way is to go into "Mesh" and draw every of 90 cones how own "Mesh" object?

If I select "Mesh" how then to draw surface every cones - as points or triangles?

 

Previously I tried drawing the surface of 90 cones through 3D Parametric surface, but in it I was not at all satisfied with the scale. Thus in 3D Parametric Surface visually the surface looks like shriveled in length, although in reality the surface should look like cones. Due to the fact that the scale does not match - the cones do not look like cones, in the same time in 3D Picture cones looks good and scale also good in 3D Picture.

 

 

Curr93_0-1639308781573.png

 

0 Kudos
Message 1 of 7
(2,348 Views)

Any comments would help me so much

0 Kudos
Message 2 of 7
(2,275 Views)

Since you're desperate 😉.

 

Well I'm not too sure if there's a way to cut of the rendering. You can probably change the transformation matrices to trunk rendering, but you'd have 0 control of the effect. Rendering will simply stop at the plane.

 

However, the cone is just a bunch of triangles. There's nothing stopping you from making a mesh yourself, with a bunch of triangles representing a trunked cone.

 

It might be easier to use a cylinder as a basis, but it's all just a matter of coordinates, and triangles between the coordinates. See for instance Truncated Cone | Superprof 

 

There are several ways to truncate a cone. If it's just the height (e.g. the cut-off plane is always horizontal to the cylinder's ground plane), it will be relatively easy to make a routine that generates the coordinates.

 

If the cut-off plane is 'random' you'd probably have to go over each vertex (the lines between the points), calculate intersection, insert those points, make new triangles. This will be much harder, but more generic.

Message 3 of 7
(2,271 Views)

Dear colleagues!

 

I am trying to get a cone surface from points, but the cone is not working, only a Christmas tree 😊, although the surface points are generated perfectly correctly, but the desired rendering from the Mesh function is not available. In order to cut off the necessary parts of the cones, I would like to first get the desired rendering at least approximately similar "Create Cone.vi"

 

Would you be so kind to see my code

 

 

Download All
0 Kudos
Message 5 of 7
(2,134 Views)

You're defining points. The function is drawing points...

 

How can the function know what triangles to draw between the points?

 

Answer: Provide a list of indices.

 

How the indices are interpreted depends on the draw mode. A triangle strip or fan requires less indices, but I thing you need triangles draw mode (a fan or strip won't work).

 

You need to create this list of indices, so you get (something like):

0, 1, 18, 

1, 18, 19,

1, 2, 19,

etc.

 

The ordering (CW or CCW) is relevant for lightning, (back face) culling and texturing.

 

Note that all the layers of points will make your cylinder less smooth. A bottom circle with triangles between the points and the top would be enough (although you need 2 circles for a clipped cone).

Message 6 of 7
(2,131 Views)