help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Graphics Objects -> Line Lists?


From: Martijn
Subject: Re: Graphics Objects -> Line Lists?
Date: Tue, 23 Aug 2011 15:45:28 +0200

Hi Martin,
Do you use the gnuplot or the fltk backend? The later is openGL
accelerated and might already reduce your problem to acceptable
proportions.

Martijn

On Tue, 2011-08-23 at 13:34 +0200, Martin Werner wrote:
> Hello all,
> 
> I am working with octave on a simulation system which relies on external 
> CAD-Data.
> 
> For the time being, the CAD-Data is externally rendered down to a list 
> of lines and imported in octave as a matrix, each row representing a 
> lines starting and endpoint.
> 
> LINES=[x1,y1,x2,y2;...]
> 
> Now, if I want to transport this data into a plot, I have severe 
> performance problems:
> 
> For a small CAD file (~200m^2) containing ~4500 lines, rendering them 
> all with a for loop using either plot or line command takes ~50 seconds.
> 
> for i = 1:size(LINES)(1);
>     plot(LINES(...))
> endfor
> 
> If I use a better type of plotting creating exactly one line object with 
> 4500 lines, it is fast enough:
> 
> line([A(:,1),A(:,3)],[A(:,2),A(:,4)])
> 
> runs below 15ms. But of course, this does not what I want. It 
> essentially renders a line strip. Is there a possibility to render a 
> line list in a fast manner? Quickly diving into the code of plot,line 
> and __do_line__  functions, it seems to me, that there is no possibility 
> to do that, am I right?
> 
> Wouldn't it be good to have a plotting primitive set similar to OpenGL 
> rendering primitives:
> 
> GL_LINES, GL_LINESTRIP,GL_TRIANGLES,...
> 
> 
> Am I missing something? The question in short:
> 
> Given a list of (many) independent lines, how can I (quickly) draw them 
> to a plot window?
> 
> Best regards,
>    Martin Werner
> 
> 
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]