[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Which way is up?



    Date: Sun, 2 Aug 87 16:43:56 edt
    From: Mike McDonnell <mike@etl.ARPA>

    -*- Mode: Text -*-

    This is about the coordinate system used on Symbolics computers
    and why I don't like it.  It is also a request for solutions to
    my problem.  

    The main problem is that I am doing graphics programming on a
    Symbolics and the coordinate system of all windows starts in the
    upper left corner [let's forget about dynamic windows for the
    sake of discussion] with Y being positive downward; call this
    Y-down. The graphics texts I am using [Foley and Van Dam, Rogers,
    Newman and Sproull] all assume coordinates that start in the
    lower left corner with Y being positive upward; call this Y-up.
    Besides violating my intuition, developed in years of schooling,
    that coordinate systems should be Y-up by default, this makes it
    more difficult to use the standard texts on graphics and
    particularly causes me trouble when I have to figure out some
    trigonometric thing such as vector operations.  Looking around in
    the lispm, I can't find any global way of changing the
    coordinates to what I want.

    So I have a couple of questions:

    1.  Why is this "antique" form of coordinate system so persistent
    in computers when major texts no longer use it and we were all
    trained to think in Y-up coordinates?  [I notice that even the
    "new" graphics system X Windows uses Y-down coordinates.]

    2.  What is the best way of transforming window coordinates to
    Y-up while making as few changes to the Symbolics software as
    possible?

    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
    altered.  Comments?

In  7.2, 1graphics:with-room-for-graphics0 will flip the coordinate system
over in the "right" direction.