From: Kenny Tilton
Subject: Poll: Which Way Is Up?
Date: 
Message-ID: <3DF21CBD.6050008@nyc.rr.com>
Speaking of looking for track zero on a CD, I have been doing screen 
coordinates for so long I think the positive Y-axis runs down.

Is that because in English we read top to bottom?

In OpenGL, positive is up.

I was going to ask which way Cello should go. Maybe it shoulbe be a view 
attribute? ie, The default is plus=up, but for text widgets plus=down? 
But now that I think about it, even with text it gets counter-intuitive 
when you get to the font metrics, with the descender being at +3 and the 
  ascent at -12.

Would it be the end of the world if, as I was reading down the page, the 
coordinates of my eyeball were increasingly negative?

-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd

From: Duane Rettig
Subject: Re: Poll: Which Way Is Up?
Date: 
Message-ID: <4vg2592jh.fsf@beta.franz.com>
Kenny Tilton <·······@nyc.rr.com> writes:

> Speaking of looking for track zero on a CD, I have been doing screen
> coordinates for so long I think the positive Y-axis runs down.
> 
> 
> Is that because in English we read top to bottom?
> 
> In OpenGL, positive is up.
> 
> I was going to ask which way Cello should go. Maybe it shoulbe be a
> view attribute? ie, The default is plus=up, but for text widgets
> plus=down? But now that I think about it, even with text it gets
> counter-intuitive when you get to the font metrics, with the descender
> being at +3 and the  ascent at -12.
> 
> 
> Would it be the end of the world if, as I was reading down the page,
> the coordinates of my eyeball were increasingly negative?

How about memory addresses?  When drawing pictures of slots in memory,
do you start with addresses closer to zero at the top?  If so, you
then travel "up" memory and "down" the page.  [I've seen and used
both models, where memory is represented in either direction; when I
use either, I usually draw an arrow and label it "memory increases"
to show the orientation, similar to a map]

And how about stacks, which on many machines grow downward?  What does
it mean to travel "up" the stack?  A colleague of mine always resolves
this by talking about "toward the frontier" or "away from the frontier."

Speaking of maps, if you go to an Outback Restaurant near my home (a
relatively new Down-Under-style restaurant popular in my area) you will
see a map of the world with the South Pole at the top and Australia at
the center-ner-the-top.  This was different than the weather maps I saw
when we were in Australia, where Australia and New Zealand were in the
center of a rounded Globe, but North was up.

-- 
Duane Rettig    ·····@franz.com    Franz Inc.  http://www.franz.com/
555 12th St., Suite 1450               http://www.555citycenter.com/
Oakland, Ca. 94607        Phone: (510) 452-2000; Fax: (510) 452-0182   
From: Teemu Kalvas
Subject: Re: Poll: Which Way Is Up?
Date: 
Message-ID: <87wumlk0su.fsf@gobi.s2.org>
Duane Rettig <·····@franz.com> writes:

> How about memory addresses?  When drawing pictures of slots in memory,
> do you start with addresses closer to zero at the top?  If so, you
> then travel "up" memory and "down" the page.  [I've seen and used
> both models, where memory is represented in either direction; when I
> use either, I usually draw an arrow and label it "memory increases"
> to show the orientation, similar to a map]
> 
> And how about stacks, which on many machines grow downward?  What does
> it mean to travel "up" the stack?  A colleague of mine always resolves
> this by talking about "toward the frontier" or "away from the frontier."

Personally I view computer stacks quite strongly as an extension of
the stacks of plates at restaurants, which naturally leads to stacks
growing "up".  I've never actually even though about this before.
Were I consistent in applying my principles, I would never use a
physical directional word for a data structure meaning.  I'm not, and
I knew that, but this was nevertheless disconcerting.

