home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!decwrl!sdd.hp.com!hplabs!ucbvax!VNET.IBM.COM!capelli
- From: capelli@VNET.IBM.COM ("Ron Capelli")
- Newsgroups: comp.graphics
- Subject: Re: Representing conics as Bezier's
- Message-ID: <9208172201.AA19442@ucbvax.Berkeley.EDU>
- Date: 17 Aug 92 22:07:08 GMT
- References: <1992Aug14.160501.15095@smsc.sony.com>
- Sender: daemon@ucbvax.BERKELEY.EDU
- Lines: 55
-
- In <1992Aug14.160501.15095@smsc.sony.com> Mark L. Wood-Patrick writes:
- >I would like to get some pointers/references on representing conics
- >(In particular circular and elliptical arc's) as Bezier's. Does
- >anyone have any suggestions.
-
- This topic is discussed in the FAQ postings. A non-rational
- Bezier curve cannot generate an exact circular or elliptical arc.
- A non-rational quadratic Bezier curve is a parabola.
-
- To use rational parametric polynomial curves to generate exact circular
- and elliptical arcs, the FAQ lists the paper by L.Piegl and W.Tiller,
- "A Menagerie of Rational B-Spline Circles" in IEEE CG&A, v9n9, Sept 89.
- See also the text by G.Farin, "Curves and Surfaces for Computer Aided
- Geometric Design", Academic Press (1988 or subsequent edition).
-
- For an approximation to an ellipse using a non-rational cubic Bezier,
- consider this one...
-
- For an ellipse x**2/a**2 + y**2/b**2 = 1, the following points on the
- curve have the given tangent slopes:
-
- [+a/sqrt(2), +b/sqrt(2)] has slope -b/a
- [+a/sqrt(2), -b/sqrt(2)] has slope +b/a
- [-a/sqrt(2), -b/sqrt(2)] has slope -b/a
- [-a/sqrt(2), +b/sqrt(2)] has slope +b/a
-
- These four points subdivide the ellipse into four arc segments.
- Consider the rightmost segment, which should cross the x-axis at
- [+a, 0]. Working backwards through one De'Casteljau subdivision
- step for a cubic Bezier curve, Bezier control points to approximate
- the elliptical arc segment can be determined to be:
-
- [+a/sqrt(2), +b/sqrt(2)]
- [+a*(8-sqrt(2)/6, +b*(7*sqrt(2)-8)/6]
- [+a*(8-sqrt(2)/6, -b*(7*sqrt(2)-8)/6]
- [+a/sqrt(2), -b/sqrt(2)]
-
- The other three segment control points can be determined in a
- similar manner, or by symmetry. For a circle, let radius = a = b.
-
- The FAQ lists a couple of references for non-rational approximations.
- I haven't been able to get a copy of the Faux and Pratt book. Does
- it have this approximation?
- ______________________________________________________________________
-
- "It is impossible to make anything foolproof,
- because fools are so ingenious."
-
- "If you do something which you are sure will meet with
- everyone's approval, someone won't like it."
- ______________________________________________________________________
-
- ...Ron Capelli capelli@vnet.ibm.com (914) 435-1673
-
- IBM Corp., PO Box 950, Poughkeepsie, NY 12602
-