Download presentation
Presentation is loading. Please wait.
Published byJob Hart Modified over 9 years ago
1
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. CS 497: Computer Graphics James Money
2
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Topics Vectors, Matrices, and Planes. Mathematics we perform on them.
3
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Vectors A Vector is a column of numbers as such: 1 2 3 4
4
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Vectors We can add them, but not multiply them: 156 268 37 10 48 12 = +
5
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Vectors Instead of multiplying vector we can do two things with them: –Dot Product –Cross Product
6
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Vectors and Dot Products The Dot Product of V and W is defined as: VW =V 1 W 1 V 2 W 2… V n W n =V 1 *W 1 + V 2 *W 2 + … + V n *W n Length of (V)=SQRT(V V)=||V||
7
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Vector and Dot Products The dot product is not order dependent: V W = W V And this also equals: V W = ||V||*||W||Cos(θ) Remember:||V||=
8
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Matrices Matrices are n-columns of vectors:
9
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Matrices You can Add matrices directly: + =
10
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Multiplying Vectors You can multiply a vector times a matrix: Note: The number of columns in the matrix must equal the number of rows in the vector.
11
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Multiplying Matrices Multiplying a matrix is a series of Matrix*Vector multiplications performed on each column of the second matrix.
12
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Multiplying Matrices If A and B are m x p and p x n sized matrices then AB is a m x n matrix. AB BA in general! If I is the identity matrix then AI=IA=A. I is:
13
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Matrices, Inverses, & Determinants The inverse of A is A -1 and AA -1 =I=A -1 A The determinant of a matrix tells us if it is invertible. If Det A = 0, A is NOT invertible.(There are also a slew of other laws that apply if this is true.) The Det(A) if it is 3x3 is:
14
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Vectors and Cross Products Cross Products allow you to find a vector that if perpendicular to the given two vectors if they are in 3D: V x W = Det() = i(V 2 W 3 - W 2 V 3 ) - j(V 1 W 3 - W 1 V 3 ) + k(V 1 W 2 - W 1 V 2 )
15
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Planes A Plane is the 3D space equivalent to the line in 2D space. It is defined by: Ax + By +Cz + D = 0. A,B,C are the coefficients of the normal vector of the plane.
16
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Planes and Normals The normal vector of a plane is perpendicular to the plane and defines it. Given 3 points we can define a plane:
17
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Planes Given the Normal to a plane we can find D and the equation by plugging a point on the plane in the equation: Plot of (A,B,C,D) as (1,0,0,0) for X=0 plane.
18
Copyright 1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Homework Continuation of Last Time! Read Chapter 1 Read section 3.6,3.14 Read Chapter 4 if needed. Read Chapter 5. Read Chapter 6.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.