为什么要从左上方测量图形坐标? [英] Why are graphics coordinates measured from the upper left?

查看:64
本文介绍了为什么要从左上方测量图形坐标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到,我曾经使用过的每个计算机图形系统都使用左手坐标系,其原点位于左上角.开罗,Java,Microsoft XYZ和大多数图形程序都使用此系统.我认为它们全都可以追溯到一个共同的祖先,但是我找不到关于此的任何参考.

I have noticed that every computer graphics system I have ever used uses a left-handed coordinate system with its origin in the upper left corner. Cairo, Java, Microsoft XYZ, and most graphics programs all use this system. I assume they all date back to a common ancestor, but I can't find any references about this.

如果我不得不说它来自VGA图形模式,则使用与文本相同的坐标,这自然是基于从上至下,从左至右以第二行读取英语的方式在第一行"下...,但我正在弥补.

If I had to guess I'd say it came from VGA graphics mode, using the same coordinates as text, which were naturally based on how the English language is read top-down, left-right, with the "second line" below the "first line"... but I'm making that up.

周围有人讲这个故事,还是可以指出正确的历史书的方向?

Was anyone around to tell the tale, or can point me in the direction of the correct history book?

推荐答案

这是一个古老的约定,其原因可能有点虚假.这是我发现的一些假设:

It's an old convention, and the reasons might be a bit apocryphal. Here are some hypotheses I've found:

它来自CRT电子束扫描行为.

It's derived from CRT electron beam sweep behavior.

从上到下扫描意味着您不必等待首先发送整个帧,只要开始接收数据就可以开始扫描.(这又引起了一个问题,为什么要从上到下扫描)

Scanning from top to bottom means you don't have to wait for an entire frame to be sent first, you just begin scanning as soon as you begin receiving data. (Which raises the question again, why scan from top to bottom)

它允许Z轴进入屏幕而不是从屏幕出来的右手坐标系.

It allows a right-handed coordinate system with the Z axis going into the screen rather than coming out of it.

令人讨厌的是,可可粉和石英使用左下角的原点.

Annoyingly, Cocoa and Quartz use lower-left origin.

这篇关于为什么要从左上方测量图形坐标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