绘制 XYZ 坐标图的代码
我需要在可以旋转的 3D 立方体中绘制 XYZ 坐标图。我正在寻找基本上采用 1 和 0 的 3d 数组并构建一个立方体的代码。点的颜色也很好。创建点的程序是用 C/C++ 编写的,所以我更喜欢一些能很好地发挥作用的程序,但我不挑剔。我知道 Mathematica 可以做到这一点,但我正在寻找可以“实时”更新的东西,以便我可以观看进度 提前致谢
I need to graph XYZ coordinates in a 3D cube that I can rotate. Im look for code that will basically take a 3d array of 1s and 0s and build a cube. Coloring of the points would also be nice. The program that creates the point is in C/C++ so I would prefer something that would play nicely will that but Im not picky. Im alright aware that Mathematica can do this , but Im looking for something that can be "live" updated so I can watch the progress
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
一种明显的可能性是 Direct3D(适用于 Windows、X-box 和 Windows Phone 7)或 OpenGL(适用于除 X-box 或 Windows Phone 7 之外的几乎任何可以执行 3D 功能的东西)。
有相当多的库和 示例代码用于类似的事情。
如果您在 Unix/Linux 上工作,您可能安装也可能没有安装 OpenGL。如果不这样做,您可能需要查看 Mesa3D。
One obvious possibility would be something like Direct3D (for Windows, X-box and Windows Phone 7) or OpenGL (for pretty much anything that can do 3D except X-box or Windows Phone 7).
There are quite a few libraries and sample code for things like this.
If you're working on Unix/Linux, you may or may not have OpenGL installed. If you don't, you might want to check into Mesa3D.
我会接受 Jerry 的使用 OpenGL 的建议。还有一些很好的教程 - 看看 nehe 系列有一些例子可以帮助您准确地完成您想要做的事情。
I would go with Jerry's suggestion of using OpenGL. There are some good tutorials out there too - have a look at the nehe series which have examples for doing precisely what you're after.
请参考本教程链接:http://www.directxtutorial.com/
这将帮助您实现三维立方体。
Refer this tutorial link : http://www.directxtutorial.com/
This will help you to implement three dimensional cube.