How about trees?  If you start thinking about it, trees are named
after, well, trees, and they historically have roots at the bottom and
leaves at the top.  Many programmers I know (first language Finnish
speakers for what it's worth) use "up" for "rootwards" and "down" for
"leafwards", which is the opposite of wooden trees.

Then again, the same people object to my tree handling code with
variable names like uncle, grandniece, stepson etc.

-- 
Teemu Kalvas
From: Daniel Barlow
Subject: Re: Poll: Which Way Is Up?
Date: 
Message-ID: <87hedozcm5.fsf@noetbook.telent.net>
Duane Rettig <·····@franz.com> writes:

> How about memory addresses?  When drawing pictures of slots in memory,
> do you start with addresses closer to zero at the top?  If so, you

Almost always, yes.  That's the order I'd probably initialise them in,
and it's the order they'd go in if they were being sent over the wire
(packets for internet protocols, etc)

> And how about stacks, which on many machines grow downward?  What does
> it mean to travel "up" the stack?  A colleague of mine always resolves
> this by talking about "toward the frontier" or "away from the frontier."

In SBCL the Lisp control stack grows down on x86 (where it shares the
C stack) and up on all other machines (where it's separate).  So,
wherever possible I talk about "earlier" and "later" stack frames.


-dan

-- 

   http://www.cliki.net/ - Link farm for free CL-on-Unix resources 
From: Erik Winkels
Subject: Re: Poll: Which Way Is Up?
Date: 
Message-ID: <87bs3xkadw.fsf@xs4all.nl>
Kenny Tilton <·······@nyc.rr.com> wrote on Sat, 07 Dec 2002 16:05:13 GMT:
>
> Speaking of looking for track zero on a CD, I have been doing screen
> coordinates for so long I think the positive Y-axis runs down.
> 
> Is that because in English we read top to bottom?

I think it's because monitors draw their beam from top-left to
bottom-right (which they might very well do because we read from top
to bottom :-) which means that -with some imagination- your video
memory is laid out from top to bottom.  Using a positive y-axis
running down saves you some clockcycles because you don't have to
convert between two different coordinate systems (and I could use all
the clockcycles I could get on my Atari ST!).


> Would it be the end of the world if, as I was reading down the page,
> the coordinates of my eyeball were increasingly negative?

I prefer to roll my eyeballs when reading but whatever floats yer
boat.

To echo the sentiments from another thread: "Do as Romans do." :-)


Erik
From: Joe Marshall
Subject: Re: Poll: Which Way Is Up?
Date: 
Message-ID: <wumjm5ij.fsf@ccs.neu.edu>
Erik Winkels <·······@xs4all.nl> writes:

> I think it's because monitors draw their beam from top-left to
> bottom-right (which they might very well do because we read from top
> to bottom :-) which means that -with some imagination- your video
> memory is laid out from top to bottom.  

That's a hardware artifact.  The LMI Lambda had a RAM that mapped
physical scan line to logical memory address.  You could configure the
scan lines in memory to be in increasing or decreasing order as you
wished (or in random order, if you wanted).  What on earth this
`feature' was for is beyond me, but since it was addressable from
Lisp, you could flip your screen upside down by changing the order of
the lines.
From: Alexander Kjeldaas
Subject: Re: Poll: Which Way Is Up?
Date: 
Message-ID: <atkdkl$474$1@news.broadnet.no>
Joe Marshall wrote:

> Erik Winkels <·······@xs4all.nl> writes:
> 
>> I think it's because monitors draw their beam from top-left to
>> bottom-right (which they might very well do because we read from top
>> to bottom :-) which means that -with some imagination- your video
>> memory is laid out from top to bottom.
> 
> That's a hardware artifact.  The LMI Lambda had a RAM that mapped
> physical scan line to logical memory address.  You could configure the
> scan lines in memory to be in increasing or decreasing order as you
> wished (or in random order, if you wanted).  What on earth this
> `feature' was for is beyond me, but since it was addressable from
> Lisp, you could flip your screen upside down by changing the order of
> the lines.

I guess the LMI Lambda wasn't used much for demo programming.  This type of
feature has been abused by the demo programmers since the beginning of
time.  You would typically reprogram the register that points to the
beginning of screen memory while the video card was waiting for the beam to
get back to the horizontal starting points. This would give you the effect
known as raster bars. Having video hardware that had this feature would
make the demo programmer's job a lot easier. :-)

astor
From: Thomas F. Burdick
Subject: Re: Poll: Which Way Is Up?
Date: 
Message-ID: <xcvu1hpypnm.fsf@famine.OCF.Berkeley.EDU>
Kenny Tilton <·······@nyc.rr.com> writes:

> Speaking of looking for track zero on a CD, I have been doing screen 
> coordinates for so long I think the positive Y-axis runs down.
> 
> Is that because in English we read top to bottom?
> 
> In OpenGL, positive is up.

This is what I pick when I get a choice.  I've never had any problems
using systems with the origin in the upper-left, though.  Hell, it
should be easy to deal with the origin being in any of the four
corners, with the units growing positively or negatively away from it.
Use whatever makes you happy is my vote.

> I was going to ask which way Cello should go. Maybe it shoulbe be a view 
> attribute? ie, The default is plus=up, but for text widgets plus=down? 
> But now that I think about it, even with text it gets counter-intuitive 
> when you get to the font metrics, with the descender being at +3 and the 
>   ascent at -12.
> 
> Would it be the end of the world if, as I was reading down the page, the 
> coordinates of my eyeball were increasingly negative?

My world would survive unscathed.

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Kaz Kylheku
Subject: Re: Poll: Which Way Is Up?
Date: 
Message-ID: <cf333042.0212091624.762a6773@posting.google.com>
Kenny Tilton <·······@nyc.rr.com> wrote in message news:<················@nyc.rr.com>...
> Speaking of looking for track zero on a CD, I have been doing screen 
> coordinates for so long I think the positive Y-axis runs down.
> 
> Is that because in English we read top to bottom?
> 
> In OpenGL, positive is up.
> 
> I was going to ask which way Cello should go.

Of course, it should go both ways! No stupid compromises. The
programmer should be able to establish an origin anywhere in a window,
and have axes go in whatever directions he wants, perhaps even rotated
ones. Moreover, the origin itself should be subject to ``bit
gravity'', being able to follow resizes in some configurable way.

 Maybe it shoulbe be a view 
> attribute? ie, The default is plus=up, but for text widgets plus=down?

Right.
 
> Would it be the end of the world if, as I was reading down the page, the 
> coordinates of my eyeball were increasingly negative?

No, but it would be Usenet if your approval were increasingly
negative. ;)
From: Kenny Tilton
Subject: Re: Poll: Which Way Is Up?
Date: 
Message-ID: <3DF53E40.6020601@nyc.rr.com>
Kaz Kylheku wrote:
> Kenny Tilton <·······@nyc.rr.com> wrote in message news:<················@nyc.rr.com>...
>>In OpenGL, positive is up.
>>
>>I was going to ask which way Cello should go.
> 
> 
> Of course, it should go both ways! No stupid compromises. The
> programmer should be able to establish an origin anywhere in a window,
> and have axes go in whatever directions he wants, perhaps even rotated
> ones.

Intriguing. Certainly it is easier to let OpenGL's capabilities leak 
thru into Cello. Great, i won't worry about it. Later I can worry about 
a merely /default/ scheme I think will work best for newbies to 
encounter. Thx for the input.

-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd