mpg
mpg

Reputation: 192

How can I draw points in WPF 3D?

WPF's basic unit of representation for 3D is a mesh of triangles. However, I want to be able to represent points, e.g. 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.

[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

Upvotes: 2

Views: 1377

Answers (1)

Reed Copsey
Reed Copsey

Reputation: 564413

Billboarding (which is what ScreenSpaceLines3D does) is one approach. 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.

Upvotes: 1

Related Questions