[HELP] 3D Programming in pure java.

Hey, guys i’ve recently created a 3D engine in pure java. (pure java meaning i didn’t use Java3D, lwjgl, etc) that currently views a cube and its convenient for me (simply create a model, vertex list and face list then add both list to the model, then simply render the model), although it does not contain any parser’s yet. (so i can load .obj models and other 3d model file formats)

UPDATE: you may now download my source/app to check this out for your self.

THE ISSUE:

It shows a perfect CUBE when the cube is centered within the camera…
BUT as you move the camera and the cube becomes closer to the edge of cameras view, some of the faces appear to change into rectangles (like the cube stretches) so the problem is my math i guess? i was hoping someone would have stomped this challenge before and have some good tips.

thanks for any help, i’ll post pics if needed.

CUBE CENTERED
[spoiler]


[/spoiler]

Cube moved to the end of the camera.
[spoiler]


[/spoiler]

Better Cube Example
[spoiler]

[/spoiler]

DOWNLOADS:

Source Code: https://www.dropbox.com/s/z2xltl9tyw6h39x/3DLibrary.rar?dl=0

Runnable Jar: https://www.dropbox.com/s/duy8nif69a32re5/3DTest.jar?dl=0