# 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? 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? Jul 6 '13 at 14:26
• @axrwkr CV = control vertex = control points. 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. Jul 6 '13 at 19:34

In the Shape panel for Curve objects there are 3 twisting options:

• Z-Up: uses Z axis to determine the twist.
• Tangent: uses Frenet / Darboux frame tangent.
• Minimum: step along the curve points, for each point computing a normal that is orthogonal to the curve direction and rotated as little as possible compared to the normal of the previous point.

Minimum is the default, and it behaves well in most cases. The downside is that it's non-local, any control point can influence the twist in the rest of the curve, but that's unavoidable, there is no other way to get minimal twisting.

The implementation in the Blender source code is in make_bevel_list_3D_minimum_twist.

• Yes, but is the normal accessible (python-wise), so that I could retrieve each curve point's normal ?
– user1892
Dec 18 '13 at 8:55