Neat, I remember doing this stuff in my 3D programming class.

Sorasyn  -  Dec 07, 2013

Yeah, we covered them in Trigonometry awhile back to transform 2D vectors. I thought it'd be a nice small project to do, and I have been wanting to dig into PHP a little bit.

I'd like to say that OOP in PHP is different than I'm used to with say, C#, but truthfully it's not. It does, however, require $this-> each time you reference any in class variables or functions, which gets old after awhile. It was a treat figuring out how to build a two dimensional array, though.

Hawkee  -  Dec 08, 2013

Looks like some very clean code.

Sorasyn  -  Dec 08, 2013

Thanks! I'm not really fond of having too many nested loops at once, but it's somewhat unavoidable in this instance. I'd like to have added the ability to invert matrices, but that's a sticky business regarding rules and what not for any matrix with dimensions greater than 2x2.

Jonesy44  -  Dec 12, 2013

Inverting matrices is a pain but the one thing a computer can definitely do better than a human. Maybe start by just calculating the determinant. Nice code though - MATLAB is the bomb for doing this kind of stuff :-)

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.