LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XYZ array to intensisty map

I have the "Intensisty MAP.vi" example useful to build a stl file.

I would like to transform in intensity map the XYZ ARRAY points in "XYZ ARRAY.vi" example, in order to build a stl file. The stl would have a surface recontruction similar to "3D surface" in "XYZ ARRAY.vi".

It permits to directly work with mathematical functions in a 3D print environment.

 

Download All
0 Kudos
Message 1 of 14
(378 Views)

You could use to turn your xyz data into a 2D array by interpolation using this function.

 

altenbach_0-1758497014495.png

 

Message 2 of 14
(331 Views)

Dear Altenbach,
great! It creates a file using interpolated points.


Unfortunately the generated triangulation is not very good, as visible in 1.jpg the surface is not smooth. It could be due to the bottom which is a closed surface (2.jpg), it must be open like to top surface. But I am not sure, perhaps the ramp pattern needs more points?
I've tried using "biharmonic spline" as interpolation method and the result 3.jpg is a very smooth surface, probably it is due to the bottom in this case it is not a flat surface and a curved surface favorites a better triangulation transition. Anyway it is not the original math function so "biharmonic spline" is not usable.

 

Any idea how to solve?

best regards,

Max

 

 

Download All
0 Kudos
Message 3 of 14
(282 Views)

Right now it does a 128x128 resampled grid (default for the ramp). Maybe you could use more points?

0 Kudos
Message 4 of 14
(266 Views)

Ok I'll try to increase original points.

Current Ramp Pattern size is 128, what does it depend on?

Ramp "start", "end" why -100 to 100?

 

thank you,

Max

0 Kudos
Message 5 of 14
(226 Views)

Hi Max,

 


@M_Ricci wrote:

Current Ramp Pattern size is 128, what does it depend on?


Why don't you read the help for that function?

All its input values are explained and their default values are mentioned…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 14
(221 Views)

@M_Ricci wrote:

Ok I'll try to increase original points.

Current Ramp Pattern size is 128, what does it depend on?

Ramp "start", "end" why -100 to 100?

 

thank you,

Max


The range is independent of the number of points.

 

Your main problem is that your data is quite sparse and limited to only four levels in Z. Mapping it to a regular grid in xy is probably not the best solution. How much more do you know about the data? Maybe you should find a parametric surface instead? You probably could find a way to turn the original points into a set of triangles directly.

Message 7 of 14
(199 Views)

The 4 levels are a worst case, yes I can increase Z levels number and it works better.

 

"...find a way to turn the original points into a set of triangles directly."

This is a very interesting suggestion, I will work on.

 

Now I am trying to modify ramp pattern values of:

"Samples"

"Start"

"End" 

 

these values change the final object dimension, because they influence XY output values, while Z remains always the same.

 

Is there a possibility to link the original XY values with Samples, Start, End, in order to maintain always the same XYZ proportions, so the final output dimension? 

0 Kudos
Message 8 of 14
(183 Views)

I imagine ramp Start and End linked to XY min and max array values:

 

  

image.jpg

 

 

...but how to link ramp Samples?

 

0 Kudos
Message 9 of 14
(177 Views)

Unless you can assume that X and Y have the same min&max, you would need two ramps, one for X and one for Y. And you still have values in the corners that are probably not part of your structure.

 

The number of samples can be freely chosen and just define the spacing in the output grid.

 

0 Kudos
Message 10 of 14
(165 Views)