# Smooth out an edge of a line

This topic is 4625 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Guys: I'm trying to make a line out of points. Example: Given the points (x,y) = (0,0), (10,0), (20,10) I can construct a line with a specified width (by generating the quads) through those points. However, I want to create a rounded edge going from point (10,0) to (20,0)... my hard quad is (10,5) & (10,-5) to (20,15) & (20,5) [I'm going +5,-5 on the Y to give me a quad] But thats a hard edge at from 0,0 to 20,10 going through the point 10,0, I want to somehow generate the points in a curve from that edge. Does anyone know how this can be done? Let me know if you need a better explanation. Jeff.

##### Share on other sites
Using the four vertices of your quad, you could determine the equation of a circle that contains those four points, and just use the equation to generate pixel positions between two of those vertices.

##### Share on other sites
Overlay the quads with circles (whose diameter is the width of the quads) at each point.

##### Share on other sites
Do you want to make a smooth curve which passes through N points? In which case a cubic Bézier spline is probably what you're after. If you're just trying to draw a polygon with nice-looking joins at the corners, use PostScript and setlinejoin :P ... or in fact GDI+, which has a Pen.LineJoin property.

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633735
• Total Posts
3013593
×