Hello, What I wanted was this. Take a donut, cut a slice from it, you get in fact some kind of trapezoidal shape with two rounded egdes and two sides that are at a given angle from each other.
So given that an opening angle (that can range from 0 to 360 degrees), the radius of the hole and the external radius, I wanted to compute a formshape for this. It wasn't easy (mostly when my slice opening is wider that 90 degrees I have to use more than one curve to fit it to perfect roundess), but it now works great. For those interested. I found out that it is impossible to make a perfect round shape using Bezrier curves. However one can approximate one using cubic shapes. For a 90 degree angle, the best lenght for the control arms is 0.5522847498 times the radius. Of course the control arm angles must be perpendicular to the sides of the triangle (and tangent to the the circle exterior where the side angles intersect with the outside of the circle). For a complete circle, one must add four such shapes one by one and you get an almost perfect circle. It gets trickier when the angles are not 90 degrees, but I can post an example for those interested. What I do not undrestand though is that when printed, those shapes end up with a multitude of control points when in fact there's only eight of them. I can't believe that I gave myself this much trouble to compute vectors, only to end up with a bitmap image that's very pooly converted in postscript... Does someone have a clue about printing vector graphics as they should be? Thanx Louis Veillette on 24/09/06 06:53 pm, [NAME] at [ADDRESS] wrote: > what does "eyeball this" mean? In this case the control y value is 2x > the y value of the ovalshape. Is there a rule here? doesn't seem like > a general-purpose solution. > > According to the language reference, an order-1 curveshape has one > control point: > > 1--A quadratic Bezier curve is drawn using one control point. > > So, you do get a nice curve. The issue is to find the relationship > between control points and the quadratic Bezier. I believe 1-order > and 2-order curveshapes that use one and two control point are fairly > standard. Although REALbasic doesn't say what the relationships are, > they are likely the same as the relationships found elsewhere. > > But I do wish that REALbasic told us precisely what the control > points do. Seems like it's their job. > > John Kubie _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
