Home » Blog » 3D

3D

Simple 3D Graphics using JavaFX

Simple3D Graphics JavaFX rewrite of my first article using Swing Simple 3D graphics using Java was my first article using Swing UI. As you know JavaFX is the replacement for Swing. In this article I will talk about JavaFX a bit more than the app itself because it was a conversion. This is not only a JavaFX app it’s a JavaFX FXML app. So like Android apps there are two ways to define the UI. You can build it with code within class  definitions and constructors. Or you can define the UI with XML. In this case its FXML for Java FX XML. SceneBuilder and NetBeans You can define the FXML with a text/code editor. This would be painful and you would have to know FXML fairly well and do a lot of looking things up. Or you can download SceneBuilder from Gluon. You can use the FXML generated wit...

Simple 3D graphics using Java

Isometric or Orthogonal 3D views In this article, I demonstrate 3D Graphics showing you how to project a surface in 3D using 3 modes for drawing the surface. There is a left-hand mode, a center mode, and a right-hand mode. This same transformation math works for 3D polyhedron objects as well and you could use if for voxel type games. I show some effects you can use on the surface such as zoom, pan, skew etc. This is entirely wire frame. I do not remove hidden lines. I do not fill or texture map. And I do not rotate. I may do all this in future versions of this article. 90-degree rotation is very easy to do. Using basic trigonometry math more fine rotation is not difficult. The Iso3D class I did not have to put this code in its own class. As a matter of fact, in such a simple demo applicati...