<blockquote>
<p>The 2D pipeline involves ... [coordinate transformation terms]</p>
<p>Can someone give me the detail differentiation among these?</p>
</blockquote>
<p>This is something I very recently learned while trying to understand how software handles 3D graphics behind the scenes. I've never encountered these terms in reference to 2D graphics before, but the ideas still apply. 2D graphics are just 3D graphics without a few fancy tricks.</p>
<h1>Very Generally</h1>
<p>Most of these different coordinate spaces don't technically exist. They come about by considering the objects you wish to draw from some reference point. When you change that reference point, you change the coordinate space. Math gets involved, but I won't do any here.</p>
<h1>The Drawing Device and Device Coordinates</h1>
<blockquote>
<p>... converting normalized coordinate to device coordinate.</p>
<p>Isn't viewing coordinate and device coordinate the same things?</p>
</blockquote>
<p>Short answer, no, but they can be in certain 2D cases. In 3D, pretty much never.</p>
<p>There seems to be a confusion not just between view and device coordinates, but also with the distinction between normalized and device coordinates. Lets start with normalized and device, and we'll get to view later.</p>
<p>In 3D systems (and 2D systems setup to work like them) you are presented with a &quot;drawing device&quot; consisting of two parts: drawing tools (usually functions accessed from application code) and a drawing area. Ignoring the tools, the important thing is that the drawing area has a coordinate system independent of pixels which adds a lot of flexibility and generality to the device.</p>
<p>Any time something is setup to work numerically in a range from 0 to 1 it is &quot;normal&quot;, and often the range 0 to -1 is included too. With a drawing device the coordinates for both the X and Y directions of your drawing area range from -1 to 1, with -1 meaning &quot;all the way left&quot; for X and &quot;all the way down&quot; for Y, and 1 meaning &quot;all the way right&quot; or &quot;all the way up&quot; for X and Y respectively.</p>
<p>You can easily add a Z direction too (also ranging from -1 to 1) for &quot;3D&quot; drawing, but all this does is give you a layered 2D image. There is no perspective (or &quot;depth&quot;) in your final drawing which is great for 2D games and graphics. The reason for this is that the drawing device will simply divide the space up into pixel size steps along X and Y then draw each pixel back to front (-Z to +Z). If you want real 3D though, you'll need some extra mathematical steps.</p>
<p>It is possible (and common) for the device to understand and work with coordinates outside the -1 to 1 range. However, if we want an object to appear on screen than it must be &quot;normalized&quot; so that any coordinates it refers to are within -1 to 1. After this is done to an object the terms &quot;normalized coordinates&quot; and &quot;device coordinates&quot; are practically synonymous, just one refers to the object you altered so that it would fit within the drawing area and the other refers to the drawing area itself.</p>
<h1>Object and World Spaces</h1>
<blockquote>
<p>The 2D [or 3D] pipeline involves with the construction of world coordinate scene ...</p>
</blockquote>
<p>Yes, but you start in &quot;object space&quot;.</p>
<p>When someone creates a model of an object (or draws a sprite) all that matters to them, coordinate-wise, is where zero is within the space they're working. This consideration is called &quot;object space&quot; because the artist isn't concerned with the -1 to 1 drawing area, only accurately representing the object they'd like to draw. A model of a pen might be 6 units long and a model of a person might be 5.5 units tall. The important thing is that all of the points that make up some object are positioned with regard to the coordinate (0, 0, 0) and nothing else.</p>
<p>When later loaded into memory they will be too big for the drawing area (which is only 2 units tall and wide) and the pen will appear larger than the person. It's up to us humans to know what the units mean and adjust them properly. Resizing and positioning all objects in relation to each other instead of each individually being sized with relation to zero transforms the objects into &quot;world space&quot;.</p>
<p>From the shortness of your question I wasn't sure if you knew that yet or not, but I thought I'd include that for completeness, as a good foundation for answering the next part of your question.</p>
<h1>View Space</h1>
<blockquote>
<p>... followed by converting world coordinate to viewing coordinate ...</p>
<p>Isn't viewing coordinate and device coordinate the same things?</p>
</blockquote>
<p>Note that in my explanation above nothing ever happened to the drawing device, or the coordinates of the drawing area. The only thing that ever changed was the objects we wanted to draw. The drawing area is fixed and unchanging, only ever drawing any object that fits within the coordinates -1 to 1.</p>
<p>Each object loaded appears at the center of the drawing area at whatever size it was designed to have (object space) which is practically always too big for the drawing device. After rearranging and resizing every object around each other (object space → world space) we still have a final scene that is too big for the drawing area, and we have no way to move around within the scene. This is where we transform everything into &quot;view space&quot; and work with &quot;eye coordinates&quot;. Again, there is no such space, but what we do to work within it is to consider an imaginary camera and, treating the entire world as one giant object, we resize and reposition everything with respect to the position of the camera. That is &quot;view space&quot;, the movement of everything around a camera, and the terms &quot;view coordinates&quot; (or &quot;eye coordinates&quot;) refer to the positions of everything in relation to the camera.</p>
<h1>View to Viewport</h1>
<p>At this point everything that you want to see should be within the device space, but there are still a few last tasks to perform to get everything to draw.</p>
<p>If you were working on a 3D scene instead of a 2D one, you would perform a &quot;perspective transformation&quot; to create the illusion of depth. This is where you squish and warp things to make them look like they're shrinking into the distance.</p>
<p>Anything outside the drawing area needs to be thrown out. This saves on work for the computer, and it also is considered another transformation from view space to &quot;clip space&quot; because you are &quot;clipping away&quot; the extra data.</p>
<p>And finally, after clipping, you'll do a &quot;viewport&quot; transformation that turns the -1 to 1 coordinates into pixel coordinates.</p>
<h1>Summary</h1>
<p>Well... I didn't intend for this answer to get so long. My apologies if I covered anything you already knew. It's hard to guess what someone does or does not already understand. Please leave a comment if you have any further questions.</p>
<p><strong>Object Coordinates:</strong> The positions of points relative to a zero point. The points referred to are the building blocks of some single object.</p>
<p><strong>World Coordinates:</strong> The positions of collections of points (objects) relative to a single shared standard zero point.</p>
<p><strong>View Coordinates:</strong> The position of all points (the whole scene) relative to a camera.</p>
<p><strong>Device Coordinates:</strong> Any position within -1 to 1 on both the X and Y axis (and Z too for 3D). Any point within the drawing area of the device.</p>
<p><strong>Normalized Coordinates:</strong> The positions of points of any object (or the whole scene) that have been transformed to fit within the -1 to 1 space of the drawing device.</p>

