Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to plot millions of points?

Subject: How to plot millions of points?

From: Gektor

Date: 9 Jun, 2011 03:05:05

Message: 1 of 5

I want to plot many points of the same size in 3d, and then be able to rotate it for visual inspection. When I try using
  scattter3(x,y,z,1,point_color)
it works, but it is VERY slow, since I am plotting 5 million points.

Is there anything faster?

Subject: How to plot millions of points?

From: ImageAnalyst

Date: 9 Jun, 2011 03:12:20

Message: 2 of 5

On Jun 8, 11:05 pm, "Gektor " <b3035...@klzlk.com> wrote:
> I want to plot many points of the same size in 3d, and then be able to rotate it for visual inspection. When I try using
>   scattter3(x,y,z,1,point_color)
> it works, but it is VERY slow, since I am plotting 5 million points.
>
> Is there anything faster?

-----------------------------------
Subsample. Seriously, there's no way you can see 5 million points on
your 2 megapixel screen anyway. You'll get just as good an idea of
what's going on with far fewer points.

Or else use a true volume visualization program like Avizo (http://
www.vsg3d.com/avizo/overview).

Subject: How to plot millions of points?

From: Rune Allnor

Date: 9 Jun, 2011 04:32:09

Message: 3 of 5

On Jun 9, 5:05 am, "Gektor " <b3035...@klzlk.com> wrote:
> I want to plot many points of the same size in 3d, and then be able to rotate it for visual inspection. When I try using
>   scattter3(x,y,z,1,point_color)
> it works, but it is VERY slow, since I am plotting 5 million points.
>
> Is there anything faster?

No. Because you do the wrong thing.

A present-day computer screen of decent size has some
3000 by 1500 pixels; maybe a bit more, maybe a bit less.

That's on 3000*1500 = 4500000 pixels in total. So if you
plotted 5 million points on that screen, there are still
not enough pixels to plot each point individually.

What you want to do, is to ask how to *visualize* your
5 million points. Which is a different question, that
might (but needs not) have a solution that is sufficiently
fast.

Rune

Subject: How to plot millions of points?

From: Seth

Date: 6 Sep, 2011 16:45:30

Message: 4 of 5

Rune Allnor <allnor@tele.ntnu.no> wrote in message <faeb3cc0-72c8-46ab-bf4a-6553df19af0c@d1g2000yqm.googlegroups.com>...
> On Jun 9, 5:05 am, "Gektor " <b3035...@klzlk.com> wrote:
> > I want to plot many points of the same size in 3d, and then be able to rotate it for visual inspection. When I try using
> >   scattter3(x,y,z,1,point_color)
> > it works, but it is VERY slow, since I am plotting 5 million points.
> >
> > Is there anything faster?
>
> No. Because you do the wrong thing.
>
> A present-day computer screen of decent size has some
> 3000 by 1500 pixels; maybe a bit more, maybe a bit less.
>
> That's on 3000*1500 = 4500000 pixels in total. So if you
> plotted 5 million points on that screen, there are still
> not enough pixels to plot each point individually.
>
> What you want to do, is to ask how to *visualize* your
> 5 million points. Which is a different question, that
> might (but needs not) have a solution that is sufficiently
> fast.
>
> Rune

It is true that a standard display doesn't have enough pixels to draw all of these points. However, like the original poster, I would like to plot millions of points and use camera manipulations to move through that data and visualize it. I could go to the trouble of building a frustrum filter and cull all points outside the camera's field of view. However, I doubt this would be faster without also building an underlying octtree to support fast spatial filtering. This seems like overkill though. I don't want to build a renderer, I want the renderer to do its job. I can easily draw millions of points using OpenGL in C++, without the slow down I observe in Matlab. If I set the renderer to OpenGL, in matlab the delay in the rendering loop makes it almost impossible to view even a few 100K points. Zbuffer seems to be faster, but still way too slow. Why can't I get the same
performance in matlab that I get using OpenGL in C++?

Subject: How to plot millions of points?

From: Pasco Alquim

Date: 6 Sep, 2011 21:31:29

Message: 5 of 5

"Seth" wrote in message <j45ina$2la$1@newscl01ah.mathworks.com>...

  I can easily draw millions of points using OpenGL in C++, without the slow down I observe in Matlab. If I set the renderer to OpenGL, in matlab the delay in the rendering loop makes it almost impossible to view even a few 100K points. Zbuffer seems to be faster, but still way too slow. Why can't I get the same
> performance in matlab that I get using OpenGL in C++?

One more release came out and once again TMW didn't give a damn to address the problem of the ML's incredible lousy graphics performance.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us