[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Which way is up?
2. What is the best way of transforming window coordinates to
Y-up while making as few changes to the Symbolics software as
Regarding question 2, I am familiar with what Lynn Quam did in
Image-Calc (tm) as of about two years ago in which he wrapped each
graphics method in a whopper that transforms coordinates. This
works but seems crude to me, sort of like defining my own
graphics methods such as my-draw-line, my-draw-circle, etc. I
was thinking of something like a homogeneous coordinate
transformation, or at least conversion from Y-down to Y-up, that
can be done at the screen level so that drawing methods will not
have to be altered but rather the coordinate system itself is
What do you want your interface to look like? If you want to use
symboics's functions and your coordinates you could try something like
(multiple-value-setq (x y)
(coordinate-transform x y matrix)
where matrix contains your coordinate transformation. You could then define
higher level graph routines in terms of this.
If you want to use the generic function names, draw-line ..., you could
define a stream that does the coordinate transformations for you.
Whoppers seem a fine way to do this, to me.
Have you thought about clipping, or interaction with the mouse?