Thread View: net.graphics
5 messages
5 total messages
Started by bonham
Fri, 24 Oct 1986 00:54
Y positive up or down?
Author: bonham
Date: Fri, 24 Oct 1986 00:54
Date: Fri, 24 Oct 1986 00:54
44 lines
2706 bytes
2706 bytes
We at the University of Calgary are implementing a graphics utility
as part of a larger project. The utility is to support raster, vector
and text-oriented displays in 2-D. The subject of picking a coordinate
system origin has come up. Several designers propose putting pixel
<0,0> at the top left of the screen, with Y increasing downward;
others propose putting it at the bottom left, with Y increasing upward.
Both have advantages and disadvantages. We think it a hard enough
and interesting enough philosophical question to put it to the net:
Should positive values represent upward or downward Y increments?
One advantage of a lower-left origin is that the coordinate system
is the familiar Cartesian space we learned our geometry with.
Using an upper-left origin means inverting our notion of up/down.
An upper-left origin seems better suited to text operations.
Homing to the top left of the screen (or window) is done much more often
than homing to the bottom left. The address of the upper left corner
would be a constant <0,0> rather than change for different-sized windows.
We want to use a single coordinate system for drawing text-, vector-
and area-oriented graphics.
An upper left origin is more of a standard in display hardware,
due to the top-to-bottom/left-to-right scanning of raster lines
and the consecutive ordering in display memory of each line's bits.
This is a bit of a non-issue, as the primitive drawing routines can
adapt to negative scan line increments regardless of which high-level
coordinate system we adopt.
Has anyone had experience doing geometry/trigonometry programming
in an inverted (Y-positive-down) coordinate system?
Was it hard adjusting to it?
What ramifications does a normal (Y-positive-up) coordinate system
have on text processing? On implementation with standard hardware?
Reply by email if these are old questions (with answers!), otherwise
I would like to see a discussion on the net.
--
_|_ __/__
__+__ /_ Mike Bonham
/__ |__|
/\./ /| ..!{ubc-vision,ihnp4}!alberta!calgary!bonham
_/ \_ _/ |_|
Re: Y positive up or down?
Author: majka
Date: Fri, 24 Oct 1986 18:33
Date: Fri, 24 Oct 1986 18:33
23 lines
1921 bytes
1921 bytes
I went through this debate with several users as I was implementing a set of graphics utilities such as you mention. I was gung-ho on Row-Column coordinate systems (origin upper left, first coordinate increasing down). Some users concurred but others argued for cartesian X-Y spaces. In the end I decided on the philosophy of flexibility: Let The Users Choose The Coordinate System That They Are Happy Working With. This solution caused me to do a bit more work in writing the coordinate transformation routines, but it was well worth the small amount of effort. The users just begins with a specification of the coordinate space they want. In fact, they can change to a new coordinate system anytime. This can be very handy if you are working with a mixed display. For instance where you want to do some x-y plotting, and add a lot of text annotation. There are always some cases where you will want to work in different coordinate systems. You may want the origin anywhere on the display. You may want the coordinates to run in either direction. It is not hard to let the utility do a bit more work for you. After all, computers should make life *easier* for people! --- Marc Majka - UBC Laboratory for Computational Vision
Re: Y positive up or down?
Author: Doug Mink
Date: Sun, 26 Oct 1986 20:39
Date: Sun, 26 Oct 1986 20:39
24 lines
1936 bytes
1936 bytes
In article <469@vaxb.calgary.UUCP>, bonham@calgary.UUCP writes:
> and text-oriented displays in 2-D. The subject of picking a coordinate
> system origin has come up. Several designers propose putting pixel
> <0,0> at the top left of the screen, with Y increasing downward;
> others propose putting it at the bottom left, with Y increasing upward.
>
> Both have advantages and disadvantages. We think it a hard enough
> and interesting enough philosophical question to put it to the net:
> Should positive values represent upward or downward Y increments?
As an applications programmer, I find it much easier to conceptualize a display
in standard, bottom-left origin coordinates because that is what the equations
before the programs assume. A display holds far more bytes of graphics than of
text, and all of those bytes have to be processed by the display driver. If
your system is going to be used for interactive graphics a significant amount
of the time, any speed you gain will be important.
When I wrote the Tektronix emulator part of xterm, the X Windo System's
terminal emulator, I had to handle the translation from bottom-left (Tek) to
Top-left (X). It's not difficult; it just adds one more operation to every
point plotted.
Doug Mink
cfa.harvard.edu
{ihnp4|seismo}!harvard!cfa!mink
Re: Y positive up or down?
Author: Andrea K. Frankel
Date: Tue, 28 Oct 1986 06:10
Date: Tue, 28 Oct 1986 06:10
30 lines
2231 bytes
2231 bytes
We debated this question in the context of graphics standards
(GKS, CGM, CGI), and came to the conclusion that it was best to
permit the client (i.e., the program or person using the system)
to SET the coordinate space, both to establish scaling and to
establish orientation. In CGM and CGI this is done with the
"VDC EXTENT" function (VDC = Virtual Device Coordinates, the
space thus specified).
The default coordinate system for the graphics standards is always
first quadrant (i.e., (0,0) in lower left).
There are some nontrivial ramifications for changing; for example,
some circular arcs are specified in terms of a center point and
two rays, and the arc is drawn counter-clockwise from the first
to the second. Now, what defines counter-clockwise? The resolution
was "from the positive x-axis of VDC space to the positive y-axis
of VDC space". Draw yourself some pictures, and you might be surprised
at what happens to arc specifications if the specifier assumes
counter-clockwise means "as I look at the screen" and the VDC space
is fourth-quadrant!
Andrea Frankel, Hewlett-Packard (San Diego Division) (619) 592-4664
"every time that wheel goes round, bound to cover just a little more ground"
______________________________________________________________________________
UUCP : {hplabs|hp-pcd|hpfcla|hpda|noscvax|gould9|sdcsvax}!hp-sdd!andrea
UUCP : {cbosgd|allegra|decvax|gatech|sun|tektronix}!hplabs!hp-sdd!andrea
ARPA : hp-sdd!andrea@nosc.arpa
CSNET : hp-sdd!andrea@hplabs.csnet
USnail: 16399 W. Bernardo Drive, San Diego CA 92127-1899 USA
Re: Y positive up or down?
Author: Henry Spencer
Date: Wed, 29 Oct 1986 18:36
Date: Wed, 29 Oct 1986 18:36
7 lines
914 bytes
914 bytes
The Blit terminals at Bell Labs use Y-positive-down. One of the things
those folks have said in discussing their software is that if they were
doing it over again, they would seriously consider changing this. (Don't
remember the exact words, but that was the sense of it.)
--
Henry Spencer @ U of Toronto Zoology
{allegra,ihnp4,decvax,pyramid}!utzoo!henry
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads