Displaying floating point data in ACL Common Graphics



Hello,

I am designing a graphical application in ACL for displaying spectral
analysis data (for a related post see
http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/5d1ded8824bc750b/46a585e0fb7a439b?lnk=gst&q=sdif#46a585e0fb7a439b).
The data itself consists of (either) single- or double-floats, which,
since drawing in ACL is pixel-based, I am forced to round to integers.
I would like to find some way of avoiding this - I expect to have to
round my values to some extent, but using pure integers for display
compromises the integrity of the data too much.

I have been assuming some kind of upwards scaling would be effective.
The kind of numbers I am dealing with typically represent non-integer
frequency values, for example 453.687564Hz. If I want a y-axis value
which represents this number rounded to three decimal places then I
would simply do -

(round (* 453.687564 1000))
=> 453688

and pass this to the appropriate drawing functions. The value is also
displayed in the status bar of the window as the mouse moves over that
point, but divided by 1000 in order to yield 435.688. I am happy with
this degree of accuracy, but since I could be dealing with numbers
representing frequencies up to 20000Hz it means that I have to work
with a massive drawing canvas. I have experimented with ACL's scaling-
stream mixin, which I mix with my base window class and which allows
me to greatly increase the number of points per pixel. Even with that,
however, I still have memory issues (I am sub-classing my base class
from bitmap-window, which is admittedly memory-intensive since it uses
a backing store, but anything else gives me unsatisfactory redisplay).
Is there anything else I could try? I have also experimented with
McClim, which uses continuous coordinates, but would prefer to stay
with ACL if possible.

Many thanks,
Cortez
.



Relevant Pages

  • Re: Displaying floating point data in ACL Common Graphics
    ... I am designing a graphical application in ACL for displaying spectral ... since drawing in ACL is pixel-based, I am forced to round to integers. ... I still have memory issues (I am sub-classing my base class ...
    (comp.lang.lisp)
  • Re: Displaying floating point data in ACL Common Graphics
    ... I am designing a graphical application in ACL for displaying spectral ... since drawing in ACL is pixel-based, I am forced to round to integers. ... Hey, it is not even clear to me that OpenGL solves your problem, but if it does I wonder if the pure Lisp library you are using might support you coding up the OpenGL yourself via the windows API. ...
    (comp.lang.lisp)
  • Re: CListView Problem
    ... and can do all your drawing yourself, ... > I am having problem in displaying different sizes of images and ... > displaying me the full text and when deselected then again three dots. ...
    (microsoft.public.vc.mfc)
  • Re: CListCtrl cuts off sub-item image...
    ... I'm not sure exactly how you're doing it, but you may want to just add 2 or 3 to the left starting point when drawing the image. ... interface. ... carefully, image in 2nd, 3rd and 4th column is not displaying fully. ... Do anybody have an idea why this is happennig and the solution to ...
    (microsoft.public.vc.mfc)
  • Convert Visio Drawing to PNG or other format via code
    ... currently that drawing is displayed in the visio ocx control where the ... Therefore we cannot use the visio ocx. ... format that can be viewed in the browser before displaying to the ...
    (microsoft.public.visio.developer)