help-octave
[Top][All Lists]
Advanced

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

Graphics Objects -> Line Lists?


From: Martin Werner
Subject: Graphics Objects -> Line Lists?
Date: Tue, 23 Aug 2011 13:34:10 +0200
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20110812 Thunderbird/6.0

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




--
Martin Werner
Mobile and Distributed Systems Group
Institute for Computer Science, Ludwig-Maximilians-Universität München
Room E 011, Oettingenstraße 67, 80538 Munich, Germany
Phone: +49 89 2180 9127
http://www.mobile.ifi.lmu.de/


reply via email to

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