User:Hickman/Graphics Studio

From MCIS Wiki

< User:Hickman
Revision as of 22:48, 25 April 2007 by Hickman (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Contents

Graphics Studio

Purpose of the Project

The graphics studio is an application in which the user works with a canvas containing a collection of graphical objects. In this program, we will work with only one sort of object - a filled polygon.

Objectives for this assignment include:

Matrix-based affine transformations of objects in a reusable library Use of homogenous coordinates to represent transformations Various GUI issues: cursors, mouse events, graphics, color choice. Use of ArrayList Finite state machines

Extension

No extension required

Interesting Code

public void computeM3() {

 toScreen = M3.scale(xScale, yScale);
 toScreen.times(M3.rotate(rotation));
 toScreen.times(M3.translate(xTranslation, yTranslation));
 
 toWorld = M3.trnaslatew(-xTranslation, -yTranslation);
 toWorld.times(M3.rotate(-rotation));
 toWorld.times(M3.scale(1/xScale, 1/yScale));

}

Tip

Use the wiki and ask a lot of questions... and google

Hardest Part

Working with the matrices and understanding exactly what was going on when you call a bunch of different methods on the matricies.

Personal tools