title: How to calculate the normal of points on a 3D cubic Bézier curve given normals for its start and end points?
body: <p>I'm trying to render a "3D ribbon" using a single 3D cubic Bézier curve to describe it (the width of the ribbon is some constant).  The first and last control points have a normal vector associated with them (which are always perpendicular to the tangents at those points, and describe the surface normal of the ribbon at those points), and I'm trying to smoothly interpolate the normal vector over the course of the curve.</p>
  
  <p>For example, given a curve which forms the letter 'C', with the first and last control points both having surface normals pointing upwards, the ribbon should start flat, parallel to the ground, slowly turn, and then end flat again, facing the same way as the first control point.  To do this "smoothly", it would have to face outwards half-way through the curve.  At the moment (for this case), I've only been able to get all the surfaces facing upwards (and not outwards in the middle), which creates an ugly transition in the middle.</p>
  
  <p>It's quite hard to explain, I've attached some images below of this example with what it currently looks like (all surfaces facing upwards, sharp flip in the middle) and what it should look like (smooth transition, surfaces slowly rotate round).  Silver faces represent the front, black faces the back.</p>
  
  <p>Incorrect, what it currently looks like:</p>
  
  <p><a href="http://img211.imageshack.us/img211/4659/ribbonincorrect.png" rel="nofollow noreferrer">Correct Ribbon http://img211.imageshack.us/img211/4659/ribbonincorrect.th.png</a></p>
  
  <p>Correct, what it <em>should</em> look like:</p>
  
  <p><a href="http://img515.imageshack.us/img515/2673/ribboncorrect.png" rel="nofollow noreferrer">Incorrect Ribbon http://img515.imageshack.us/img515/2673/ribboncorrect.th.png</a></p>
  
  <p>All I really need is to be able to calculate this "hybrid normal vector" for any point on the 3D cubic bézier curve, and I can generate the polygons no problem, but I can't work out how to get them to smoothly rotate round as depicted.  Completely stuck as to how to proceed!</p>