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

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

1 CS 33400 Spring 2010 Voicu Popescu Due: Monday January 25 th 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.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Read/write access to rows and columns. Matrix inversion. Matrix transposition. Matrix times column vector. Matrix multiplication. Stream I/O using << and >> operators. 3. Example Rotate a point about an arbitrary axis 10 times with 36 o increments. Plot the x, y, and z coordinates of the point as functions of the rotation angle. One graph 3 curves. Choose your favorite graphing tool (e.g. Matlab, Excel, etc.) You choose the point and the arbitrary axis, but specify the point, the axis origin, 2 and the axis direction in a text file called README.txt. Save the graph in an image file called GRAPH.<ext>, where the extension depends on the file format chosen. Use a popular file format such as tif, jpeg, bmp, etc. Turn in Submit your code, README.txt and GRAPH.<ext> files via Blackboard © Popescu spring 2010...
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

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

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online