mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-08-31 03:59:58 +02:00
sections 21-30 converted for localization
This commit is contained in:
10
components/sections/arclengthapprox/content.en-GB.md
Normal file
10
components/sections/arclengthapprox/content.en-GB.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Approximated arc length
|
||||
|
||||
Sometimes, we don't actually need the precision of a true arc length, and we can get away with simply computing the approximate arc length instead. The by far fastest way to do this is to flatten the curve and then simply calculate the linear distance from point to point. This will come with an error, but this can be made arbitrarily small by increasing the segment count.
|
||||
|
||||
If we combine the work done in the previous sections on curve flattening and arc length computation, we can implement these with minimal effort:
|
||||
|
||||
<Graphic preset="twopanel" title="Approximate quadratic curve arc length" setup={this.setupQuadratic} draw={this.draw} onKeyDown={this.props.onKeyDown} />
|
||||
<Graphic preset="twopanel" title="Approximate cubic curve arc length" setup={this.setupCubic} draw={this.draw} onKeyDown={this.props.onKeyDown} />
|
||||
|
||||
Try clicking on the sketch and using your up and down arrow keys to lower the number of segments for both the quadratic and cubic curve. You may notice that the error in length is actually pretty significant, even if the percentage is fairly low: if the number of segments used yields an error of 0.1% or higher, the flattened curve already looks fairly obviously flattened. And of course, the longer the curve, the more significant the error will be.
|
@@ -1,6 +1,9 @@
|
||||
var React = require("react");
|
||||
var Graphic = require("../../Graphic.jsx");
|
||||
var SectionHeader = require("../../SectionHeader.jsx");
|
||||
|
||||
var Locale = require("../../../lib/locale");
|
||||
var locale = new Locale();
|
||||
var page = "arclengthapprox";
|
||||
|
||||
var keyHandling = require("../../decorators/keyhandling-decorator.jsx");
|
||||
|
||||
var ArclengthApprox = React.createClass({
|
||||
@@ -21,7 +24,7 @@ var ArclengthApprox = React.createClass({
|
||||
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
title: "Approximated arc length"
|
||||
title: locale.getTitle(page)
|
||||
};
|
||||
},
|
||||
|
||||
@@ -68,28 +71,7 @@ var ArclengthApprox = React.createClass({
|
||||
},
|
||||
|
||||
render: function() {
|
||||
return (
|
||||
<section>
|
||||
<SectionHeader {...this.props} />
|
||||
|
||||
<p>Sometimes, we don't actually need the precision of a true arc length, and we can get away with simply computing the
|
||||
approximate arc length instead. The by far fastest way to do this is to flatten the curve and then simply calculate
|
||||
the linear distance from point to point. This will come with an error, but this can be made arbitrarily small by
|
||||
increasing the segment count.</p>
|
||||
|
||||
<p>If we combine the work done in the previous sections on curve flattening and arc length computation, we can
|
||||
implement these with minimal effort:</p>
|
||||
|
||||
<Graphic preset="twopanel" title="Approximate quadratic curve arc length" setup={this.setupQuadratic} draw={this.draw} onKeyDown={this.props.onKeyDown} />
|
||||
<Graphic preset="twopanel" title="Approximate cubic curve arc length" setup={this.setupCubic} draw={this.draw} onKeyDown={this.props.onKeyDown} />
|
||||
|
||||
<p>Try clicking on the sketch and using your up and down arrow keys to lower the number of segments for both
|
||||
the quadratic and cubic curve. You may notice that the error in length is actually pretty significant, even if
|
||||
the percentage is fairly low: if the number of segments used yields an error of 0.1% or higher, the flattened
|
||||
curve already looks fairly obviously flattened. And of course, the longer the curve, the more significant the
|
||||
error will be.</p>
|
||||
</section>
|
||||
);
|
||||
return <section>{ locale.getContent(page, this) }</section>;
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user