-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
29 additions
and
11 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: 样条 | ||
date: | ||
created: 2024-12-21 | ||
updated: 2024-12-21 | ||
categories: | ||
- 数学 | ||
--- | ||
|
||
!!! quote | ||
本文主要内容参考自 [The Continuity of Splines](https://www.youtube.com/watch?v=jvPPXbo87ds&t=2037s) | ||
|
||
## 0. 线性插值(Lerp / Linear Interpolation) | ||
|
||
![](https://picgo-1257309505.cos.ap-guangzhou.myqcloud.com/20241221180341882.png?imageSlim) | ||
|
||
<!-- more --> | ||
|
||
Lerp: $Lerp(a, b, t) = (1-t)a + tb$ | ||
|
||
|
||
## 1. 贝塞尔曲线(Bézier Curve) | ||
|
||
假设有三个点 $P_0, P_1, P_2$,我们分别对$P_0$和$P_1$进行线性插值,对$P_1$和$P_2$进行线性插值,然后再对这两个结果进行线性插值,得到的结果就是二阶贝塞尔曲线上的点。 | ||
|
||
即 $B(t) = Lerp(Lerp(P_0, P_1, t), Lerp(P_1, P_2, t), t)$ | ||
|
||
### 1.1 贝塞尔曲线的表示方式 | ||
![](https://picgo-1257309505.cos.ap-guangzhou.myqcloud.com/20241221181820825.png?imageSlim) |