Thread Subject: Plotting a huge surface

Subject: Plotting a huge surface

From: Luigi Giaccari

Date: 17 Aug, 2009 20:37:03

Message: 1 of 7

I am trying to plot a huge surface with a bout 1M points and 2M triangles.

I often get that horrible out of memory error, does anybody know some shortcut?

Maybe some strong graphical open source program?

Thank you very much

http://www.advancedmcode.org/

Subject: Plotting a huge surface

From: Rune Allnor

Date: 17 Aug, 2009 20:48:17

Message: 2 of 7

On 17 Aug, 22:37, "Luigi Giaccari" <giaccarilu...@msn.com> wrote:
> I am trying to plot a huge surface with a bout 1M points and 2M triangles.

The first steps to try:

1) Make sure you use single-precision data format.
2) Reduce the number of triangles. Do you *need*
   to plot all those triangles?

Rune

Subject: Plotting a huge surface

From: Luigi Giaccari

Date: 17 Aug, 2009 22:01:21

Message: 3 of 7

Rune Allnor <allnor@tele.ntnu.no> wrote in message <ef7f0cda-462a-4643-a4e9-2d331b54dd39@c14g2000yqm.googlegroups.com>...
> On 17 Aug, 22:37, "Luigi Giaccari" <giaccarilu...@msn.com> wrote:
> > I am trying to plot a huge surface with a bout 1M points and 2M triangles.
>
> The first steps to try:
>
> 1) Make sure you use single-precision data format.
> 2) Reduce the number of triangles. Do you *need*
> to plot all those triangles?
>
> Rune


I need to plot all the triangles.

Currently I am using doubles for points and integer for triangles.

Thanks for the advice

Subject: Plotting a huge surface

From: Stan Bischof

Date: 17 Aug, 2009 22:07:04

Message: 4 of 7

Luigi Giaccari <giaccariluigi@msn.com> wrote:
> Rune Allnor <allnor@tele.ntnu.no> wrote in message <ef7f0cda-462a-4643-a4e9-2d331b54dd39@c14g2000yqm.googlegroups.com>...
>> On 17 Aug, 22:37, "Luigi Giaccari" <giaccarilu...@msn.com> wrote:
>> > I am trying to plot a huge surface with a bout 1M points and 2M triangles.
>>
>> The first steps to try:
>>
>> 1) Make sure you use single-precision data format.
>> 2) Reduce the number of triangles. Do you *need*
>> to plot all those triangles?
>>
>> Rune
>
>
> I need to plot all the triangles.
>

Are you sure? After all that's likely as many or more triangles
than you have pixels on yoru screen- so plotting them all
might be kinda pointless.

In any case-- sounds like you need more RAM. To figure out
how much start by plotting fewer triangles, checking mem usage, then
extrapolating.

Stan

Subject: Plotting a huge surface

From: Bruno Luong

Date: 18 Aug, 2009 14:08:20

Message: 5 of 7

"Luigi Giaccari" <giaccariluigi@msn.com> wrote in message <h6cf1f$3s1$1@fred.mathworks.com>...
> I am trying to plot a huge surface with a bout 1M points and 2M triangles.
>
> I often get that horrible out of memory error, does anybody know some shortcut?
>

Luigi,

One of the trick is split your objects in smaller parts. This to avoid the graphic handles have one big data array (contiguous memory required), and put them in several smaller one.

Today I have succeed to create a graphic figure with > 13 M patches on my poor 32 bit machine (!). My problem is I get an infinity strings of message when I simply try close the figure:
 ...
Warning: Too many objects created while deleting axes children;
removing DeleteFcn of all descendants to prevent infinite loop.
...

No way to stop the thing beside killing my Matlab session. LOL

Bruno

Subject: Plotting a huge surface

From: Luigi Giaccari

Date: 18 Aug, 2009 14:24:03

Message: 6 of 7

Stan Bischof <stan@newserve.worldbadminton.com> wrote in message <4a89d488$0$1644$742ec2ed@news.sonic.net>...
> Luigi Giaccari <giaccariluigi@msn.com> wrote:
> > Rune Allnor <allnor@tele.ntnu.no> wrote in message <ef7f0cda-462a-4643-a4e9-2d331b54dd39@c14g2000yqm.googlegroups.com>...
> >> On 17 Aug, 22:37, "Luigi Giaccari" <giaccarilu...@msn.com> wrote:
> >> > I am trying to plot a huge surface with a bout 1M points and 2M triangles.
> >>
> >> The first steps to try:
> >>
> >> 1) Make sure you use single-precision data format.
> >> 2) Reduce the number of triangles. Do you *need*
> >> to plot all those triangles?
> >>
> >> Rune
> >
> >
> > I need to plot all the triangles.
> >
>
> Are you sure? After all that's likely as many or more triangles
> than you have pixels on yoru screen- so plotting them all
> might be kinda pointless.
>
> In any case-- sounds like you need more RAM. To figure out
> how much start by plotting fewer triangles, checking mem usage, then
> extrapolating.
>
> Stan

Yes I am sure, I need to plot ALL the triangles.
It is a surface recostruction problem, I need to know every triangle where it is.

A simplification wont be too diffcult, but it doesn't show me the recostructed surface.

 Thanks anyway.

Subject: Plotting a huge surface

From: Luigi Giaccari

Date: 18 Aug, 2009 14:29:05

Message: 7 of 7

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <h6eckk$pcl$1@fred.mathworks.com>...
> "Luigi Giaccari" <giaccariluigi@msn.com> wrote in message <h6cf1f$3s1$1@fred.mathworks.com>...
> > I am trying to plot a huge surface with a bout 1M points and 2M triangles.
> >
> > I often get that horrible out of memory error, does anybody know some shortcut?
> >
>
> Luigi,
>
> One of the trick is split your objects in smaller parts. This to avoid the graphic handles have one big data array (contiguous memory required), and put them in several smaller one.
>
> Today I have succeed to create a graphic figure with > 13 M patches on my poor 32 bit machine (!). My problem is I get an infinity strings of message when I simply try close the figure:
> ...
> Warning: Too many objects created while deleting axes children;
> removing DeleteFcn of all descendants to prevent infinite loop.
> ...
>
> No way to stop the thing beside killing my Matlab session. LOL
>
> Bruno

13 M, NEW RECORD !!!!!!

Thank you for your gold medal example, I never thought about the splitting thing, I will try.

I get those never-ending warnings too, very often.

Thank you

http://www.advancedmcode.org/

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
surface Luigi Giaccari 17 Aug, 2009 16:39:04
graphics Luigi Giaccari 17 Aug, 2009 16:39:04
mesh Luigi Giaccari 17 Aug, 2009 16:39:04
huge Luigi Giaccari 17 Aug, 2009 16:39:04
triangulation Luigi Giaccari 17 Aug, 2009 16:39:04
rssFeed for this Thread

Contact us at files@mathworks.com