From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I plot 2048*2048 points as a 3d surface?

We are building a scanning tunneling microscope from scratch. We want to plot the z movement of the scope as a 3d surface.

First: Is it possible to plot that many points?
Second: What is the most efficient way to do this?
Third: The dX and dY are constant, only the z data depends on the sample. Is there a way to displace each z point by a constant x and y distance in order to speed up processing time?

Thanks in advance...
0 Kudos
Message 1 of 4
(2,365 Views)
That is a whole lot of points! Over 4,000,000. This many points pretty much locked up my PC when I tried to plot it in a 3D graph and was very slow when I tried to put it in an intensity graph.

-Jim
0 Kudos
Message 2 of 4
(2,365 Views)
Dear Mr. Yates,

I have a similar problem with a 1600x1600 matrix.
I can display it on the screen, but it is very slow, as you can imagine.
I'm using a formula node to adress a single matrix item. This seems to be much faster than to extract the item with the graphical commands of LabView out of the matrix and (after increasing the item by one) write it back.
This should work for you as well, but it isn't fast in the sense of the word.
If you have found a better solution to that problem, meanwhile, I would be very glad to hear about it, because this operation is the very heart of my programm and it slows everything down.

Yours sincerely ...

Stephan Klumpp
0 Kudos
Message 3 of 4
(2,365 Views)
> I have a similar problem with a 1600x1600 matrix.
> I can display it on the screen, but it is very slow, as you can
> imagine.
> I'm using a formula node to adress a single matrix item. This seems to
> be much faster than to extract the item with the graphical commands of
> LabView out of the matrix and (after increasing the item by one) write
> it back.
> This should work for you as well, but it isn't fast in the sense of
> the word.
> If you have found a better solution to that problem, meanwhile, I
> would be very glad to hear about it, because this operation is the
> very heart of my programm and it slows everything down.
>


I haven't seen your code, but a common problem is to use local or global
variables inside the loop. This is inefficient
in LV since it
references the whole array. The key is to use shift registers to pass
the 2D array through your loop where you can access and replace items,
rows, etc. This will be very fast compared to using the locals and or
globals. For more details, you might want to look into the user manual
for performance tips.

Greg McKaskle
0 Kudos
Message 4 of 4
(2,365 Views)