Article View: net.text
Article #1166Y positive up or down?
From: bonham
Date: Mon, 27 Oct 1986 22:26
Date: Mon, 27 Oct 1986 22:26
48 lines
2876 bytes
2876 bytes
This is a re-posting of a message originally sent under net.graphics.
If you have seen this before, perhaps read it again while wearing
your text programmer's hat!
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
_/ \_ _/ |_|
Technical Details
Message-ID:
<479@vaxb.calgary.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!nike!sri-spam!sri-unix!hplabs!tektronix!uw-beaver!ubc-vision!pembina!calgary!bonhamShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!nike!sri-spam!sri-unix!hplabs!tektronix!uw-beaver!ubc-vision!pembina!calgary!bonham From: bonham@calgary.UUCP Newsgroups: net.text,net.cog-eng Subject: Y positive up or down? Message-ID: <479@vaxb.calgary.UUCP> Date: Mon, 27-Oct-86 17:26:36 EST Article-I.D.: vaxb.479 Posted: Mon Oct 27 17:26:36 1986 Date-Received: Mon, 3-Nov-86 21:27:17 EST Organization: U. of Calgary, Calgary, Ab. Lines: 48 Keywords: inverted cartesian coordinates, pixel addressing