如何抵消三次贝塞尔曲线? [英] How to offset a cubic bezier curve?

查看:167
本文介绍了如何抵消三次贝塞尔曲线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图创建一个平行的贝塞尔曲线。在我的尝试中,我已经接近但没有雪茄。我试图在两条曲线(红色,蓝色)之间保持一个稳定的1px的偏移量。 b
$ b



我的主要目标是使用边界偏离的algorythm来展开/缩小svg路径。




解决方案



对于正在寻找解决方案的其他人,我已经创建了一个AS3版本。



< a href =http://seant23.wordpress.com/2010/11/12/offset-bezier-curves/ =nofollow noreferrer> http://seant23.wordpress.com/2010/11/12/ offset-bezier-curves /

解决方案

来自wikipedia:( http://en.wikipedia.org/wiki/B%C3%A9zier_curve

与给定Bézier曲线固定偏移的曲线,通常称为偏移曲线(位于平行l到原始曲线,就像铁轨中轨道之间的偏移),不能用Bézier曲线完全形成(除了一些微不足道的情况)。但是,有些启发式方法通常可以为实际目的提供足够的近似值。

您可能还会看到这里指出的文章:


I'm trying to create a "parrallel" bezier curve. In my attempts I've gotten close but no cigar. I'm trying to keep a solid 1px offset between the 2 curves (red,blue).

My main goal is use a edge offseting algorythm to expand/shrink a svg path.


Solution

For anyone else who is looking for a solution, I've create a AS3 version.

http://seant23.wordpress.com/2010/11/12/offset-bezier-curves/

解决方案

From wikipedia: ( http://en.wikipedia.org/wiki/B%C3%A9zier_curve )

The curve at a fixed offset from a given Bézier curve, often called an offset curve (lying "parallel" to the original curve, like the offset between rails in a railroad track), cannot be exactly formed by a Bézier curve (except in some trivial cases). However, there are heuristic methods that usually give an adequate approximation for practical purposes.

You might also see the paper indicated here: Outline of cubic bezier curve stroke

这篇关于如何抵消三次贝塞尔曲线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