English 中文(简体)
Java/Graphics: Plotting 3d coordinates?
原标题:

I m coding a programm, that will produce 3d coordinates for a rocket and I would like to do a rudimentally graphic output for this.

it just has to be scaleable and rotationable, so that you can change the view manually. the postions should be connected by lines and it ould be nice to have spheres for earth and moon ( and perhaps addtional celestial objects).

I think, there should be some ready stuff for this kind of plott already available, but I couldn t find one.

So that s why I m here to ask you, if you know such a thing. and if there isn t I would kike to ask you how a bignner like me should start this? I ust coded for console apllications, because there was no need for a real graphics output.

thank you in advance for any tip! :)

Andreas

最佳回答

I don t think there are sand-box ready things you can use to draw customizable 3d objects in Java, if you can live without strange things you can you just a graph library able to draw 3d graphs like for example jMathTools (link).. otherwise you should go into J3D with opengl and similar things.

I don t think they exist just because doing simple things is trivial if you work with OpenGL or similar APIs..

Doing what you need with OpenGL is not complex at all, just a GL_LINE_STRIP to draw the trajectory and some primitives if you need earth, moon and so on.. rotating and scaling come implicitly moving the camera of your viewport..

Take a look at: Java3D or JOGL

问题回答

I can t believe nobody has mentioned this yet, but the NASA WorldWind project seems like exactly what you need: http://worldwind.arc.nasa.gov/java/ You can extend it with JOGL if needed, or you can use some of the vast modeling objects already available to mark trajectory and location in 3D coordinates, complete with zooming/rotating and the like. Having accurate Earth layers is nice as well =)

Use JOGL! It is easy to install, and if you know Java it should be easy. There are a few things in JOGL that require you to be decent in trigonometry. This tutorial might help you get started: http://www.youtube.com/watch?v=rT02jFYrXv0





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签