To get a smooth curve, it seems to be sufficient to have one on-curve point for every 90° with one off-curve point in between. What do the mathematics say is the otpimum? (in simple terms please)
This glyph from a Bitstream font has 68 points:
This glyph from my font has just 43 points:
If you wanted to make a perfect circle, how many points would you need? Would four on-curve points and four off-curve points be enough? Perhaps one could manage with only three of each. The bitstream font uses four on-curve points and eight off-curve points to make a full stop (period).
How Many Points do you Need?
-
- Top Typographer
- Posts: 9878
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
How Many Points do you Need?
Last edited by Bhikkhu Pesala on Mon Mar 15, 2004 3:22 pm, edited 1 time in total.
I don't exactly know the mathematics, so I could be wrong, but I think bezier curves require an infinte number of off curve points to create a perfect circle. I established an eight (off-curve) point, one thousand funit circle for my samples file with points at 293 and 707 by 0 and 1000. This seems to be very close to a perfect circle.
My 3 has 34 points, though it is not necessarily in its final form. The outside curves are formed by two off-curve points, while the insides are mostly singles.
My 3 has 34 points, though it is not necessarily in its final form. The outside curves are formed by two off-curve points, while the insides are mostly singles.
-
- Top Typographer
- Posts: 9878
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Have you read Christ Eilers' Thread on Quadratic and Cubic Bazier Curves
It is a bit beyond me, but might be helpful to know the best theoretical way to create smooth curves for Truetype fonts that are as easy as possible to edit, i.e. with the least numbr of points.
It is a bit beyond me, but might be helpful to know the best theoretical way to create smooth curves for Truetype fonts that are as easy as possible to edit, i.e. with the least numbr of points.
-
- Moderator
- Posts: 11160
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
-
- Top Typographer
- Posts: 9878
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
I checked this in Corel Draw. A "perfect" circle converted to a bezier curve with four symetrical nodes, which I guess equates to eight off-curve points and four on-curve extreme points.erwin denissen wrote:You can't make a perfect circle with the Bezier curves used in TrueType outlines. As it is recommended to always have on-curve extreme points, you need (at least) 12 points to approximate a circle.
The circle was 3.571" diameter with a hairline outline of 0.003" or 0.216 points. At 0° and 90° a line from the centre ended in the centre of the outline, but at 45° it ended at the outside of the outline - a difference of 0.0015" in 1.78" or about 0.08% deviation from a perfect circle.
That is good enough for me. I would suggest using one on-curve point and one off-curve point for each 60° of arc as it is easier to manipulate with alternate on-curve and off-curve points, unless you want an S curve that changes direction, then two off-curve points are needed.
-
- Top Typographer
- Posts: 9878
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
In Search of the Perfect Circle
Is a Perfect Circle Possible?
As Erwin points out, a perfect circle is not achievable with a bezier curve, but one can get fairly close without very many points. I have searched for some simple rule of thumb and curve editing methods to make it easier to achieve. I post my findings here, as well as in the Tutorials and Solutions forum, for others to make use of or comment upon.
I constructed a circle starting from the origin, 1200 f-units in diameter, and used trigonometry to pinpoint a few precise points that a perfect circle would pass through: There are two guides are at 30° and 60° and a 45° tangetnt to the quadrant at the mid-point, which is almost, but not exactly 600 f-units from the centre of the circle - 599.626550 f-units to be more precise.
After drawing one circle with four on-curve extreme points, and eight off-curve points, which is fairly close to a perfect circle, I copied it, pasted a copy in the same place, and reversed its direction, creating a white circle on a black circle. I then deleted one of the off-curve points in the top-right quadrant and moved the single remaining off-curve to get the best match to a perfect circle.
Both circles are imperfect, but the white one with two off-curve points is the best approximation.
The first illustration shows the quadrant with the guidelines. All the off-curve points are selected. The vertical and horizontal guides bisect the quadrant and intersect the diagonal guides on the circumference.
The second illustration shows the points with connecting lines, with the guidelines hidden. You can see that the white circle with two off-curve points has tangents at right-angles to the on-curve extreme points, whereas in the case of the black circle with only one off-curve point the tangents are not at 90° - the black circle will therefore be a bit pointed at the on-curve extremes, if I my understanding is correct.
A further point to notice, is that the on-curve mid-point on the quadrant of the white circle is redundant. One can delete it without changing the curve at all. I added it by selecting the adjacent off-curve point and selecting add. The 45° diagonal tangent to the white circle passes through this point. A perfect circle would pass somewhere between the black and white circles outside this tangent.
I hope this helps you understand how to get close to a perfect circle.
As Erwin points out, a perfect circle is not achievable with a bezier curve, but one can get fairly close without very many points. I have searched for some simple rule of thumb and curve editing methods to make it easier to achieve. I post my findings here, as well as in the Tutorials and Solutions forum, for others to make use of or comment upon.
I constructed a circle starting from the origin, 1200 f-units in diameter, and used trigonometry to pinpoint a few precise points that a perfect circle would pass through: There are two guides are at 30° and 60° and a 45° tangetnt to the quadrant at the mid-point, which is almost, but not exactly 600 f-units from the centre of the circle - 599.626550 f-units to be more precise.
After drawing one circle with four on-curve extreme points, and eight off-curve points, which is fairly close to a perfect circle, I copied it, pasted a copy in the same place, and reversed its direction, creating a white circle on a black circle. I then deleted one of the off-curve points in the top-right quadrant and moved the single remaining off-curve to get the best match to a perfect circle.
Both circles are imperfect, but the white one with two off-curve points is the best approximation.
The first illustration shows the quadrant with the guidelines. All the off-curve points are selected. The vertical and horizontal guides bisect the quadrant and intersect the diagonal guides on the circumference.
The second illustration shows the points with connecting lines, with the guidelines hidden. You can see that the white circle with two off-curve points has tangents at right-angles to the on-curve extreme points, whereas in the case of the black circle with only one off-curve point the tangents are not at 90° - the black circle will therefore be a bit pointed at the on-curve extremes, if I my understanding is correct.
A further point to notice, is that the on-curve mid-point on the quadrant of the white circle is redundant. One can delete it without changing the curve at all. I added it by selecting the adjacent off-curve point and selecting add. The 45° diagonal tangent to the white circle passes through this point. A perfect circle would pass somewhere between the black and white circles outside this tangent.
I hope this helps you understand how to get close to a perfect circle.