CC BY-SA 4.0
2019-06-28T00:21:15.337Z
2019-06-28T00:21:15.337Z
2020-06-18T08:32:12.800Z
RoboticForest
<p>The 2D pipeline involves with the construction of world coordinate scene followed by converting world coordinate to viewing coordinate, then transforming viewing coordinate to normalized coordinate and lastly converting normalized coordinate to device coordinate.</p>

<p>I am confused. Isn't viewing coordinate and device coordinate the same things?
Can someone give me the detail differentiation among these?</p>

CC BY-SA 4.0
2019-06-17T16:42:55.853Z
Refer to: http://www.songho.ca/opengl/gl_transform.html
lightxbulb
<transformations><2d><normal-mapping><2d-graphics>
What is the difference between world coordinate, viewing coordinate and device coordinate in computer graphics?
Himanshuman
# What is the difference between world coordinate, viewing coordinate and device coordinate in computer graphics?

(Asked by: username_0 on 2019-06-17)

The 2D pipeline involves with the construction of world coordinate scene followed by converting world coordinate to viewing coordinate, then transforming viewing coordinate to normalized coordinate and lastly converting normalized coordinate to device coordinate.

I am confused. Isn't viewing coordinate and device coordinate the same things?
Can someone give me the detail differentiation among these?

**Tags:** transformations, 2d, normal-mapping, 2d-graphics

> **Comments:**
> **username_1**: Refer to: http://www.songho.ca/opengl/gl_transform.html  

---

## 1 answers

### Answer by username_2 on 2019-06-28. Score: 3 | Accepted answer

> The 2D pipeline involves ... [coordinate transformation terms]
>
> Can someone give me the detail differentiation among these?

This is something I very recently learned while trying to understand how software handles 3D graphics behind the scenes. I've never encountered these terms in reference to 2D graphics before, but the ideas still apply. 2D graphics are just 3D graphics without a few fancy tricks.

# Very Generally

Most of these different coordinate spaces don't technically exist. They come about by considering the objects you wish to draw from some reference point. When you change that reference point, you change the coordinate space. Math gets involved, but I won't do any here.

# The Drawing Device and Device Coordinates

> ... converting normalized coordinate to device coordinate.
>
> Isn't viewing coordinate and device coordinate the same things?

Short answer, no, but they can be in certain 2D cases. In 3D, pretty much never.

There seems to be a confusion not just between view and device coordinates, but also with the distinction between normalized and device coordinates. Lets start with normalized and device, and we'll get to view later.

