# How does Blender calculate path normals?

In Blender, paths may be used to animate objects or to sweep surfaces. Both of these actions require that every point on the path has a normal. If this requirement were not fulfilled, the orientation of the object following the path would be ambiguous and the operations could not be completed.

Curves only have tangents and do not have intrinsic normals. Since normals are required, there must be an algorithm in Blender to generate them somehow. I only know of the following ways to generate normals for a curve:

1. Use the normal of the plane formed by the tangent and a fixed global axis. Fails when the curve runs parallel to this axis.

2. Use the normal of the average plane of the curve. Fails when the curve is a straight line.

3. Use a rail curve. This requires the user to define a second independent curve which never meets the first, and the normal is the line between the two curves.

Blender's path object does not fail when parallel to a global axis or when it's control vertices form a straight line. It also does not require a rail curve. How does it work?

I found this: http://wiki.blender.org/index.php/Dev:Ref/Requests/Incremental_curve_normals_proposal which present another possible solution, but it seems incomplete and may not reflect what Blender actually does at all. It does explain the problem in detail though.

• What does CV stand for? – user1595 Jul 6 '13 at 10:55
• They might be using the derivates of the curve to calculate the darboux frame. I'm not sure, though. Have you tried looking at the source? – Exilyth Jul 6 '13 at 12:23
• Curve control points have also a tilt value, which you can adjust both with the shortcut shift-T and from the properties panel while editing curves. Perhaps this is what you refer as normal? – hjaarnio Jul 6 '13 at 14:26
• @axrwkr CV = control vertex = control points. – Alistair Buxton Jul 6 '13 at 19:33
• @saharm I was hoping to avoid looking at the source but I suppose it would work as a last resort. I'll read about this darboux frame, thanks. – Alistair Buxton Jul 6 '13 at 19:34

The implementation in the Blender source code is in make_bevel_list_3D_minimum_twist.