Either way I'm rewriting my old graphics project (which was done in oberon...) in java and for some reason I can't get the rotations 'n stuff to work.

If i leave em out it works just fine, the image scales and draws just fine.

So this means that i have either:

1. set my rotation matrices wrong (i have checked them litterally 10 times so i think it's quite safe to assume it's not that) OR

2. my vector - matrix multiplication method isn't working properly.

So a little info.

A matrix in this case is simply a 2-dimensional 4 by 4 array of doubles

and a vector is a 1 dimensional array of 3 double values and a boolean to denote if it's a point or a vector.

The reason i gave each of them their own class is so it would make the code more readable and easier to do operations on.

Here's the code responsible for multiplying the 2 values:

public static Vector3D mult(Vector3D lhs, Matrix rhs) throws ParseException { if(rhs.get(0, 3)!=0 || rhs.get(1, 3)!=0 || rhs.get(2, 3)!=0 || rhs.get(3, 3)!=1) throw new ParseException("the matrix multiplificiation thingy just borked"); Vector3D ret = new Vector3D(); double[] temp = new double[NR_DIMS+1]; temp[0] = lhs.x; temp[1] = lhs.y; temp[2] = lhs.z; temp[3] = lhs.infty? 0:1; //is it a point or a vector? double[] vec = lhs.asArray(); for (int i = 0; i < NR_DIMS; i++) { vec[i] = 0; // Multiply the original vector with the i-th column of the matrix. for (int j = 0; j <= NR_DIMS; j++) { vec[i] += temp[j] * rhs.get(j,i); } } ret.x = vec[0]; ret.y = vec[1]; ret.z = vec[2]; ret.infty = lhs.infty; return ret; }

the code might look a little weird because i have tried all kinds of things but none seem to have worked.

I've been looking at this chunk of code for quite a while so i might just be missing the error.

Are there any smart people willing to help?