Presentation is loading. Please wait.

Presentation is loading. Please wait.

SE 313 – Computer Graphics Lecture 3: Analytical Geometry and Linear Algebra Lecturer: Gazihan Alankuş Please look at the last three slides for assignments.

Similar presentations


Presentation on theme: "SE 313 – Computer Graphics Lecture 3: Analytical Geometry and Linear Algebra Lecturer: Gazihan Alankuş Please look at the last three slides for assignments."— Presentation transcript:

1 SE 313 – Computer Graphics Lecture 3: Analytical Geometry and Linear Algebra Lecturer: Gazihan Alankuş Please look at the last three slides for assignments (marked with TODO) 16.02.20121

2 Quiz Turn off monitors Take out a piece of paper and a pen/pencil 5 minutes 16.02.20122

3 Our Goal Remember basic concepts in analytical geometry and learn about how they are applied in linear algebra and in computer graphics 16.02.20123

4 Coordinate Frame An origin point Three axes (x, y, z) – that are perpendicular to each other – that are ordered by the right hand rule (x-thumb, y-index finger, z-middle finger) 16.02.20124

5 Point Location in space Coordinates (x, y, z) 16.02.20125

6 Displacement between two points Vector = Point – Point Example: “North-east, 5 meters” No position, only direction. – If you want to, you can draw it starting from any position. 16.02.20126

7 Representing points and vectors Both of them are represented with three scalar values for the x, y and z axes. They mean different things – Point – precise location in space – Vector – precise direction, no location 16.02.20127

8 Operations Point addition Point subtraction Vector addition Vector subtraction 16.02.20128

9 Operations Point addition Point subtraction->Vector Vector addition->Vector Vector subtraction-> Vector Details are presented on the board, check your book or assigned online readings if you missed it. 16.02.20129

10 Different Coordinate Frames In computer graphics sometimes we use multiple reference coordinate frames – World coordinates, character coordinates, camera coordinates, etc. The same geometrical point or vector is represented with different values in different coordinate frames. The values depend on the coordinate frame being used. 16.02.201210

11 More Simple Operations Point – vector addition Point scaling Vector scaling 16.02.201211

12 More Simple Operations Point – vector addition-> point Point scaling-> point Vector scaling-> vector Details are presented on the board, check your book or assigned online readings if you missed it. 16.02.201212

13 Vectors have length 16.02.201213

14 More Interesting Operations Vector dot product Vector cross product 16.02.201214

15 More Interesting Operations Vector dot product-> scalar Vector cross product-> vector 16.02.201215

16 Dot product 16.02.201216

17 Properties Dot product two perpendicular vectors, you get zero Dot product a vector with itself, you get the square of its magnitude Can be used to calculate projections 16.02.201217

18 Cross product 16.02.201218

19 Properties 16.02.201219

20 Angle between two vectors 16.02.201220

21 Lab assignment Part 1 – Open up Blender, create a cone. Go to edit mode. Make sure everything is selected using Select->(De)select All. – Use View->Properties to show the properties pane. You will see the median location of all selected points there. Set it to 0, 0, -2 so that the tip of the cone is at the reference point. – Go back to object mode. Make the cone red. Duplicate the cone, make that duplicate blue. You should have one red and one blue cone. – Create a sphere in origin and make it white. Part 2 – Locate the two cones so that the vectors from the origin to the cones make an angle between 0-90 degrees. – Create two cylinders, locate and rotate them so that they look like the stems of the vectors. Color them the same as the cones. – Rotate the cones accordingly. The end result should look like two vectors with an angle between 0-90 degrees. Part 3 – Convert the properties pane on the right to be a Python console. Create two vectors using a code like this. The values should come from the locations of the cones. v1 = Vector([1.2, 1.3, -1.4]) v2 = Vector([5.5, 1.4, -3.4]) – Calculate the cross product like this: c=v1.cross(v2) – Normalize the vector using: c.normalize() print(c) – Draw a third vector starting from the origin and representing the normalized cross product. Make it green. 16.02.201221

22 TODO: Homework 3.a (video) Re-watch the Blender intro to modeling video here: – http://cgcookie.com/blender/2010/08/31/blen der-intro-to-modeling/ http://cgcookie.com/blender/2010/08/31/blen der-intro-to-modeling/ There will be quiz about it next week. 16.02.201222

23 TODO: Homework 3.b (deliverable) Start with a cube and use the extrude tool to create the first letter of your name. Feel free to make it pretty. Submit the rendered image and the.blend file, just like you did last week. 16.02.201223


Download ppt "SE 313 – Computer Graphics Lecture 3: Analytical Geometry and Linear Algebra Lecturer: Gazihan Alankuş Please look at the last three slides for assignments."

Similar presentations


Ads by Google