LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2D array to 3D graph to form a half sphere

Solved!
Go to solution

Hi, i have a 

I have a two-dimensional array, and I can plot a 3d graph as shown in the figure, but the values are plotted one after another, and what I need is a half-sphere shape with these data, any idea how I can do it.
thanks

Download All
0 Kudos
Message 1 of 9
(4,390 Views)

You'll have to post what you have done (how you got your numbers, whether by using LV or not, and your VI to produce the graph) in order to help. Attach any relevant VIs as the LV files themselves, not as plain pictures.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 2 of 9
(4,363 Views)

Hi, thanks for answering. here is my code, i´m measuring the thickness of a half sphere and  i want to plot the measurements in a 3D graph, but i need to form a half sphere with these data. 

0 Kudos
Message 3 of 9
(4,349 Views)

Here are the images of what i´m measuring

0 Kudos
Message 4 of 9
(4,342 Views)

Well, your problem is not in the 3D graphing function, the graph you get is exactly (or close, anyway) what you get when plotting the same data in Excel (for the data you give in the first post), and seems to be following what (I think) are the images you sent. Especially if you are trying to get thickness data, you're apparently not feeding it the right numbers. You are working with values across a rectangular 2D array here, how do you plan to make it round?

 

Are you actually trying to make a 4-D plot - X,Y,Z data of the surface of the ball and color the points according to the thickness at each (X,Y,Z) point? If so, you're going to have to modify the 3D plot VI to have custom colors for each point based not on the Z value, but on your thickness value and leaving the point position where it is (for a pseudo-3D plot), I don't know if that is possible in LabVIEW.

 

I don't have a vision system (and this was not noted in your first post as to where your data comes from), so I cannot help you there, but you seem to be having some problems with it specifically, since you don't show the half-sphere if you wanted to plot your surface coordinates in 3D.

 

Also, I do not understand why you have all the case structures in Equat.vi, however, since the same equation is in each one. If this is in preparation for a second iteration where the equations will differ, then you would probably be better off leaving that until you come to that bridge, since it just adds unnecessary complexity to your program now.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 5 of 9
(4,333 Views)
Solution
Accepted by Manuel33

Hi Manuel,

 

you expect something like this?

sphere.PNG

 

 

sphere-g.png

 

 

Hope this helps, although "OUTPUT" doesn't look much like a sphere ...

 

 

Regards,
Alex

 

 

0 Kudos
Message 6 of 9
(4,326 Views)

If the data comes from a microswitch-type measurement system (profilometer) the the deformations fo the sphere can come from the angle of the conical tip (I've had this problem before).

 

If this is the case you'll have to perhaps find a way of modelling this into your data in order to get a proper fit.  IT's difficult, but it csan be done.

 

Shane.

0 Kudos
Message 7 of 9
(4,319 Views)

Alex thank you very much is just what I needed 

0 Kudos
Message 8 of 9
(4,308 Views)

i just realized that in this particular case there's no need for this wire hilighted with the green arrow:

Unbenannt.png

 

0 Kudos
Message 9 of 9
(4,288 Views)