1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-28 10:40:52 +02:00
This commit is contained in:
Pomax
2016-02-20 17:50:30 -08:00
parent dda27c123b
commit a65d5a437d
11 changed files with 509 additions and 59 deletions

View File

@@ -187,7 +187,7 @@ var ABC = React.createClass({
with quadratic or cubic curves:</p>
<p>\[\begin{align}
& u(t)_{quadratic} = \frac{(t-1)^2}{2t^2 - 2t + 1} \\
& u(t)_{quadratic} = \frac{(1-t)^2}{t^2 + (1-t)^2} \\
& u(t)_{cubic} = \frac{(1-t)^3}{t^3 + (1-t)^3}
\end{align}\]</p>
@@ -228,7 +228,7 @@ var ABC = React.createClass({
while the "u(t)" functions have the same name both here and on MathOverflow.</p>
<p>\[
ratio(t)_{quadratic} = \left | \frac{2t^2 - 2t}{2t^2 - 2t + 1} \right |
ratio(t)_{quadratic} = \left | \frac{t^2 + (1-t)^2 - 1}{t^2 + (1-t)^2} \right |
\]</p>
<p>\[

View File

@@ -187,14 +187,14 @@ var Circles = React.createClass({
number of ranges for the angle φ, such as a half circle, quarter circle and eighth circle?</p>
<table><tbody><tr><td>
<p><img src="images/arc-q-pi.gif"/></p>
<p><img src="images/arc-q-pi.gif" height="190px"/></p>
<p>plotted for 0 φ π:</p>
</td><td>
<p><img src="images/arc-q-pi2.gif"/></p>
<p><img src="images/arc-q-pi2.gif" height="187px"/></p>
<p>plotted for 0 φ ½π:</p>
</td><td>
{ this.props.showhref ? "http://www.wolframalpha.com/input/?i=plot+sqrt%28%281%2F4+*+%28sin%28x%29+%2B+2tan%28x%2F2%29%29+-+sin%28x%2F2%29%29%5E2+%2B+%282sin%5E4%28x%2F4%29%29%5E2%29+for+0+%3C%3D+x+%3C%3D+pi%2F4" : null }
<p><img src="images/arc-q-pi4.gif"/></p>
<p><img src="images/arc-q-pi4.gif" height="174px"/></p>
<p>plotted for 0 φ ¼π:</p>
</td></tr></tbody></table>

View File

@@ -263,13 +263,13 @@ var CirclesCubic = React.createClass({
and see what the error is for circular arcs with an angle ranging from 0 to 2π:</p>
<table><tbody><tr><td>
<p><img src="images/arc-c-2pi.gif"/></p>
<p><img src="images/arc-c-2pi.gif" height="187px"/></p>
<p>plotted for 0 ≤ φ ≤ 2π:</p>
</td><td>
<p><img src="images/arc-c-pi.gif"/></p>
<p><img src="images/arc-c-pi.gif" height="187px"/></p>
<p>plotted for 0 ≤ φ ≤ π:</p>
</td><td>
<p><img src="images/arc-c-pi2.gif"/></p>
<p><img src="images/arc-c-pi2.gif" height="187px"/></p>
<p>plotted for 0 ≤ φ ≤ ½π:</p>
</td></tr></tbody></table>

View File

@@ -0,0 +1,34 @@
var React = require("react");
var style = {
width: 'calc(960px + 2em)',
marginTop: 0,
borderTop: '1px solid rgba(255, 0, 0, 0.5)',
paddingTop: '3em'
};
var sectionHTML = (
<section id="comments" style={style}>
<h2>Comments and questions</h2>
<div id="disqus_thread"/>
</section>
);
var CommentsAndQuestions = React.createClass({
getDefaultProps: function() {
return {
title: "Comments and Questions"
};
},
componentDidMount: function() {
if (typeof document !== "undefined") {
var disqusScript = document.createElement("script");
disqusScript.setAttribute("async", "async");
disqusScript.src = "lib/site/disqus.js";
document.head.appendChild(disqusScript);
}
},
render: function() { return sectionHTML; }
});
module.exports = CommentsAndQuestions;

View File

@@ -87,8 +87,8 @@ var Explanation = React.createClass({
more "shape" hidden in the rest of the curve, and we can model those parts by moving the curve
points around.</p>
<Graphic preset="simple" title="Quadratic infinite internval Bézier curve" setup={this.setupQuadratic} draw={this.draw} />
<Graphic preset="simple" title="Cubic infinite internval Bézier curve" setup={this.setupCubic} draw={this.draw} />
<Graphic preset="simple" title="Quadratic infinite interval Bézier curve" setup={this.setupQuadratic} draw={this.draw} />
<Graphic preset="simple" title="Cubic infinite interval Bézier curve" setup={this.setupCubic} draw={this.draw} />
<p>In fact, there are curves used in graphics design and computer modelling that do the opposite
of Bézier curves, where rather than fixing the interval, and giving you free coordinates, they fix

View File

@@ -50,5 +50,7 @@ module.exports = {
circles: require("./circles"),
circles_cubic: require("./circles_cubic"),
arcapproximation: require("./arcapproximation")
arcapproximation: require("./arcapproximation"),
comments: require("./comments")
};