Daniele, Bezier Curves are parametric functions that are defined by their control points. The number of control points will determine the degree of the curve minus 1 so four control points will yield curve of degree three (cubic). The control points can be specified in whatever dimension you want (i.e. 2D or 3D) and whatever coordinate system you want. The resulting curve will lie within the control point polygon (the convex hull) where the curve will interpolate the first control point at t=0 and the last control point at t=1. As the parameter "t" varies between 0 and 1, the curve will trace out a smooth path from the first to the last control point. The animation will be controlled by the parameter "t" as input and the resulting point (x,y,z) on the curve will be given as output for a position.
Without going into too much detail mathematically on Bezier curves and splines, may I suggest you look at the book "Curves and Surfaces for Computer Aided Geometric Design" by Gerald Farin to get more information if you want to learn more about Bezier curves. Hopefully this will answer your question on how the example works when using Bezier curves to generate an animation path... -Shayne -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of daniele argiolas Sent: Tuesday, October 19, 2010 9:04 AM To: [email protected] Subject: [osg-users] Animation with Cubic Bezier path Hi, I tried to understand "osganimationmakepath" example. I can't understand how to make an animation if I would use simple points like these: v[0] = osg::Vec3(0, 0, 0); v[1] = osg::Vec3(20, 0, 0); v[2] = osg::Vec3(40, 0, 0); v[3] = osg::Vec3(60, 0, 0); I want an animation without stops between points and with a constant speed. What keys I have to add on path? I don't understand the relationship between control points of bezier and the making of animation. Is there anybody who can me explain? Thank you! Cheers, daniele ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32861#32861 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

