F# WPF - 在 Viewport3D 中显示简单对象
我试图用很少的时间和很少的 F# 初步知识来在 F# 中生成 3D 图形(从我之前的问题可以明显看出)。我正在研究托马斯·佩特里克(Tomas Petricek)的分形示例,但我无法真正理解它。我成功地在 XAML 中定义了一个带有 Viewport3D 对象的窗口,从 F# 初始化并显示它。但就在 F# 中创建 3D 对象并显示它们而言,我迷失在分形生成、坐标转换和其他计算的海洋中。 有人可以提供一个简单的示例,在 F# 中创建一个非常简单的对象(单个立方体,或只是一个三角形)并将其显示在 WPF 窗口中吗?这将是巨大的帮助。 谢谢。
I'm trying to get into generating 3D graphics in F# (as was apparent from my previous question) with very little time and very little initial knowledge of F#. I'm studying Tomas Petricek's fractal example, but I can't really make heads or tails of it. I've managed to define a window with a Viewport3D object in XAML, initialize and display it from F#. But as far as creating 3d objects in F# and displaying them goes, I'm lost in a sea of fractal generation, coordinate translation, and other calculations.
Could somebody provide a simple example, of creating one really simple object in F# (a single cube, or just a triangle) and display it in the WPF window? That would be huge help.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个简单的例子,用两个三角形组成一个正方形:
Here's a simple example with two triangles making a single square: