开发者

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 adv开发者_运维百科ance 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