6 views

Uploaded by Izni Mustafar

save

You are on page 1of 26

Mengxia Zhu

Fall 2007

Objective

Review vector arithmetic

Distinguish points and vectors

Relate geometric concepts to their

algebraic representation

Describe point, line, and planes

Exploit the dot product and cross product

and their applications in Graphics

9} V=Q-P Vector v : with length and direction. physical entities. seen as points displacement y y z Right-hand system Left-hand system x x z . 3. Vector has no fixed location.Basic Entities Coordinate system: has an origin and some mutually perpendicular axes emanating from the origin. such as force. and velocity. Q Point P: a location in space V P {2.

5v -v . multiply them with real number Multiplication gives a vector v Has the same direction as that of v v 2. Vector-scalar multiplication Vector permits two fundamental operations: add them.

Vector addition v1 v1-v2 Sum of two vectors Subtraction of two vectors Adding and subtraction of v2 corresponding components of two vectors gives a new vector v1+v2 v1+v2 v1 v1-v2 v1 v1 v2 v2 v2 .

Linear Combination and Affine Combination A linear combination of vectors W = a1v1+a2v2 + a3v3 +…+anvn: all weights are scalars. A convex combination poses a further restriction on affine combination. A linear combination is affine combination of vectors if the sum of all coefficients add up to unity. Not only must the coefficients sum to unit. but each must also be non-negative .

and are not negative. Partition of unit m v a v i 1 i i v=a1v1 + a2v2 +(1-a1-a2)v3 v3 v2 v=(1-a)v1 + av2 = V1+a(V2-V1) a(V2-V1) v2 v1 v1 .Linear Combination of Vectors The combination is Convex if the coefficients sum to 1.

v2. unit vector ~ v v v . vn 1 2 2 2 Normalization: Scale a vector to have a unity length.…vn) Magnitude (length): the distance from the tail to the head.Normalize a vector v is represented by n-tuple ( v1... v v v2 .

Point-vector addition Subtraction of two points P and Q gives a vector v: v=P-Q Adding a vector v to point Q gives a point K: K=Q+u P v Q u K .

b2) = a1xb1 + a2xb2 The most important application of the dot product is to find the angle between two vectors or between two intersecting lines.a2) dot (b1. the dot product equals zero. (a1.Dot product Dot product between vector v and vector u gives a scalar If u and v are orthogonal. v u v u .

The Angle between Two Vectors Hence. u gv u v cos v vgv v u gv 0 u v v u u gv 0 u v u u gv 0 . dot product varies as the cosine of the angle from u to v.

(a1b2 – a2b1) . b3) a x b = ( a2b3 –a3b2). (a3b1-a1b3). b2.Cross Product a = (a1. a2. b=(b1. a3).

Cross Product Cross product between vector v and u gives a vector ~ v u n v u sin vxu n is a unit vector perpendicular to both u and v. u Follow the right-hand rule u and v are parallel if v vu 0 uxv The length of the cross product equals the area of the parallelogram determined by u and v .

Operation Calculation .

Operation Calculation .

but with direction and size. no direction and size. they are quite different. Homogeneous representation Revisit coordinate frame system Ordinary coordinate system. points and vectors are represented the same. However. . Vector has no location. Points have location.

b. Homogeneous representation cont Represent both points and vector using the same set of v1 basic underlying objects. c. v2 v av1 bv2 cv3 a. b. ) p3 We view point’s location as an 1 offset from the origin by a certain amount a. c. b. keep straight the distinction between 0 points and vectors with a p1 compact notation. Easy to program… p2 P ap1 bp2 cp3 (a. . One of the hallmarks of v3 computer graphics. c.

1) Vector: (x. append a 1.0) To go from ordinary to homogenous coordinates.y. Point: (x.z.Homogeneous representation OpenGL uses 4D homogeneous . if the object is a point.z. . if the object is a vector.y. append a 0. coordinates for all its vertices.

B B B C C C . A ray is semi-infinite.Line A line is defined by two points. It is infinite in length and extending forever in both directions. A line segment is defined by two endpoints. specified by a starting point and a direction.

b B C t>1 B L t=1 C t=0 t<0 .Parametric Representation Line When t varies. the point P trace out all of L(t ) C bt the points on the line defined by C and B.

planes seem to appear everywhere. Three point form Parametric representation Point normal form .Parametric Plane Heavy use of polygons in 3D graphics.

we can identify the corresponding point on the plane. b = B-C a C A Given any values of s and t.Parametric form Equation P(s. .t) = C + as + bt b B a = A-C.

t) = sA+tB+(1-s-t)C .Three point form of Plane Given three points A. and C. B. We rewrite the parametric form: P(s.t) = C + s (A-C) + t(B-C) Affine combination of points: P(s.

normal to the plane. it satisfies: ng( R B ) 0 . B Normal n is perpendicular to any line lying in the plane. R is any point on the plane.Point Normal form Plane can be specified by n a single point B. that lies within it and direction n.

performs a linear interpolation between the points A and B. The procedure if simplest if the two figures are polylines based on the same number of points. Interesting animation can be created that show one figure being “tweened” into another.Tweening for Art and Animation The affine combination of points P = A(1-t) + Bt. .

} } . if ( i == 0 ) moveTo (Px. Py). i< n. t). float t) { for (int i= 0.Tweening void drawTween ( Point A[]. i++) { Point p. B[i]. else lineTo (Px. Point B[]. Py). int n. P = Tween(A[i].

- vectorsUploaded byHitesh Bhatia
- Fisdas Pert 4Uploaded byRidwan Marup
- Experiment 4- Resultant and Equilibrant ForcesUploaded byTracy Tinio
- VectorsUploaded byBobby Shalack
- 03. Chapter 2 Force Vector Week 3 50s -Full (1)Uploaded byTingYuan Hoi
- Unit Vector NotationUploaded byEdna Mae Cruz
- goodluck concept & techniqueUploaded byapi-292555421
- Calculus 2Uploaded bySedulor Ngawi
- AMAT219 Vector Geometry Review NotesUploaded bybushra_fp
- Math Form 4Uploaded byNazhif Wan Yusoff
- HydrodynamicsUploaded bydist2235
- ECE102Uploaded bynadayn
- ch2.pdfUploaded byAndrew Borg
- Goodrich - Potential Fields TutorialUploaded bylkkllkkl
- lec2Uploaded byJoØrsh Ênrique Tu Xikytø NînîØflow
- MHT CET 2018 Exam PatternUploaded byKabir Jangam
- AQA-MM1B-W-MS-JUN06Uploaded byVũ Lê
- VectorsUploaded byKathleen Marie Monfort
- CH5Uploaded byMaruf_007
- OCTOPUS 900 - Kinetic TestingUploaded byMei Young
- catenaryUploaded bySubhrajit Bhattacharya
- g11m analytical geometryUploaded byapi-235269401
- Explain1.pdfUploaded byRaja Ghufran Arif
- 1.1 - Rhino-Grasshopper Introduction for Basic OperationUploaded byCuong Tran
- 10-11 paper Houston PlenarySpk Masterat dec 2010.pdfUploaded byMarius
- cm_part_1.pdfUploaded byAdriana Quacquarelli
- physics_2Uploaded byJaved Siddiqui
- Bonus algebra chapterUploaded bydivyanshu33
- EDU Motion Student 2013 ENGUploaded bycbr6000
- Classical Mechanics LecturesUploaded byMose DelPozzo

- Era MesozoicaUploaded byDeisy Borja Punil
- Evidencia 2 de Ciencias de La Vida Opcion 2Uploaded byeduardo rafael santos gomez
- Los OrnitorrincosUploaded byAlex Sarertnoc
- Leon jirafa camello hipopótamoUploaded byAlberto Cortes
- syllabusUploaded byRams Ram
- La música Clásica y los cartoonsUploaded bymusicalma
- GM Tech Magazine :: Issue ThreeUploaded bygamemakertech
- Trabajo Final de CienciasUploaded byMARÍA CAMILA PACHECO RIVERA
- tarea 3Uploaded byralsalberto
- lista animeUploaded byRobert Nxa
- Osos PandaUploaded byAnduVega
- Banda Desenhada DisneyUploaded byfredmacedocadastros
- Topolino 3118 - 1 Settembre 2015Uploaded byJohnDoez
- Create a Sprite Animation With HTML5 Canvas and JavaScript { William Malone }Uploaded bywhiskises
- Colección de 122 cuentos Infantiles.docxUploaded byDiego Velasco
- We The Sheeple - Adventure Time SpecUploaded byAdam Isaacs
- Uf 1.1-1 El Producto de AnimacionUploaded byMj Ji
- comic book batmanUploaded byapi-235277529
- Apostila Zoologia Dos CordadosUploaded byElias Teles
- Class action against major studiosUploaded bySouthern California Public Radio
- reproducción del elefanteUploaded byDaniel Parada Perez
- EntrepreneursUploaded byLeigh-ann Garrote
- Guia Articulos InformativosUploaded bycarolina2013333
- Particles TutorialUploaded byPawel Piecuch
- Cómo dibujarUploaded byMarcos Daniel Ruiz Diaz Mendoza
- Uf 1.1-2 Historia de La AnimacionUploaded byOscar Lumiere
- ARAÚJO, Carlos Eduardo Dias - Caminhos da produção audiovisual contemporânea - arte, mídia e tecnologia digitalUploaded byJamer
- manual Tanida Demo Builder.pdfUploaded byRomeo Romeo
- Interaction Design & Complex AnimationsUploaded byMelina CIsneros
- elefandfte(1)sdfUploaded byMichele Placid