doc:user:geometry:user:courbes
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
doc:user:geometry:user:courbes [2015/01/07 16:17] – [Arc] boman | doc:user:geometry:user:courbes [2015/01/07 17:30] – [Spline-reconstruction based on a mesh] boman | ||
---|---|---|---|
Line 8: | Line 8: | ||
* The normal of a curve is defined such as $\boldsymbol{t} \wedge \boldsymbol{n} = (0,0,1)$. | * The normal of a curve is defined such as $\boldsymbol{t} \wedge \boldsymbol{n} = (0,0,1)$. | ||
- | {{ doc: | + | {{ doc: |
===== Line: straight segment ===== | ===== Line: straight segment ===== | ||
Line 18: | Line 18: | ||
line = curveset.add( Line(number, | line = curveset.add( Line(number, | ||
- | \\ | + | with |
- | \\ | + | | '' |
+ | | '' | ||
===== Arc ===== | ===== Arc ===== | ||
Line 30: | Line 30: | ||
arc = curveset.add( Arc(number, pt1, pt2, pt3) ) | arc = curveset.add( Arc(number, pt1, pt2, pt3) ) | ||
- | \\ | + | with |
- | \\ | + | | '' |
- | + | | '' | |
Line 48: | Line 47: | ||
# using Litt/ | # using Litt/ | ||
| | ||
- | | + | with |
- | ==== Closed | + | | '' |
+ | | '' | ||
+ | |||
+ | ==== "Closed" Cubic Spline | ||
To close a spline, the first and last points of the list must be the same. | To close a spline, the first and last points of the list must be the same. | ||
- | spl = CubicSpline(number, | + | spl = CubicSpline(number, |
- | + | ||
- | or, if the curve is defined based on a mesh, the mesh must be chosen closed. | + | |
==== Spline-reconstruction based on a mesh ==== | ==== Spline-reconstruction based on a mesh ==== | ||
- | {{ : | + | |
+ | {{: | ||
It is possible to construct a spline based on the mesh of a line. This way, a smooth approximation of this mesh if obtained. | It is possible to construct a spline based on the mesh of a line. This way, a smooth approximation of this mesh if obtained. | ||
Line 71: | Line 72: | ||
A circle is defined with its center and radius (this function is only defined in the $z=0$ plane) | A circle is defined with its center and radius (this function is only defined in the $z=0$ plane) | ||
- | circ2d = curset.add( Circle(number, | + | circ2d = curset.add( Circle(number, |
- | The orientation of the circle can be inverted | + | with |
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | The orientation of the '' | ||
circ2d.reverse() | circ2d.reverse() | ||
- | ==== NURBS ==== | + | ===== NURBS ===== |
- | A Non-Uniform Rational Basis Spline (Nurb) is defined as: | + | A Non-Uniform Rational Basis Spline (N.U.R.B.S.) is defined as: |
{{ doc: | {{ doc: | ||
Line 93: | Line 98: | ||
where | where | ||
- | + | |< 30em - >| | |
- | | '' | + | | '' |
| '' | | '' | ||
| '' | | '' | ||
| '' | | '' | ||
| '' | | '' | ||
- | | '' | ||
- | | '' | ||
- | ===== Interpreted curves | + | ===== PythonCurve: |
+ | {{: | ||
+ | |||
+ | If a '' | ||
+ | |||
+ | The method '' | ||
- | If a curve cannot be defined with the functions | + | '' |
- | '' | + | __Example:__ |
- | '' | + | |
- | Once this new curve is defined, it can be shaped as the already existing one, with a class. For example, if a parabola has just been defined (cfr. '' | + | See '' |
from toolbox.curves import Parabola | from toolbox.curves import Parabola | ||
parab = curset.add(Parabola(1, | parab = curset.add(Parabola(1, | ||
- | These lines create a parabola | + | These lines create a parabola |
doc/user/geometry/user/courbes.txt · Last modified: 2016/03/30 15:23 by 127.0.0.1