answersLogoWhite

0

X and y are referred to as coordinates and are used in a coordinate plane. The coordinate plane was originally called the Cartesian plane, named after the mathematician Rene Descartes. It is a grid that connects each point with a number.

When talking about a display screen such as a computer, (x, y) combinations are referred to as pixels. The x is the amount of horizontal pixels on a screen and y is the amount of vertical pixels. (0, 0) is the top left pixel on a screen. This is based on the coordinate plane. For example, if a computer screen is 1280 pixels wide by 720 pixels high it means that there are 1280 x pixels and 720 y pixels. So the bottom right part of the screen is point (1279, 719). It also means that there are 921,600 pixels on the screen. This number is calculated by multiplying the width (1280 pixels) by the height (720 pixels).

However most of the time x and y are relative to another object. As an example, when you open the Firefox internet Browser, the left part of the browser window may be located 30 pixels from the screen's left side. If the image within the website that is being browsed is placed 50 pixels from the browser's left side, the image will actually be located 80 pixels (30 plus 50) from the screen's left side. Then there may also be another image 10 pixels to the right of the first image. To find it location we need to know the first image's location, its width, and the distance between the images. That is 80 (which is the beginning of the first image) plus 90 (which is the width of the second image) plus 10 (which is the distance between the two images) which adds up to 180. This means that the next image is located 180 pixels from the screen's left side.

Everything is based on x and y including Video Games. For example, when a game designer creates a map, he uses a coordinate plane to plot his objects. He can create the first small platform at (50, 30). In this game development environment the coordinates are based on the center of the each platform. He can later create a larger platform by connecting a few small platforms together. He can then specify within the game to allow a player to walk on the platforms. That means that the player can't move left beyond pixel 100 of the screen because the leftmost platform starts at pixel 100. The right side is calculated by the platform width and the starting point. The platform width is 400 pixels. 100 and 400 gives 500. So the player can't go right past pixel 500. When the player clicks the right key the game might move the character 20 pixels right, however when clicking left it will move the character 20 pixels back. When the player clicks the space button, the character might jump up. This means that over a period of time it has to go up a certain amount of pixels, then go back down the same amount of pixels a little faster to make it more realistic.

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

MaxineMaxine
I respect you enough to keep it real.
Chat with Maxine
BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake
TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga

Add your answer:

Earn +20 pts
Q: Why are coordinates important?
Write your answer...
Submit
Still have questions?
magnify glass
imp