Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

math - Outline of cubic bezier curve stroke

By stroke of the cubic bezier curve I mean rendering a curve 'A' with a specific line width 'w'.

How can I derive other cubic bezier curves that describe the outline of the stroke of bezier 'A' ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Ohhh. You want to get the offset-curves of an bezier curve.

Bad news. this is hard because these curves can't be simply derived numerical. They contain all kinds of intersections, loops and other nasty stuff.

There are some approximations though. The best approach I've read so far is from a paper by Thomas F. Hain (Fast, Precise Flattening of Cubic Bézier Path and Offset Curves).

He does flattening, so his paper is mostly about decomposes the offset curves into line-segments and circular arc-segments, but you can merge them back to beziers later.

For better understanding you may want to read his other bezier related papers as well.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...