Reputation: 79
I'm brainstorming a way to create a basic custom 3D engine by myself and it's all very new to me, as I've only practiced 2D graphics.
Assuming that we have calculations for a Z coordinate using the recommended formulas given here, how might I go about plotting the Z coordinate? I understand that by default, Java graphics draw on a 2D field, which means that the only coordinates I can draw to is either the X or Y coordinate... and that's where I'm stuck.
3D development is not taught in my college... so I really appreciate good feedback. The tutors here never practiced creating 3D engines, so I'm very frustrated because learning this concept is crucial.
Upvotes: 2
Views: 454
Reputation: 1
I know how to make a 3d program in English but not in code. If you would like to make one, please let me know. So I can see how active you are.
Oh my apologies. I didn't answer*. Let me elaborate on your predicament.
Z axis doesn't exist. It's an illusion. You need to produce a procedural code to establish this illusion.
Upvotes: 0
Reputation: 9821
In order to map 3D coordinates to a 2D plane (the screen) you'll need to understand the concept of the Frustum and how to utilize a Projection Matrix.
This article does an excellent job of explaining what it does and how to implement one. Writing your own engine for this seems to be a massive undertaking and assumes you understand the vector and matrix mathematics. If not, I would suggest doing some reading on linear algebra; it's fundamental to this kind of programming.
If you'd like to work with some already established technologies, look into OpenGL for Java.
Upvotes: 3