Files
freeCodeCamp/curriculum/challenges/chinese/10-coding-interview-prep/project-euler/problem-363-bzier-curves.md
Oliver Eyton-Williams ee1e8abd87 feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

49 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
id: 5900f4d91000cf542c50ffeb
title: 问题363Bézier曲线
challengeType: 5
videoUrl: ''
dashedName: problem-363-bzier-curves
---
# --description--
立方贝塞尔曲线由四个点定义P0P1P2和P3。
曲线构造如下在段P0P1P1P2和P2P3上绘制点Q0Q1和Q2使得P0Q0 / P0P1 = P1Q1 / P1P2 = P2Q2 / P2P3 = t\[0,1]中的t。在段Q0Q1和Q1Q2上绘制点R0和R1使得对于相同的t值Q0R0 / Q0Q1 = Q1R1 / Q1Q2 = t。在段R0R1上绘制点B使得对于相同的t值R0B / R0R1 = t。由点P0P1P2P3定义的贝塞尔曲线是B的轨迹因为Q0占据了段P0P1上的所有可能位置。 请注意对于所有点t的值都相同。
在此外部Web地址您将找到一个小程序它允许您拖动点P0P1P2和P3以查看这些点定义的Bézier曲线绿色曲线是什么样的。您也可以沿着段P0P1拖动点Q0。
从构造中可以清楚地看出Bézier曲线将与P0中的P0P1和P3中的P2P3相切。
使用P0 =1,0P1 =1vP2 =v1和P3 =0,1的三次Bézier曲线来近似四分之一圆。选择值v> 0使得由线OP0OP3和曲线包围的区域等于π/ 4四分之一圆的面积
曲线长度与四分之一圆的长度有多少百分比也就是说如果L是曲线的长度则计算100×L - π/2π/ 2给你的答案四舍五入到小数点后面的10位数。
# --hints--
`euler363()`应返回0.0000372091。
```js
assert.strictEqual(euler363(), 0.0000372091);
```
# --seed--
## --seed-contents--
```js
function euler363() {
return true;
}
euler363();
```
# --solutions--
```js
// solution required
```