# Coordinate Systems

Introduction

• Points & vectors are represented by 3 real numbers – they represent the signed distance between the origin of a line and the position of a point on it e.g. a cross on a line. The cross is the origin.
• Origin is the point of reference from which the distance to other points is measured.
• If the point is to the right > 0 (or positive)
• If the point is to the left is negative
• With our line and origin we add additional marks at regular intervals either side of the origin to turn it into a ruler
• The ruler is used to measure the coordinate (signed distance) of a point from the origin
• The ruler defines the axis
• Point isn’t on axis;
• (assuming ruler is horizontal) drop a line perpendicular to it that would hit the point
• distance from origin to intersection of the point with vertical line = coordinate
• That’s how to coordinate a point with respect to the axis

Dimensions and Cartesian Coordinate Systems

• Assume horizon ruler (mentioned above) is the x axis
• Draw a perpendicular line through the origin – y axis
• For any point, get coordinates by:
• Drawing perpendicular lines through each axis to the point
• Then draw line from origin to the intersection of the lines
• We can now find 2 coordinates one on the x and one on the y
• By have two axes we have created a 2D space called a plane
• If there are two axes perpendicular to each other then it is a Cartesian Coordinate System
• Ordered pair commonly used to denote the coordinates of a point (x, y)
• To find coordinates of a point in a system when the coordinates are known in one, use formula from previous post
• Translation – adding values to a point to move it
• Scale – multiply coordinates by a value

Third Dimension

• Simple extension of 2D system
• Addition of depth; z axis
• Euclidean space – 3D coordinate systems
• Three axes = basis = set of independent linear vectors, combined can represent every vector or point in system
• Vectors in a set are linearly independent only if they can’t be written as a combination of the other vectors in that set
• Change of basis is the same as the change of the coordinate system

Left Handed vs Right Handed Coordinate Systems (L/RHCS)

• Left handed – right vector points left
• Right handed – right vector points right
• Introduced by John Ambros Fleming
• Relevant for normals of edges of polygon faces
• RHCS then polygons whose vertices were ACW will be front facing

Right, up and forward vectors

• RHCS is compatible with Maya
• Usually y-axis is up, z-axis is out and x-axis to the right
• Handedness is relevant to rendering, rotating and cross-product of two vectors
• To switch between the two is tedious : scale all point coordinates and camera-to-world matrix by (1, 1, -1)

The World Coordinate Systems

• Each different coordination system is defined with respect to this
• It defines the origin, x, y, z axis from which the other coordinate systems are defined

# Linear Algebra – Transformations

Basics to know

• Effect of linear transformation on points and vectors = simplest one is moving them in space
• This transformation is called translation and crucial in rendering
• Translation operator is the linear transformation of original (input) point
• Translation applied to a vector (direction) has no effect
• Where a vector begins (entered) has no meaning. All vectors of the same length, pointing the same direction are equal
• Rotation is the linear transformation that affects vectors

Impact of magnitude

• The length of the arrow/vector is very important
• If length is 1, vector is normalised
• Normalising – altering length of vector to 1 with direction unchanged
• Usually, we want vectors normalised
• If there’s a drawn line between two points it gives a direction and distance from one point to the other. This distance can be used in algorithms
• Normalisation is often the cause of bugs though, so always ask if it is necessary to do it

Normals

• Normal– term for orientation of a surface of a geometric object at a point on that surface
• Used in shading to compute the brightness of objects

Source : http://www.scratchapixel.com/lessons/mathematics-physics-for-computer-graphics/geometry

# Trying to get stuff done

We had decided we wanted a multiple choice game, and each choice would effect the outcome that the player would experience.

But we had no actual plan as to how it was going to work.

Since we really wanted to not have the same problem of everything being left to the last minute as we did with the title sequence.

Despite that, nothing was happening. Edward wanted to wait for everyone to be there before any decisions were made, and since it was Thursday, we had to wait for their Life Drawing class to finish.

It seemed a bit pointless for us just to just be sitting there, so I decided to walk up to my school to see if I could get any notes from my ICT teacher on Human Computer Interaction which we had studied at A-level.

I managed to walk there (a distance of 1.1 miles), saw my ICT teacher who told me their printer was broken and she would e-mail me the notes, found a penny on her floor (which I got to keep) and then went round to see my Technology teacher too.

By the time I did that, and returned back to the university- nothing had changed.

2.2 miles – roughly 41 minutes – and about an hour talking…

So I decided to try and make some sense of this game and then present the idea to the group to see if we could come to a decision.

I worked it out mathematically so that each person would have three scenes to draw.

This original plan was so that I could see how the different decisions would split up to go to different scenes and as the game progressed then the outcome would be the same despite the users choice to result in two final outcomes, rather than continuing to grow exponentially.

I thought that we could possibly just change the text in the scenes so that it explains why the outcome occurs from the decision.

Then, I started trying to plan out what decisions could lead to the various outcomes.

Below was my attempts at coming up with different scenarios. When the others came back we started to divide up the scenes, so that each person could draw three each.

I did also have another page where Sorcha and I tried to work out the logistics of the game, (you can see the original plan on the A4 page blue tacked to the whiteboard), and how the links would work because there was a few inconsistencies and that’s in my sketchbook.

# Linear Algebra – Vectors and Points

These are the notes I made on vectors.

Definitions:

Vector – represented array of numbers of any desired length. Usually has direction and magnitude

Tuple – another name for a the array of numbers. n-tuple = a vector of length n.

Linear Transformation – modifying a vector through a series of operations

Point – position in 3-dimensional space

Homogeneous points – addition of a fourth element e.g. Ph = (x, y, z, w). Used when multiplying points with matrices

Notes:

• By grouping the numbers, they represent something else relevant to the problem. In computer graphics Vectors represent either a position or direction.
• Vectors can be thought of as arrows pointing in directions (get my maths book off Erin)
• Both a point and vector can be represented by the tuple V=(x, y, z) were x, y, and z are real numbers.