Forgot password?
 Register account
View 154|Reply 1

[几何] 圆的Bezier逼近

[Copy link]

3159

Threads

7941

Posts

610K

Credits

Credits
63770
QQ

Show all posts

hbghlyj Posted 2023-3-10 01:25 |Read mode
相关:圆的最佳Bezier逼近
$n+1$个基点$z_0,\dots,z_n$的Bezier曲线为$n$次Bernstein多项式
$$\mathcal{B}_n[t]=\sum_{i=0}^n\left(\begin{array}{c}n \\ i\end{array}\right)(1-t)^{n-i} t^{i} z_{i} \quad t \in[0,1]$$
$z_i, i ∈ \{0,\dots , n\}$,可以认为是实数,那么$\cal B$实际上是$t$的一个多项式。或者它们表示平面中的点,我们将进一步使用这种表示法。在这种情况下,两个分量都是多项式,$\cal B$ 的图形是代数曲线的一段弧。
这些曲线有下列共同点:
• 曲线包含在基点的凸包中。
• 曲线从 $z_0$ 开始,到 $z_n$ 结束。
• 在端点,切线与方向$z_0 - z_1$ 和$z_{n-1} − z_n$ 重合。
对于 $n = 2$,Bernstein 多项式 $\mathcal B_1$ 是连接 $z_0$ 和 $z_1$ 的线段。

3159

Threads

7941

Posts

610K

Credits

Credits
63770
QQ

Show all posts

 Author| hbghlyj Posted 2023-3-10 01:32
ebezier 2.2 Circles and Arcs 为了说明绘制圆弧的过程,我们明确地进行计算
我们想绘制圆的右上四分之一,端点为 $z_0 = (0, r)$ 和 $z_3 = (r, 0)$。
点 $z_1$ 和 $z_2$ 确定切线。所以我们可以将它们设为 $z_1 = (h, r)$ 和 $z_2 = (r, h)$ 其中 $h$ 为待定参数。
如果我们将这些基点代入Bernstein多项式的两个分量$$\mathcal{B}_2[t]=(1-t)^2z_0+2(1-t)tz_1+t^2z_2$$令$t=\frac12$,我们得到这个Bezier曲线的中点坐标为 \[ x\left[\frac{1}{2}\right]=y\left[\frac{1}{2}\right]=\frac{r}{2}+\frac{3h}{8}\] 令它们等于圆弧的中点的横纵坐标 $r/\sqrt{2}$,我们得到 \[ h=\frac{4}{3}\left(\sqrt{2}-1\right).\]

Fitting Arcs

The quality of representating arcs by cubic bezier curves is quite satisfactory. The differences between circles and beziers may be estimated in two ways.
  • If we test the overall fit the area enclosed by the curves is a good metric: The area of $\texttt{Carc}$ for the quarter circle is $1/30 (-33+40\sqrt{2})r^2$ to be conferred with $\pi/4\:r^2$. This is an overshot by just $0.028\%$!
  • The pointwise fit is measured by the radial difference. The maximum is $\cong 0.00025\,r$ (at odd multiples of $\pi/8$), it is zero for all multiples of $\pi/4$.

Mobile version|Discuz Math Forum

2025-5-31 10:39 GMT+8

Powered by Discuz!

× Quick Reply To Top Edit