{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

A1 - • Read/write access to rows and columns • Matrix...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CS 33400 Fall 2010 Voicu Popescu Due: Tuesday September 7 at 6:00am Assignment 1—Vectors, matrices, transformations In a nutshell Implement a 3D vector class and a 3x3 matrix class. Illustrate your classes by rotating a point about an arbitrary axis. Details 1. 3D vector class Stores 3 floats. Constructor from 3 floats. Read/write access to elements with square brackets operator. Stream I/O using << and >> operators. Normalization. Length. Dot product (choose operator). Cross product (choose operator). Multiplication/division with scalar (use operator). Addition/subtraction with another vector (use operators). Rotate point about arbitrary axis. Parameters are 2 points to define axis and a scalar (float) to define the rotation angle in degrees. Rotate vector about arbitrary axis. 2. 3x3 matrix class Stores 3 3D vectors Constructor: identity matrix. Constructor: rotation about {x|y|z} axis alpha degrees.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon