Java/图形:绘制 3d 坐标?

发布于 2024-08-20 15:30:37 字数 280 浏览 4 评论 0原文

我正在编写一个程序,它将生成火箭的 3d 坐标,我想为此做一个基本的图形输出。

它只需要可缩放和可旋转,以便您可以手动更改视图。 这些位置应该用线连接并且 如果有地球和月球的球体(也许还有其他天体),那就太好了。

我想,应该已经有一些适合这种情节的现成材料,但我找不到。

所以我才来这里问你是否知道这样的事情。 如果没有的话我想问你像我这样的大佬应该如何开始这个? 我通常为控制台应用程序编写代码,因为不需要真正的图形输出。

预先感谢您的任何提示! :)

安德烈亚斯

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

不即不离 2024-08-27 15:30:37

我不认为有沙箱准备好的东西可以用来在Java中绘制可定制的3D对象,如果你可以生活在没有奇怪的东西的情况下,你可以只是一个能够绘制3D图形的图形库,例如jMathTools< /strong> (链接)..否则你应该进入 J3D使用 opengl 和类似的东西。

我不认为它们的存在只是因为如果您使用OpenGL或类似的API,做简单的事情是微不足道的。

使用OpenGL做您需要的事情一点也不复杂,只是一个GL_LINE_STRIP< /code> 绘制轨迹和一些图元(如果您需要地球、月球等)。旋转和缩放会隐式移动视口的相机。

看看: Java3DJOGL

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

染墨丶若流云 2024-08-27 15:30:37

我不敢相信还没有人提到这一点,但 NASA WorldWind 项目似乎正是您所需要的: http://worldwind.arc.nasa.gov/java/ 如果需要,您可以使用 JOGL 扩展它,或者您可以使用一些现有的大量建模对象来标记 3D 坐标中的轨迹和位置,完成缩放/旋转等。拥有准确的地球层也很好 =)

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 =)

苦行僧 2024-08-27 15:30:37

使用JOGL!它很容易安装,如果您了解 Java,安装起来应该很容易。 JOGL 中有一些东西要求您精通三角学。本教程可能会帮助您入门:http://www.youtube.com/watch?v=rT02jFYrXv0

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文