如何用贝塞尔曲线创建圆? [英] How to create circle with Bézier curves?

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

问题描述

我们有一个起点(x,y)和一个圆半径.还有一个引擎可以根据贝塞尔曲线点创建路径.

We have a start point (x, y) and a circle radius. There also exists an engine that can create a path from Bézier curve points.

如何使用贝塞尔曲线创建圆?

How can I create a circle using Bézier curves?

推荐答案

如前所述:没有使用贝塞尔曲线的圆的精确表示.

As already said: there is no exact representation of the circle using Bezier curves.

要完成其他答案,对于具有n段的Bezier曲线,到控制点的最优距离(在曲线的中间位于圆自身上的意义上)为.

To complete the other answers : for Bezier curve with n segments the optimal distance to the control points, in the sense that the middle of the curve lies on the circle itself, is (4/3)*tan(pi/(2n)).

所以4分是(4/3)*tan(pi/8) = 4*(sqrt(2)-1)/3 = 0.552284749831.

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

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