amun@quads.uchicago.edu (james frederick amundson) (09/28/90)
Since this is something I'm sure many of you out there have done, I hope someone can help me... I need to make a screen representation of the bezier curves I am sending to the LaserWriter. Although I am familiar with the basic ideas of splines, I do not know exactly how the bezier curves in postscript are defined. Can someone out there either a) show me the mathematical description of a bezier curve or b) show me some code that does this? I'm not terribly picky about the language for (b), although I do most of my programming in good ol' Think C. My deepest gratitude is extended to any who can help. --Jim Amundson amun@midway.uchicago.edu
deadman@garnet.berkeley.edu (Ben Haller) (09/29/90)
In <1990Sep28.162954.28535@midway.uchicago.edu>, amun@quads.uchicago.edu (james frederick amundson) writes: > I need to make a screen representation of the bezier curves > Can someone out there either: > a) show me the mathematical description of a bezier curve > or > b) show me some code that does this? > I'm not terribly picky about the language... Well, as to point a), the PostScript Language Reference has the formulas on page 150, the curveto operator (this is in the Red Book). It refers to Foley & Van Dam at the bottom of the page for more material, and indeed this is the place to go for more detail. J.D.Foley and A.Van Dam, "Fundamentals of Interactive Computer Graphics", Chapter 13.5 : Parametric Cubic Curves, pp. 514-523. As to point b), I refer you to MacTutor, Vol. 5 No. 1, January 1989, in the C Workshop : "Bezier Curve Ahead!". This is C code using Fixed point math to find points. It is well written, clear and concise. There is no substitute for a good reference library... -Ben Haller (deadman@garnet.berkeley.edu) "Gadji beri bimba clandridi lauli lonni cadori gadjam..." - I Zimbra