简体   繁体   English

如何在WPF 3D中绘制点?

[英]How can I draw points in WPF 3D?

WPF's basic unit of representation for 3D is a mesh of triangles. WPF用于3D表示的基本单位是三角形的网格。 However, I want to be able to represent points, eg for a scatterplot. 但是,我希望能够表示点,例如散点图。 What's the best way to do this? 最好的方法是什么?

I've been experimenting with the ScreenSpaceLines3D class from the 3DTools package on CodePlex, trying different ways to get it to draw just a single square instead of a full line, but the visual appearance is pretty poor. 我一直在尝试使用CodePlex上3DTools包中的ScreenSpaceLines3D类,尝试使用不同的方法使它仅绘制单个正方形而不是整个线条,但是视觉外观非常差。

[Clarification: I could draw glyphs, as Reed suggests below, but in order to conserve my triangle budget I'd prefer nothing fancy. [澄清:我可以绘制字形,正如里德在下面建议的那样,但是为了节省我的三角形预算,我不希望有任何花哨的东西。 I've been trying squares, but I'd prefer something more point-like in appearance. 我一直在尝试正方形,但是我更喜欢外观更像点的东西。 I wonder if I could determine what the "minimum" possible sized square would be?] 我想知道是否可以确定“最小”可能的正方形是多少?]

Any suggestions? 有什么建议么?

-mpg -mpg

Billboarding (which is what ScreenSpaceLines3D does) is one approach. 广告牌(ScreenSpaceLines3D就是这样做的)是一种方法。 Instead of a square, you can make a circle (or hex, etc), which will improve the appearance quite a bit. 您可以制作一个圆形(或六角形等),而不是正方形,这样可以大大改善外观。

Another option is to use a glyph of some form at each point - for example, place a small (coarse) sphere at each point location. 另一种选择是在每个点使用某种形式的字形-例如,在每个点位置放置一个小(粗)球体。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM