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 DocumentRight Arrow Icon
Background image of page 2
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 360 times with 1 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 fall 2010...
View Full Document

This note was uploaded on 02/27/2012 for the course CS 334 taught by Professor Staff during the Fall '08 term at Purdue University-West Lafayette.

Page1 / 2

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

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online