C# 与 Python - 2D/3D 图形模拟器的最佳选择

发布于 2024-12-26 21:54:57 字数 272 浏览 1 评论 0原文

正如标题所示,我正在寻找创建 2D 或 3D 图形模拟器的最佳解决方案。我需要构建一个程序来模拟一些自定义太阳能电池板的行为(光线如何落在电池板的表面上,如果电池板旋转会发生什么等)。主要问题是它必须在很短的时间内完成,并且根据 2D 和 3D 之间的差异有多大(就完成所需的时间而言),我会选择最合适的解决方案。该程序还必须根据输入数据创建一些图表。

因此,我有兴趣寻找您关于上述哪一种语言将提供最好和最容易使用的工具(对于 2D 和 3D 工具)的建议,以及最终代码复杂性、易用性的良好组合图形设计和最终外观。

As the title suggests it, I`m looking for the best solution for creating a 2D or a 3D graphic simulator. I need to build a program that simulates the behavior of some custom solar panels (how the rays fall on the surface of the panels, what happens if the panels are rotated etc). The main problem is that it has to be done in a very short amount of time and depending on how big the difference between the 2D and the 3D one will be (in terms of needed time for completion), I will choose the most appropriate solution. The program has to create also some charts based on the input data.

Thus, I`m interested looking for you suggestions in regard to which one of the aforementioned languages would provide the best and easiest to use tools (for both the 2D and the 3D one), and a good combination of the final code complexity, ease of the graphic design and final appearance.

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

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

发布评论

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

评论(3

稍尽春風 2025-01-02 21:54:57

如果你没有太多时间,你应该选择你更了解的语言。

就我个人而言,我会选择Python,因为我认为它是一种非常高效的语言。为了进行渲染,我将依赖模块 pygame.尽管如此,还是有许多可能的库可以满足您的需求。我不久前使用过 XNA,真的很高兴。尤其是它对 2d 图形的支持非常出色。归根结底,我想它可以归结为:

Python 是“工作伪代码”。它将允许您非常有效地编写逻辑代码。然而 Pygame 是一个 3d 游戏库。它非常适合创建游戏和可视化,但你很难制作一个漂亮的 GUI。

C# 比 python 更“重”一点。就行数而言,您肯定最终会编写更多代码。 XNA + WPF 是一个强大的组合,并且有非常好的工具 - VisualStudio 有一个很棒的 GUI 设计器

If you don't have much time you should choose the language you know better.

Personally I'd go for python because I think it's a very productive language. To do the rendering I'd rely on the module pygame. Nevertheless there are numerous possible libraries that can do what you need. I've used XNA a while ago and it was a real pleasure. Especially its support for 2d graphics is excellent. On the bottom-line I guess it boils down to this:

Python is "working pseudo code". It will allow you to code the logic very efficiently. Pygame however is a 3d game library. It's great for creating games and visualizations but you'll have trouble to make a nice gui.

C# is a little more "heavy" than python. You'll definitely end up writing more code, just in terms of the number of lines. XNA + WPF is a powerful combo though and has very good tools - VisualStudio has a great gui designer

狂之美人 2025-01-02 21:54:57

我还没有尝试过 python 中的图形,但使用 XNA Game Studio(针对.Net框架)使用了一段时间,认为它非常易于使用且功能强大。所以值得一看。别管它的名字,它不仅仅适用于游戏。

I haven't tried graphics in python yet, but worked with XNA Game Studio (for .Net framework) for a while and think that it's quite easy to use and powerful. So it's worth to have a look. Never mind its name, it's not only for games.

输什么也不输骨气 2025-01-02 21:54:57

我对 C# 不太了解,但 Python 有相当多的模块您可能会使用。有人已经提到了 Pygame,对于 3D 可视化,您可以使用 VpythonPanda3D此网站上有一个适用于 Python 或用 Python 编写的 3D 软件的不错列表。

I don't know much about C#, but Python has quite a number of modules that you probably could use. Someone already mentioned Pygame, for 3D visualization you can use for example Vpython or Panda3D. There is a nice lists of 3D software for Python or written in Python at this website.

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