2
\$\begingroup\$

I am looking for help/links/notes/agorithms/URLs/examples on drawing/rendering spheres in pure Java (so that I can hopefully, one day, generate/render planets with various surfaces & atmospheres)

So for the moment, i'd be pretty happy to be able to start off with just drawing a wireframed sphere(s).

ps: I don't want to use external libraries like Java3D, JOGL or aftermarket engines like JMonkeyEngine, Would rather keep it as straight Java.

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

This is not possible in java as i know.

If you still want to do this in plain java, you will have to implement some kind of simple 3D library by yourself. That is very useful for learning graphics programming, but not easy way how to get things working (and it will be slow, because you will not be able to use gpu). If there is not some special reason to not using libraries i think that you will be good with JOGL.

\$\endgroup\$
3
  • \$\begingroup\$ It's actually not that hard to get something simple up and running in 3D. Here's an example link. I didn't want to follow this example because I don't like the idea of merely creating a fixed array, of lets say 100 points, to make a rough looking sphere that was the same size as every other 'planet' of mine, so I was just curious as to whether there were other alternatives/ways/techniques. \$\endgroup\$
    – d33j
    Commented Feb 18, 2011 at 7:55
  • \$\begingroup\$ @d33j But this just uses some canvas for drawing lines and that's exactly what i meaned by the "implement 3D library by yourself". For something more sophisticated than cube with some crazy hacks to 3D algebra (sorry I dont want to be rude, but that is really not nice). You will have to use 3D api or implement real simple 3D library with view/proj/matrices support for triangles and at least texturing and shading (phong will be for planet enough). \$\endgroup\$
    – Notabene
    Commented Feb 19, 2011 at 21:32
  • \$\begingroup\$ @d33j But i would like to encourage you. Doesn't matter if you will decide to really implement 3D lib by yourself or use 3D api like Jogl. It will be great fun and great experince ;-] \$\endgroup\$
    – Notabene
    Commented Feb 19, 2011 at 21:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .