mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-09-01 04:22:28 +02:00
Automated build
This commit is contained in:
4
docs/index.html
generated
4
docs/index.html
generated
@@ -38,7 +38,7 @@
|
|||||||
<meta property="og:locale" content="en-GB" />
|
<meta property="og:locale" content="en-GB" />
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:published_time" content="2013-06-13T12:00:00+00:00" />
|
<meta property="og:published_time" content="2013-06-13T12:00:00+00:00" />
|
||||||
<meta property="og:updated_time" content="2023-08-15T15:28:19+00:00" />
|
<meta property="og:updated_time" content="2024-02-28T17:22:37+00:00" />
|
||||||
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
||||||
<meta property="og:section" content="Bézier Curves" />
|
<meta property="og:section" content="Bézier Curves" />
|
||||||
<meta property="og:tag" content="Bézier Curves" />
|
<meta property="og:tag" content="Bézier Curves" />
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
<ul class="lang-switcher">
|
<ul class="lang-switcher">
|
||||||
<li><a href="./index.html">English</a> </li>
|
<li><a href="./index.html">English</a> </li>
|
||||||
<li><a href="./ja-JP/index.html">日本語</a> <span class="localisation-progress">(24%)</span></li>
|
<li><a href="./ja-JP/index.html">日本語</a> <span class="localisation-progress">(24%)</span></li>
|
||||||
<li><a href="./zh-CN/index.html">中文</a> <span class="localisation-progress">(35%)</span></li>
|
<li><a href="./zh-CN/index.html">中文</a> <span class="localisation-progress">(37%)</span></li>
|
||||||
<li><a href="./ru-RU/index.html">Русский</a> <span class="localisation-progress">(24%)</span></li>
|
<li><a href="./ru-RU/index.html">Русский</a> <span class="localisation-progress">(24%)</span></li>
|
||||||
<li><a href="./uk-UA/index.html">Українська</a> <span class="localisation-progress">(2%)</span></li>
|
<li><a href="./uk-UA/index.html">Українська</a> <span class="localisation-progress">(2%)</span></li>
|
||||||
<li><a href="./ko-KR/index.html">한국어</a> <span class="localisation-progress">(9%)</span></li>
|
<li><a href="./ko-KR/index.html">한국어</a> <span class="localisation-progress">(9%)</span></li>
|
||||||
|
4
docs/ja-JP/index.html
generated
4
docs/ja-JP/index.html
generated
@@ -41,7 +41,7 @@
|
|||||||
<meta property="og:locale" content="ja-JP" />
|
<meta property="og:locale" content="ja-JP" />
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:published_time" content="2013-06-13T12:00:00+00:00" />
|
<meta property="og:published_time" content="2013-06-13T12:00:00+00:00" />
|
||||||
<meta property="og:updated_time" content="2023-08-15T15:28:19+00:00" />
|
<meta property="og:updated_time" content="2024-02-28T17:22:37+00:00" />
|
||||||
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
||||||
<meta property="og:section" content="Bézier Curves" />
|
<meta property="og:section" content="Bézier Curves" />
|
||||||
<meta property="og:tag" content="Bézier Curves" />
|
<meta property="og:tag" content="Bézier Curves" />
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
<ul class="lang-switcher">
|
<ul class="lang-switcher">
|
||||||
<li><a href="./index.html">English</a> </li>
|
<li><a href="./index.html">English</a> </li>
|
||||||
<li><a href="./ja-JP/index.html">日本語</a> <span class="localisation-progress">(24%)</span></li>
|
<li><a href="./ja-JP/index.html">日本語</a> <span class="localisation-progress">(24%)</span></li>
|
||||||
<li><a href="./zh-CN/index.html">中文</a> <span class="localisation-progress">(35%)</span></li>
|
<li><a href="./zh-CN/index.html">中文</a> <span class="localisation-progress">(37%)</span></li>
|
||||||
<li><a href="./ru-RU/index.html">Русский</a> <span class="localisation-progress">(24%)</span></li>
|
<li><a href="./ru-RU/index.html">Русский</a> <span class="localisation-progress">(24%)</span></li>
|
||||||
<li><a href="./uk-UA/index.html">Українська</a> <span class="localisation-progress">(2%)</span></li>
|
<li><a href="./uk-UA/index.html">Українська</a> <span class="localisation-progress">(2%)</span></li>
|
||||||
<li><a href="./ko-KR/index.html">한국어</a> <span class="localisation-progress">(9%)</span></li>
|
<li><a href="./ko-KR/index.html">한국어</a> <span class="localisation-progress">(9%)</span></li>
|
||||||
|
4
docs/ko-KR/index.html
generated
4
docs/ko-KR/index.html
generated
@@ -43,7 +43,7 @@
|
|||||||
<meta property="og:locale" content="ko-KR" />
|
<meta property="og:locale" content="ko-KR" />
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:published_time" content="2013-06-13T12:00:00+00:00" />
|
<meta property="og:published_time" content="2013-06-13T12:00:00+00:00" />
|
||||||
<meta property="og:updated_time" content="2023-08-15T15:28:19+00:00" />
|
<meta property="og:updated_time" content="2024-02-28T17:22:37+00:00" />
|
||||||
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
||||||
<meta property="og:section" content="Bézier Curves" />
|
<meta property="og:section" content="Bézier Curves" />
|
||||||
<meta property="og:tag" content="Bézier Curves" />
|
<meta property="og:tag" content="Bézier Curves" />
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
<ul class="lang-switcher">
|
<ul class="lang-switcher">
|
||||||
<li><a href="./index.html">English</a> </li>
|
<li><a href="./index.html">English</a> </li>
|
||||||
<li><a href="./ja-JP/index.html">日本語</a> <span class="localisation-progress">(24%)</span></li>
|
<li><a href="./ja-JP/index.html">日本語</a> <span class="localisation-progress">(24%)</span></li>
|
||||||
<li><a href="./zh-CN/index.html">中文</a> <span class="localisation-progress">(35%)</span></li>
|
<li><a href="./zh-CN/index.html">中文</a> <span class="localisation-progress">(37%)</span></li>
|
||||||
<li><a href="./ru-RU/index.html">Русский</a> <span class="localisation-progress">(24%)</span></li>
|
<li><a href="./ru-RU/index.html">Русский</a> <span class="localisation-progress">(24%)</span></li>
|
||||||
<li><a href="./uk-UA/index.html">Українська</a> <span class="localisation-progress">(2%)</span></li>
|
<li><a href="./uk-UA/index.html">Українська</a> <span class="localisation-progress">(2%)</span></li>
|
||||||
<li><a href="./ko-KR/index.html">한국어</a> <span class="localisation-progress">(9%)</span></li>
|
<li><a href="./ko-KR/index.html">한국어</a> <span class="localisation-progress">(9%)</span></li>
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
<meta property="og:locale" content="en-GB" />
|
<meta property="og:locale" content="en-GB" />
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:published_time" content="Fri Sep 18 2020 00:00:00 +00:00" />
|
<meta property="og:published_time" content="Fri Sep 18 2020 00:00:00 +00:00" />
|
||||||
<meta property="og:updated_time" content="Tue Aug 15 2023 15:28:19 +00:00" />
|
<meta property="og:updated_time" content="Wed Feb 28 2024 17:22:37 +00:00" />
|
||||||
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
||||||
<meta property="og:section" content="Bézier Curves" />
|
<meta property="og:section" content="Bézier Curves" />
|
||||||
<meta property="og:tag" content="Bézier Curves" />
|
<meta property="og:tag" content="Bézier Curves" />
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
<meta property="og:locale" content="en-GB" />
|
<meta property="og:locale" content="en-GB" />
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:published_time" content="Sun Nov 22 2020 00:00:00 +00:00" />
|
<meta property="og:published_time" content="Sun Nov 22 2020 00:00:00 +00:00" />
|
||||||
<meta property="og:updated_time" content="Tue Aug 15 2023 15:28:19 +00:00" />
|
<meta property="og:updated_time" content="Wed Feb 28 2024 17:22:37 +00:00" />
|
||||||
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
||||||
<meta property="og:section" content="Bézier Curves" />
|
<meta property="og:section" content="Bézier Curves" />
|
||||||
<meta property="og:tag" content="Bézier Curves" />
|
<meta property="og:tag" content="Bézier Curves" />
|
||||||
|
2
docs/news/index.html
generated
2
docs/news/index.html
generated
@@ -33,7 +33,7 @@
|
|||||||
<meta property="og:description" content="" />
|
<meta property="og:description" content="" />
|
||||||
<meta property="og:locale" content="en-GB" />
|
<meta property="og:locale" content="en-GB" />
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:published_time" content="Tue Aug 15 2023 15:28:19 GMT+0000 (Coordinated Universal Time)" />
|
<meta property="og:published_time" content="Wed Feb 28 2024 17:22:37 GMT+0000 (Coordinated Universal Time)" />
|
||||||
<meta property="og:updated_time" content="" />
|
<meta property="og:updated_time" content="" />
|
||||||
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
||||||
<meta property="og:section" content="Bézier Curves" />
|
<meta property="og:section" content="Bézier Curves" />
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<atom:link href="https://pomax.github.io/bezierinfo" rel="self"></atom:link>
|
<atom:link href="https://pomax.github.io/bezierinfo" rel="self"></atom:link>
|
||||||
<description>News updates for the <a href="https://pomax.github.io/bezierinfo">primer on Bézier Curves</a> by Pomax</description>
|
<description>News updates for the <a href="https://pomax.github.io/bezierinfo">primer on Bézier Curves</a> by Pomax</description>
|
||||||
<language>en-GB</language>
|
<language>en-GB</language>
|
||||||
<lastBuildDate>Tue Aug 15 2023 15:28:19 +00:00</lastBuildDate>
|
<lastBuildDate>Wed Feb 28 2024 17:22:37 +00:00</lastBuildDate>
|
||||||
<image>
|
<image>
|
||||||
<url>https://pomax.github.io/bezierinfo/images/og-image.png</url>
|
<url>https://pomax.github.io/bezierinfo/images/og-image.png</url>
|
||||||
<title>A Primer on Bézier Curves</title>
|
<title>A Primer on Bézier Curves</title>
|
||||||
|
4
docs/ru-RU/index.html
generated
4
docs/ru-RU/index.html
generated
@@ -34,7 +34,7 @@
|
|||||||
<meta property="og:locale" content="ru-RU" />
|
<meta property="og:locale" content="ru-RU" />
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:published_time" content="2013-06-13T12:00:00+00:00" />
|
<meta property="og:published_time" content="2013-06-13T12:00:00+00:00" />
|
||||||
<meta property="og:updated_time" content="2023-08-15T15:28:19+00:00" />
|
<meta property="og:updated_time" content="2024-02-28T17:22:37+00:00" />
|
||||||
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
||||||
<meta property="og:section" content="Bézier Curves" />
|
<meta property="og:section" content="Bézier Curves" />
|
||||||
<meta property="og:tag" content="Bézier Curves" />
|
<meta property="og:tag" content="Bézier Curves" />
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
<ul class="lang-switcher">
|
<ul class="lang-switcher">
|
||||||
<li><a href="./index.html">English</a> </li>
|
<li><a href="./index.html">English</a> </li>
|
||||||
<li><a href="./ja-JP/index.html">日本語</a> <span class="localisation-progress">(24%)</span></li>
|
<li><a href="./ja-JP/index.html">日本語</a> <span class="localisation-progress">(24%)</span></li>
|
||||||
<li><a href="./zh-CN/index.html">中文</a> <span class="localisation-progress">(35%)</span></li>
|
<li><a href="./zh-CN/index.html">中文</a> <span class="localisation-progress">(37%)</span></li>
|
||||||
<li><a href="./ru-RU/index.html">Русский</a> <span class="localisation-progress">(24%)</span></li>
|
<li><a href="./ru-RU/index.html">Русский</a> <span class="localisation-progress">(24%)</span></li>
|
||||||
<li><a href="./uk-UA/index.html">Українська</a> <span class="localisation-progress">(2%)</span></li>
|
<li><a href="./uk-UA/index.html">Українська</a> <span class="localisation-progress">(2%)</span></li>
|
||||||
<li><a href="./ko-KR/index.html">한국어</a> <span class="localisation-progress">(9%)</span></li>
|
<li><a href="./ko-KR/index.html">한국어</a> <span class="localisation-progress">(9%)</span></li>
|
||||||
|
4
docs/uk-UA/index.html
generated
4
docs/uk-UA/index.html
generated
@@ -39,7 +39,7 @@
|
|||||||
<meta property="og:locale" content="uk-UA" />
|
<meta property="og:locale" content="uk-UA" />
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:published_time" content="2013-06-13T12:00:00+00:00" />
|
<meta property="og:published_time" content="2013-06-13T12:00:00+00:00" />
|
||||||
<meta property="og:updated_time" content="2023-08-15T15:28:19+00:00" />
|
<meta property="og:updated_time" content="2024-02-28T17:22:37+00:00" />
|
||||||
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
||||||
<meta property="og:section" content="Bézier Curves" />
|
<meta property="og:section" content="Bézier Curves" />
|
||||||
<meta property="og:tag" content="Bézier Curves" />
|
<meta property="og:tag" content="Bézier Curves" />
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
<ul class="lang-switcher">
|
<ul class="lang-switcher">
|
||||||
<li><a href="./index.html">English</a> </li>
|
<li><a href="./index.html">English</a> </li>
|
||||||
<li><a href="./ja-JP/index.html">日本語</a> <span class="localisation-progress">(24%)</span></li>
|
<li><a href="./ja-JP/index.html">日本語</a> <span class="localisation-progress">(24%)</span></li>
|
||||||
<li><a href="./zh-CN/index.html">中文</a> <span class="localisation-progress">(35%)</span></li>
|
<li><a href="./zh-CN/index.html">中文</a> <span class="localisation-progress">(37%)</span></li>
|
||||||
<li><a href="./ru-RU/index.html">Русский</a> <span class="localisation-progress">(24%)</span></li>
|
<li><a href="./ru-RU/index.html">Русский</a> <span class="localisation-progress">(24%)</span></li>
|
||||||
<li><a href="./uk-UA/index.html">Українська</a> <span class="localisation-progress">(2%)</span></li>
|
<li><a href="./uk-UA/index.html">Українська</a> <span class="localisation-progress">(2%)</span></li>
|
||||||
<li><a href="./ko-KR/index.html">한국어</a> <span class="localisation-progress">(9%)</span></li>
|
<li><a href="./ko-KR/index.html">한국어</a> <span class="localisation-progress">(9%)</span></li>
|
||||||
|
45
docs/zh-CN/index.html
generated
45
docs/zh-CN/index.html
generated
@@ -35,7 +35,7 @@
|
|||||||
<meta property="og:locale" content="zh-CN" />
|
<meta property="og:locale" content="zh-CN" />
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:published_time" content="2013-06-13T12:00:00+00:00" />
|
<meta property="og:published_time" content="2013-06-13T12:00:00+00:00" />
|
||||||
<meta property="og:updated_time" content="2023-08-15T15:28:19+00:00" />
|
<meta property="og:updated_time" content="2024-02-28T17:22:37+00:00" />
|
||||||
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
<meta property="og:author" content="Mike 'Pomax' Kamermans" />
|
||||||
<meta property="og:section" content="Bézier Curves" />
|
<meta property="og:section" content="Bézier Curves" />
|
||||||
<meta property="og:tag" content="Bézier Curves" />
|
<meta property="og:tag" content="Bézier Curves" />
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
<ul class="lang-switcher">
|
<ul class="lang-switcher">
|
||||||
<li><a href="./index.html">English</a> </li>
|
<li><a href="./index.html">English</a> </li>
|
||||||
<li><a href="./ja-JP/index.html">日本語</a> <span class="localisation-progress">(24%)</span></li>
|
<li><a href="./ja-JP/index.html">日本語</a> <span class="localisation-progress">(24%)</span></li>
|
||||||
<li><a href="./zh-CN/index.html">中文</a> <span class="localisation-progress">(35%)</span></li>
|
<li><a href="./zh-CN/index.html">中文</a> <span class="localisation-progress">(37%)</span></li>
|
||||||
<li><a href="./ru-RU/index.html">Русский</a> <span class="localisation-progress">(24%)</span></li>
|
<li><a href="./ru-RU/index.html">Русский</a> <span class="localisation-progress">(24%)</span></li>
|
||||||
<li><a href="./uk-UA/index.html">Українська</a> <span class="localisation-progress">(2%)</span></li>
|
<li><a href="./uk-UA/index.html">Українська</a> <span class="localisation-progress">(2%)</span></li>
|
||||||
<li><a href="./ko-KR/index.html">한국어</a> <span class="localisation-progress">(9%)</span></li>
|
<li><a href="./ko-KR/index.html">한국어</a> <span class="localisation-progress">(9%)</span></li>
|
||||||
@@ -219,7 +219,7 @@
|
|||||||
<li><a href="zh-CN/index.html#whatis">什么构成了贝塞尔曲线?</a></li>
|
<li><a href="zh-CN/index.html#whatis">什么构成了贝塞尔曲线?</a></li>
|
||||||
<li><a href="zh-CN/index.html#explanation">贝塞尔曲线的数学原理</a></li>
|
<li><a href="zh-CN/index.html#explanation">贝塞尔曲线的数学原理</a></li>
|
||||||
<li><a href="zh-CN/index.html#control">控制贝塞尔的曲率</a></li>
|
<li><a href="zh-CN/index.html#control">控制贝塞尔的曲率</a></li>
|
||||||
<li><a href="zh-CN/index.html#weightcontrol">Controlling Bézier curvatures, part 2: Rational Béziers</a></li>
|
<li><a href="zh-CN/index.html#weightcontrol">控制贝塞尔曲线的曲率,第二部分:有理贝塞尔</a></li>
|
||||||
<li><a href="zh-CN/index.html#extended">贝塞尔区间[0,1]</a></li>
|
<li><a href="zh-CN/index.html#extended">贝塞尔区间[0,1]</a></li>
|
||||||
<li><a href="zh-CN/index.html#matrix">用矩阵运算来表示贝塞尔曲率</a></li>
|
<li><a href="zh-CN/index.html#matrix">用矩阵运算来表示贝塞尔曲率</a></li>
|
||||||
<li><a href="zh-CN/index.html#decasteljau">de Casteljau's 算法</a></li>
|
<li><a href="zh-CN/index.html#decasteljau">de Casteljau's 算法</a></li>
|
||||||
@@ -1126,13 +1126,12 @@ function Bezier(3,t,w[]):
|
|||||||
<section id="weightcontrol">
|
<section id="weightcontrol">
|
||||||
<h1>
|
<h1>
|
||||||
<div class="nav"><a href="zh-CN/index.html#control">上一节</a><a href="#toc">目录</a><a href="zh-CN/index.html#extended">下一节</a></div>
|
<div class="nav"><a href="zh-CN/index.html#control">上一节</a><a href="#toc">目录</a><a href="zh-CN/index.html#extended">下一节</a></div>
|
||||||
<a href="zh-CN/index.html#weightcontrol">Controlling Bézier curvatures, part 2: Rational Béziers</a>
|
<a href="zh-CN/index.html#weightcontrol">控制贝塞尔曲线的曲率,第二部分:有理贝塞尔</a>
|
||||||
</h1>
|
</h1>
|
||||||
<p>
|
<p>
|
||||||
We can further control Bézier curves by "rationalising" them: that is, adding a "ratio" value in addition to the weight value discussed in
|
我们可以通过“有理化”来进一步控制贝塞尔曲线,即,除了在上一小节中讨论的权重外,还通过添加“比率”参数来调节每个控制点对曲线影响的“强度”。
|
||||||
the previous section, thereby gaining control over "how strongly" each coordinate influences the curve.
|
|
||||||
</p>
|
</p>
|
||||||
<p>Adding these ratio values to the regular Bézier curve function is fairly easy. Where the regular function is the following:</p>
|
<p>常规的贝塞尔曲线函数表达式如下:</p>
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
__ n n-i i
|
__ n n-i i
|
||||||
@@ -1146,7 +1145,7 @@ Bézier(n,t) = ❯ \binomni · (1-t) · t · w
|
|||||||
height="41px"
|
height="41px"
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
/>
|
/>
|
||||||
<p>The function for rational Bézier curves has two more terms:</p>
|
<p>将比率添加到其中非常容易,只需要添加两项。有理贝塞尔曲线函数表达式如下:</p>
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
__ n n-i i
|
__ n n-i i
|
||||||
@@ -1165,26 +1164,17 @@ Rational Bézier(n,t) = ──────────────────
|
|||||||
loading="lazy"
|
loading="lazy"
|
||||||
/>
|
/>
|
||||||
<p>
|
<p>
|
||||||
In this, the first new term represents an additional weight for each coordinate. For example, if our ratio values are [1, 0.5, 0.5, 1]
|
这里,第一个新添项表示的是每个控制点的一个“额外的”权重。例如,如果比率为[1,0.5,0.5,1],那么<code>ratio<sub>0</sub> = 1</code>,
|
||||||
then <code>ratio<sub>0</sub> = 1</code>, <code>ratio<sub>1</sub> = 0.5</code>, and so on, and is effectively identical as if we were just
|
<code>ratio<sub>1</sub> = 0.5</code>,以此类推。可见,这就好比使用了“双重加权”,并没有什么特别之处。
|
||||||
using different weight. So far, nothing too special.
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
However, the second new term is what makes the difference: every point on the curve isn't just a "double weighted" point, it is a
|
特别之处在于第二个新添项:曲线上的每个点不仅仅是一个“双重加权”点,它是通过引入比率计算的“双重加权”值的一个分数。当计算曲线上的点时,我们先计算“常规的”贝塞尔值,然后除以用比率,而不是权重计算出来的新曲线的贝塞尔值。
|
||||||
<em>fraction</em> of the "doubly weighted" value we compute by introducing that ratio. When computing points on the curve, we compute the
|
|
||||||
"normal" Bézier value and then <em>divide</em> that by the Bézier value for the curve that only uses ratios, not weights.
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
This does something unexpected: it turns our polynomial into something that <em>isn't</em> a polynomial anymore. It is now a kind of curve
|
这会产生一些意想不到的结果:它把多项式变成了非多项式的表达式。它现在是一种由多项式的超类表示的曲线,能够实现一些贝塞尔曲线本身无法实现的很酷的事情,例如准确地描述圆形(稍后会看到,这是贝塞尔曲线无法做到的。)
|
||||||
that is a super class of the polynomials, and can do some really cool things that Bézier curves can't do "on their own", such as perfectly
|
|
||||||
describing circles (which we'll see in a later section is literally impossible using standard Bézier curves).
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
But the best way to show what this does is to do literally that: let's look at the effect of "rationalising" our Bézier curves using an
|
展示贝塞尔曲线有理化作用的最佳方法还是使用交互式图片来查看效果。下方图片显示的是前序小节中使用的贝塞尔曲线的每个控制点添加了比率的结果。比率值越接近于0,相关控制点对曲线的相对影响就越小,反之亦然。请尝试更改这些比率值并观察它们如何影响曲线:
|
||||||
interactive graphic for a rationalised curves. The following graphic shows the Bézier curve from the previous section, "enriched" with
|
|
||||||
ratio factors for each coordinate. The closer to zero we set one or more terms, the less relative influence the associated coordinate
|
|
||||||
exerts on the curve (and of course the higher we set them, the more influence they have). Try to change the values and see how it affects
|
|
||||||
what gets drawn:
|
|
||||||
</p>
|
</p>
|
||||||
<graphics-element
|
<graphics-element
|
||||||
title="Our rational cubic Bézier curve"
|
title="Our rational cubic Bézier curve"
|
||||||
@@ -1205,14 +1195,11 @@ Rational Bézier(n,t) = ──────────────────
|
|||||||
<input type="range" min="0.01" max="2" value="1" step="0.01" class="ratio-4" />
|
<input type="range" min="0.01" max="2" value="1" step="0.01" class="ratio-4" />
|
||||||
</graphics-element>
|
</graphics-element>
|
||||||
<p>
|
<p>
|
||||||
You can think of the ratio values as each coordinate's "gravity": the higher the gravity, the closer to that coordinate the curve will
|
你可以把比率想象为每个控制点的“重力”:重力越大,曲线就越接近该控制点。你还会注意到,如果只是将所有比率都增加或减少相同的值,则曲线不会发生任何变化。就像重力一样,如果相对强度保持不变,则不会发生任何真正的变化。这些值决定了每个控制点对其他点的影响。
|
||||||
want to be. You'll also notice that if you simply increase or decrease all the ratios by the same amount, nothing changes... much like
|
|
||||||
with gravity, if the relative strengths stay the same, nothing really changes. The values define each coordinate's influence
|
|
||||||
<em>relative to all other points</em>.
|
|
||||||
</p>
|
</p>
|
||||||
<div class="howtocode">
|
<div class="howtocode">
|
||||||
<h3>How to implement rational curves</h3>
|
<h3>如何实现有理化曲线</h3>
|
||||||
<p>Extending the code of the previous section to include ratios is almost trivial:</p>
|
<p>给前序小节的代码添加比率只需要一些小改动:</p>
|
||||||
|
|
||||||
<table class="code">
|
<table class="code">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -1325,7 +1312,7 @@ function RationalBezier(3,t,w[],r[]):
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p>And that's all we have to do.</p>
|
<p>这就是我们需要做的全部。</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section id="extended">
|
<section id="extended">
|
||||||
|
Reference in New Issue
Block a user