|
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++?
|