Path: utzoo!attcan!uunet!steinmetz!vdsvax!montnaro From: montnaro@sprite.steinmetz.ge.com (Skip Montanaro) Newsgroups: comp.windows.news Subject: Re: fast display of wave-forms? Message-ID: Date: 5 Feb 89 20:51:22 GMT References: <3202@uhccux.uhcc.hawaii.edu> Sender: news@vdsvax.steinmetz.ge.com Reply-To: (Skip Montanaro) Organization: GE Corporate Research & Development Lines: 40 In-reply-to: richard@uhccux.uhcc.hawaii.edu's message of 4 Feb 89 14:48:39 GMT In article <3202@uhccux.uhcc.hawaii.edu> richard@uhccux.uhcc.hawaii.edu (Richard Foulk) writes: Is there a really fast way of displaying something like wave-forms with NeWS? We need to display records that are about 1k points each. The various tests I've run seem to show NeWS as quite a bit slower at the task than various approaches within Sunview. I've done a little plotting in NeWS and discovered a couple things. Others here at GE CRD (and elsewhere I imagine) have discovered them as well, so I doubt they'll be earth-shattering to many readers of this group. 1. As you mentioned, NeWS is slow relative to SunView. Using C & cps yields some compression using NeWS' binary encoding, but you're compressing each number individually. Unfortunately, cps does not provide a way to send arrays of data. If it did, some more opportunities for compression might turn up. 3. If you can use a PostScript function to generate some of the data, it may help. For instance, in the simple case of X-Y plots, if X runs from 0 to 1000 by 1's, you would be better off sending a short PostScript function to generate the X's. If you can send a function to compute Y as well, you've saved even more of the precious bandwidth. 4. Data decimation helps. If you are plotting 1000 pairs of points but only have a 100 pixel wide window to display it in, ten pairs of points will be plotted in each column of pixels in the X direction. Compute minY and maxY for each group of ten points, then send (minX, minY) and (maxX, maxY) to NeWS as the next two points to plot. You get a short little vertical line, but when looking at a lot of data in a smallish window it looks about like what you'd see anyway. As you zoom in on the data and cross the point where there are two points per pixel along the X axis, switch back to normal plotting to preserve accuracy. Data decimation wins big in both data transfer (fewer bits on the wire) and cpu time (fewer redundant dots on the screen). -- Skip Montanaro (montanaro@sprite.steinmetz.ge.com, montanaro@ge-crd.arpa)