# Patch for incomplete ribbons

Hi all,

I noticed that with the ribbons engine, the cool backbone spline
Marcus did wasn’t going all the way to the ends. The first 2 segments
and the last 2 were not showing up. on big protein it’s not too
noticeable but on the smaller ones it is. With Marcus’ help I think I
figured out the problem. In a nurb you want to have the number of
knots be equal to the number of control points + order. In the case of
our spline the control points are the locations of the backbone atoms
and the order is 4 (cubic + 1). Now the trick was to not have extra
endpoints at the same location to end the spline but to rather have a
knot multiplicity equal to the order. So the first 4 and last 4 knots
should have the same value. The rendering is not very smooth at the
end and I’m not sure if something can be done about that but we at
least are rendering a spline for all the atoms in the backbone. Now
that I know more about nurbs than I ever wanted to, thanks Wikipedia,
I’m moving on to adding also using the nitrogens in the backbone for
the ribbon.

-Jordan

“That’s all very well in practice, but will it ever work in theory?” – G. Hill
"A tidy laboratory means a lazy chemist." – Jöns Jacob Berzelius

On Saturday 08 March 2008 15:45:21 Jordan Mantha wrote:

I noticed that with the ribbons engine, the cool backbone spline
Marcus did wasn’t going all the way to the ends. The first 2 segments
and the last 2 were not showing up. on big protein it’s not too
noticeable but on the smaller ones it is. With Marcus’ help I think I
figured out the problem. In a nurb you want to have the number of
knots be equal to the number of control points + order. In the case of
our spline the control points are the locations of the backbone atoms
and the order is 4 (cubic + 1). Now the trick was to not have extra
endpoints at the same location to end the spline but to rather have a
knot multiplicity equal to the order. So the first 4 and last 4 knots
should have the same value. The rendering is not very smooth at the
end and I’m not sure if something can be done about that but we at
least are rendering a spline for all the atoms in the backbone. Now
that I know more about nurbs than I ever wanted to, thanks Wikipedia,
I’m moving on to adding also using the nitrogens in the backbone for
the ribbon.

Looks great - applied in SVN!