3D rendering is very difficult. There are actually many different ways to render 3D objects, but for all of them the algorithms are quite complex. If you're wanting to do 3D, Greenfoot isn't really a realistic option. You could try JMonkeyEngine (that was what I used when I first did 3D). If you're wanting to create a 3D rendering engine (I wouldn't personally recommend it, but it's up to you), then Google should help you out with what the algorithms actually are