Hi Christian, Nice script ;-) I haven't time to look into its guts but I'll try to find some improvements for better performance(if it will be possible) during the weekend...
I thought that Rebol has slow math but while doing some speed tests I noticed that the most CPU power takes visualization. Relatime(with dynamic buffer ;-) ) calculating rotation of DRAW block containing 10 filled polygons around 360 degrees(with step of 1 degree) takes less than half second on Celeron 533Mhz...that could be theoreticaly about 600fps! but when you want to visualize it the performance goes down to about 15-20fps. (Watch the upcomming release of Rebol/Zine #6 where you can try the example script with such 2D vector DRAW buffered generator..) I always thought that rebol has slow math but now I see that the performance slowdown is in the visualisation part. I'm still dreaming about HW accelerated View port (OpenGL or DirectX)....I think that without hw accelerated graphics(at least on some Rebol ports where it is possible) we couldn't have even smooth 2D plain vectors. I wish RT would have time to wrap at least Windows and Xwin ports for such HW acceleration.... I believe there won't be any platform issues because you can write the same View code...The result would differ only in the rendering part of Rebol....on hw accelerated systems your code would fly! ;) regards, Cyphre ----- Original Message ----- From: "Christian Langreiter" <[EMAIL PROTECTED]> To: "rebol-list" <[EMAIL PROTECTED]> Sent: Monday, May 06, 2002 8:22 PM Subject: [REBOL] Graph Drawing & /View Performance > I've spent most of today with porting the algorithm behind the > fantastic TouchGraph applet (http://www.touchgraph.com) to > REBOL/View. Originally I intended only to output the node coordinates > after, say, 1000 iterations to handle final display to Flash or > whatever. > > http://www.langreiter.com/rebol/txrx/txrx-1.r > > Just to make sure everything was okay I visualized the result with > REBOL/View, and - shock! - was just amazed at how fast it was (I've > also ported the algorithm to Flash/ActionScript - it's pretty much > impossible to increase the number of nodes to over 15 or even 20 - > REBOL/View seems to be a whole lot faster). > > But then, when I tried to figure out a way to implement edge drawing, > all my /Viewnduced happiness came tumbling down. I can't seem to > figure out a way to _quickly_ (REALLY quickly) draw lines in > /View. My first naive attempts involved the effect facet and the Draw > Dialect, but performance was just - horrendous. > > The best thing I can come up with is creating and setting images as > often as needed, but there _must_ be a better (i.e. faster) way ... > Some way that allows me to directly act upon an existing image. > > f/image/clear > f/image/line 200x200 150x300 > > Comment the line "f/image: to-image edge-layout" to see how fast node > layouting is with edge drawing turned off. > > I hope one of the Masters of /View can guide me through this > semi-documented dark cave of poor performance. > > Otherwise, enjoy ;-) > > -- Chris > -- http://www.langreiter.com > > -- > To unsubscribe from this list, please send an email to > [EMAIL PROTECTED] with "unsubscribe" in the > subject, without the quotes. > > > -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
