当前位置:网站首页>Bessel curve with n control points
Bessel curve with n control points
2022-06-30 05:10:00 【Shannan HSY】
// Input n Landmarks , According to time t(0 <= t <=1) Get the coordinate points on the curve
Vector3 CalculatePath(List<Vector3> points, float t) {
Vector3 tempPos = Vector3.zero;
for (int i = 0; i < points.Count; i++) {
tempPos += GetYangNum(points.Count, i + 1) * points[i] * Mathf.Pow((1 - t), points.Count - (i + 1)) * Mathf.Pow(t, i);
}
return tempPos;
}
// Get the specified value of Yang Hui triangle
int GetYangNum(int m, int n) {
if (m == n || n == 1) {
return 1;
} else {
return GetYangNum(m - 1, n - 1) + GetYangNum(m - 1, n);
}
}
边栏推荐
- C # equipment synthesis
- [note] usage model tree of the unity resource tree structure virtualizingtreeview
- Unity multiple UI page turning left and right
- Unity is associated with vs. there is a compiler problem when opening
- Generate a slice of mesh Foundation
- 产生 BUG 测试人员需要自己去分析原因吗?
- Unity Logitech steering wheel access
- 力扣977. 有序数组的平方
- Records of problems encountered in unity + hololens development
- Exploration of unity webgl
猜你喜欢

Pycharm database tool

Unity lens making

Force buckle 349 Intersection of two arrays

Unreal 4 unavigationsystemv1 compilation error

Unity scroll view element drag and drop to automatically adsorb centering and card effect

Ripple effect of mouse click (unity & shader)

Unity3d Google Earth

On mask culling of unity

The file has been downloaded incorrectly!

LxC and LXD container summary
随机推荐
Sourcetree usage
One command to run rancher
2021-06-17 solve the problem of QML borderless window stretching, window jitter and flicker when stretching and shrinking
JPA composite primary key usage
003-JS-DOM-Attr-innerText
炒美原油的国际交易平台如何能保障资金安全呢?
Unity packaging failure solution
Unrealeengine4 - about uobject's giant pit that is automatically GC garbage collected
Preorder traversal of Li Kou 589:n fork tree
Solution to 293 problems in the week of Li Kou
Pytorch的安装以及入门使用
Intellj idea generates jar packages for projects containing external lib to other projects. The method refers to the jar package written by itself
Procedural animation -- inverse kinematics of tentacles
MinGW-w64下载文件失败the file has been downloaded incorrectly!
Force buckle 704 Binary search
Does the tester need to analyze the cause of the bug?
Unity dotween plug-in description
东塔攻防世界—xss绕过安全狗
Unity + hololens2 performance test
C # equipment synthesis