質問

Whenever I'm learning math stuff lecturers and litterature use coordinate systems where x increases to the right and y increases upwards. Whenever I do anything with 2d graphics in computer programming the default is having 0,0 be the upper left corner and to let Y increase downwards on the screen.

Is there a reason for this? I tried googling but I can't figure out what phrase to try.

役に立ちましたか?

解決

It's derived from CRT electron beams. They draw the screen line by line, from top to bottom, each line being drawn from left to right. Because the CRT screen starts drawing at the top, it's more natural to start counting at the top.

他のヒント

Think of the display like you'd look at a sheet of paper you're about to write words on. You start at the top left and the 2nd line will be below the first line. Different coordinate systems are used in different situations. Typical computer screens happen to consider the origin point as top-left.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top