Reputation: 342
I'm curently implementing a circle visualization using X points in Input.
I don't know if it's the best way (do not hesitate to tell me about any other possibility) but to realize that, i'm creating a Path with these differents points and then i use the "Flatten" function to smooth the curve :
For Each Point As Point3D In ptsLocal
graphic_points(index).X = (panel.Width / 2) + (Point.z * facteur)
graphic_points(index).Y = (panel.Width / 2) - (Point.y * facteur)
Draw_ringPoint(graphic, Brushes.Gray, graphic_points(index).X, graphic_points(index).Y, 4, IdsPts(index))
index += 1
Next
graphic_points(index).X = graphic_points(0).X
graphic_points(index).Y = graphic_points(0).Y
Dim myPath As New GraphicsPath
'Dim translateMatrix As New Matrix
'translateMatrix.Translate(0, 10)
myPath.AddCurve(graphic_points)
'graphic.DrawPath(New Pen(Color.Cyan, 2), myPath)
myPath.Flatten()
graphic.DrawPath(New Pen(Color.BlueViolet, 2), myPath)
As you can see, I add the point "0" at the end to close the curve, here is my result :
as you can see, the result is good, except the connection between the last point and the first point.
How can i smooth this connection ? Or there is any other solution to realize this visualization ?
EDIT :
After using the DrawClosedCurve method, the result look better, but still have a problem on the last connection as you can see (With the last connection point):
And without the last connection point :
Upvotes: 0
Views: 158