Tag Archives: line segment

Draw surface normals on a 3D model using WPF and XAML

This example shows how to draw surface normals. It uses the following code to create a MeshGeometry3D object holding segments showing surface normals for an existing MeshGeometry3D object. // Return a MeshGeometry3D for this mesh’s triangle normals. public static MeshGeometry3D … Continue reading

Posted in algorithms, drawing, geometry, graphics, mathematics, wpf, XAML | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , | 4 Comments

Draw a 3D wireframe using WPF and C#

This example makes it relatively easy to display a 3D wireframe model. It adds three features to previous examples. First, it creates a wireframe representing the triangles defined in a MeshGeometry3D. Second, it modifies earlier segment drawing methods so it … Continue reading

Posted in algorithms, drawing, geometry, graphics, mathematics, wpf, XAML | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , | 16 Comments

Draw improved 3D line segments using WPF and C#

This example extends the example Draw interlocked tetrahedrons in a cage of “line segments” using WPF and C# by using improved 3D line segments. The previous example draws skinny rectangular prisms to represent line segments. If you make the prisms … Continue reading

Posted in algorithms, drawing, geometry, graphics, mathematics, wpf, XAML | Tagged , , , , , , , , , , , , , , , , , , , , , , , | 5 Comments

Draw interlocked tetrahedrons in a cage of “line segments” using WPF and C#

This example draws two interlocked tetrahedrons surrounded by a cubic cage of line segments. Unfortunately a noticeable omission from WPF’s 3D tools is any way to draw line segments. That means you can’t draw wireframe models, show surface normals, or … Continue reading

Posted in algorithms, geometry, graphics, mathematics, wpf, XAML | Tagged , , , , , , , , , , , , , , , , , , , , , , , | 4 Comments

Determine where a line intersects a circle in C#

The FindLineCircleIntersections method shown shortly finds the points where line intersects a circle. It takes as parameters a circle’s center point and radius, and two points on the line. It uses out parameters to return the coordinates of the points … Continue reading

Posted in algorithms, geometry, graphics, mathematics | Tagged , , , , , , , , , , , , , , , , , | 3 Comments