Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jason Chemin
curves
Commits
707cbf5f
Commit
707cbf5f
authored
Mar 13, 2017
by
Steve Tonneau
Browse files
finished testing python bindings for bezier, + a bit of doc
parent
c3f88428
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/spline/bezier_curve.h
View file @
707cbf5f
...
...
@@ -21,7 +21,9 @@
namespace
spline
{
/// \class BezierCurve
/// \brief Represents a curve
/// \brief Represents a Bezier curve of arbitrary dimension and order.
/// For degree lesser than 4, the evaluation is analitycal.Otherwise
/// the bernstein polynoms are used to evaluate the spline at a given location.
///
template
<
typename
Time
=
double
,
typename
Numeric
=
Time
,
std
::
size_t
Dim
=
3
,
bool
Safe
=
false
,
typename
Point
=
Eigen
::
Matrix
<
Numeric
,
Dim
,
1
>
>
...
...
@@ -36,7 +38,7 @@ struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point>
public:
///\brief Constructor
///\param PointsBegin, PointsEnd : the points parametering the Bezier curve
///\TODO : so far size above 3 is ignored
///
template
<
typename
In
>
bezier_curve
(
In
PointsBegin
,
In
PointsEnd
,
const
time_t
minBound
=
0
,
const
time_t
maxBound
=
1
)
:
minBound_
(
minBound
)
...
...
python/test/test.py
View file @
707cbf5f
...
...
@@ -2,5 +2,9 @@ from spline import bezier
from
numpy
import
matrix
#testing bezier curve
a
=
bezier
(
matrix
([[
1.
,
2.
,
3.
],[
4.
,
5.
,
6.
]]))
a
=
bezier
(
matrix
([[
1.
,
2.
,
3.
],[
4.
,
5.
,
6.
]]),
-
1.
,
3.
)
a
.
min
()
a
.
max
()
a
(
0.4
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment