Curved Line

Jun 8, 2012 at 7:55 PM

Hello. I am wondering if there is anything in the toolkit that gives a curved line. Something kind of like a mix between the PieSliceVisual and the LineVisual? Just wondering if it's out there before I start writing code to make one. Thanks!

Jun 9, 2012 at 9:18 PM

there is a CanonicalSplineHelper class that will interpolate a list of points. You can use this with the LinesVisual3D or TubeVisual3D. (note that the Points collection in LinesVisual3D defines line segments, so you need to modify the result from the CanonicalSplineHelper...)

Jun 11, 2012 at 4:53 PM
Edited Jun 12, 2012 at 9:36 PM

Thanks so much! That's exactly what I was looking for. I have one last (stupid) question. The result from CanonicalSplineHelper creates dashed lines. Is there any way I can make it a solid line?


Nevermind, I figured it out. In the Segment function in CanonicalSplineHelper where the points are added, I changed the way it adds the points to:

if (points.Count == 0)
    points.Add(points.ElementAt(points.Count - 1));

This way, a line is made from each point to its preceding point.