plotting points speed

11 views
Skip to first unread message

Peter

unread,
Feb 22, 2011, 1:01:31 AM2/22/11
to S2PLOT
the s2pnt() function plots a series of points for given color and
type. There are also primitives to change color and type independently
(s2pt1, s2pt), but I'm wondering about the speed advantages of giving
it an array via s2pnt() vs. changing the type and using sp1() or
spt()..
I was actually looking for s2pnt() where color would be an array, or
would calling s2pt1() be just as fast while switching color?

peter

David Barnes

unread,
Mar 16, 2011, 8:23:31 PM3/16/11
to S2PLOT
Hi Peter,

I don't think there'll be much of a difference in practice. Presently
the internal format for storing points is not the same as any of the
interface functions provide, so there is always an internal copy that
happens when you call the function to draw points. For s2pt, the
internal copy is a loop of copies. Even if I gave you a s2pnt with
color as an array, the return time of the function would be barely
different to a loop you write rather than me internally.

All that said, there will be no difference in *rendering* time as the
rendering is executed from the internally stored data for the points.

- David.
Reply all
Reply to author
Forward
0 new messages