In 3D systems (and 2D systems setup to work like them) you are presented with a "drawing device" consisting of two parts: drawing tools (usually functions accessed from application code) and a drawing area. Ignoring the tools, the important thing is that the drawing area has a coordinate system independent of pixels which adds a lot of flexibility and generality to the device.

Any time something is setup to work numerically in a range from 0 to 1 it is "normal", and often the range 0 to -1 is included too. With a drawing device the coordinates for both the X and Y directions of your drawing area range from -1 to 1, with -1 meaning "all the way left" for X and "all the way down" for Y, and 1 meaning "all the way right" or "all the way up" for X and Y respectively.

You can easily add a Z direction too (also ranging from -1 to 1) for "3D" drawing, but all this does is give you a layered 2D image. There is no perspective (or "depth") in your final drawing which is great for 2D games and graphics. The reason for this is that the drawing device will simply divide the space up into pixel size steps along X and Y then draw each pixel back to front (-Z to +Z). If you want real 3D though, you'll need some extra mathematical steps.

It is possible (and common) for the device to understand and work with coordinates outside the -1 to 1 range. However, if we want an object to appear on screen than it must be "normalized" so that any coordinates it refers to are within -1 to 1. After this is done to an object the terms "normalized coordinates" and "device coordinates" are practically synonymous, just one refers to the object you altered so that it would fit within the drawing area and the other refers to the drawing area itself.

# Object and World Spaces

> The 2D [or 3D] pipeline involves with the construction of world coordinate scene ...

Yes, but you start in "object space".

When someone creates a model of an object (or draws a sprite) all that matters to them, coordinate-wise, is where zero is within the space they're working. This consideration is called "object space" because the artist isn't concerned with the -1 to 1 drawing area, only accurately representing the object they'd like to draw. A model of a pen might be 6 units long and a model of a person might be 5.5 units tall. The important thing is that all of the points that make up some object are positioned with regard to the coordinate (0, 0, 0) and nothing else.

When later loaded into memory they will be too big for the drawing area (which is only 2 units tall and wide) and the pen will appear larger than the person. It's up to us humans to know what the units mean and adjust them properly. Resizing and positioning all objects in relation to each other instead of each individually being sized with relation to zero transforms the objects into "world space".

From the shortness of your question I wasn't sure if you knew that yet or not, but I thought I'd include that for completeness, as a good foundation for answering the next part of your question.

# View Space

> ... followed by converting world coordinate to viewing coordinate ...
>
> Isn't viewing coordinate and device coordinate the same things?

Note that in my explanation above nothing ever happened to the drawing device, or the coordinates of the drawing area. The only thing that ever changed was the objects we wanted to draw. The drawing area is fixed and unchanging, only ever drawing any object that fits within the coordinates -1 to 1.

Each object loaded appears at the center of the drawing area at whatever size it was designed to have (object space) which is practically always too big for the drawing device. After rearranging and resizing every object around each other (object space → world space) we still have a final scene that is too big for the drawing area, and we have no way to move around within the scene. This is where we transform everything into "view space" and work with "eye coordinates". Again, there is no such space, but what we do to work within it is to consider an imaginary camera and, treating the entire world as one giant object, we resize and reposition everything with respect to the position of the camera. That is "view space", the movement of everything around a camera, and the terms "view coordinates" (or "eye coordinates") refer to the positions of everything in relation to the camera.

# View to Viewport

At this point everything that you want to see should be within the device space, but there are still a few last tasks to perform to get everything to draw.

If you were working on a 3D scene instead of a 2D one, you would perform a "perspective transformation" to create the illusion of depth. This is where you squish and warp things to make them look like they're shrinking into the distance.

Anything outside the drawing area needs to be thrown out. This saves on work for the computer, and it also is considered another transformation from view space to "clip space" because you are "clipping away" the extra data.

And finally, after clipping, you'll do a "viewport" transformation that turns the -1 to 1 coordinates into pixel coordinates.

# Summary

Well... I didn't intend for this answer to get so long. My apologies if I covered anything you already knew. It's hard to guess what someone does or does not already understand. Please leave a comment if you have any further questions.

**Object Coordinates:** The positions of points relative to a zero point. The points referred to are the building blocks of some single object.

**World Coordinates:** The positions of collections of points (objects) relative to a single shared standard zero point.

**View Coordinates:** The position of all points (the whole scene) relative to a camera.

**Device Coordinates:** Any position within -1 to 1 on both the X and Y axis (and Z too for 3D). Any point within the drawing area of the device.

**Normalized Coordinates:** The positions of points of any object (or the whole scene) that have been transformed to fit within the -1 to 1 space of the drawing device.


---

