LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Indexing out, rearranging array of clusters to show 3d surface

Hi Don and Ben!
Thanks to the replies. Actually I have discovered the potential (and complexity) of LV 3D graphs during Don's challenging question. My problem is related to my caving activity : I would like to visualize a rather large cave (about 20 km galeries) and the topographical ground surface above. That would facilitate the search for new connections/entrances.
During the last WE, I have figured out how to build a 3D representation of ground surface, and I have now a nice model of my favourite play ground that I can rotate/zoom in any direction. Not as impressive as a low altitude flight, but sharp enough to get a new perception of reality.
(By the way, the 3D graph handles easily 10000 points. That should interest Don !).
Now, my ambition is to wrap the topographical map details on the 3D surface, not only the colors (I "discovered" the custom color palette, in association with the w coordinate on sunday - gave interesting results) but also the roads, names and so on. If my 3D surface was defined as a bitmap surface, that would not be a big issue, since I could easily associate a specific color level to each point red on the original topographic map. However, the 3D surface here is only defined as a mesh, and I only have 10000 nodes, while the overall picture area is about 5 megapixels. I can't rely on interpolated colors, since that would produce a poor result : all the mesh points belong to altitude curves (that's the easiest way to generate them, a rather tedious process !) and appear in dark yellow color, whatever the background (forest, streams, paths...). Means that color interpolation would produce an uniformly yellow picture !
I'm not sure if these explanations are understandable (sorry for the french accent :)).
Any comment will be welcomed, and I would even appreciate help to reshape this question before posting it to the forum.
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
Message 21 of 33
(1,101 Views)
Hi CC and Don,

I will get some help posting some eaxmple code.

I tried twice and no post!

Once the code is posted, I will update with comments.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 22 of 33
(1,082 Views)
Within the context of my uses over the years of the 3d surface graph and its variants, I've never really understood the use of the w-vector. To me, the 'Z' information is the magnitude information. I'm going to study some more of the examples in the LabVIEW examples and maybe developer zone. I looked at your parametric surface jpeg and that is really outstanding. Reminds me of the surfaces I used to generate in pvwave.

Sincerely,

Don
0 Kudos
Message 23 of 33
(1,070 Views)
The w vector is a way of adding a 4th dimension to 3D graphs.
The geographical map is a good example. X and Y are the geographical coordinates (ie latitude and longitude), while Z is the altitude. W is the map color, and you can affect a specific color to a given point.
Forget for a while the altitude colors that were used at school (time ago) to help us to visualize 2D maps as 3D, with valleys in green, mountains in brown and peak tops in white. There, the W vector would simply correspond to the Z coordinate.
Think in another direction : one summit (X1, Y1, Z1) is rocky, while another one, at the same altitude (X2, Y2, Z1) is covered with meadows. Paint one in brown, the other in green. ie, set W1 to brown ($B46500) and W2 to green ($00FF00).
If you don't like the mountain ranges, you can develop a similar example with the sea side, colorizing the water in shades of green and blue, and the beach in light yellow... all at the same zero altitude :).
Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
0 Kudos
Message 24 of 33
(1,063 Views)
While waiting for the code to show up, let me posts some general notes.

Notes:

1) The attached code does NOT adhere to normal LV standards. It is just the results of a lot of experimenting as indicated by the top Level VI name Ben_Pipe12.VI (version 12!).

2) If I do not know how to do something with the 3d graph, I use the following approach to figure out how to do it.
a) Pop-up on the 3d graph and select “CWGraph3D>>>Properties”
b) Poke around in the tabs until I find what I want.
c) Construct activeX code that is of the same form as the tabs and button approach.

EG
You wanted to dynamically add new plots.
The manual method involved first select the “plots” tab and then punch the “add” button.
The code I posted emulated this using activeX calls.

I would love to see your final results. Please share what you come up with.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 25 of 33
(1,071 Views)
Yes, those are very good examples that I understand. Is there a simple example of this somewhere in the LabVIEW examples so I can see how this works and play with it?

Thanks,

Don
0 Kudos
Message 26 of 33
(1,050 Views)
I'm attaching this code for Ben. This is part one of the attachment:

Stay tuned for part two... I need to try to get the attachment limits increased in order to post it. I believe the current limit is 5MB and this file zips down to 5.7MB.

UPDATE: I got a smaller version of the file from Ben and have attached the complete program now. Sorry for the inconvenience!

Thanks!

Message Edited by Molly K on 11-23-2004 02:05 PM

Molly K.
Web Support & Operations Manager
National Instruments
0 Kudos
Message 27 of 33
(1,056 Views)
I had to hack the example to even let Molly od the post!

She will post when she gets the code.

Sorry all!

It's just that those graphs are so cool that I can not bring myself to clear them.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 28 of 33
(1,038 Views)
0 Kudos
Message 29 of 33
(1,028 Views)
Hi CC,

The example should now be complete.

I would love to see your cave once you have something together.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 30 of 33
(1,022 Views)