I'm having trouble getting normals (red) from line segments (blue). So far I have all of the normals, but half of them are pointing in the opposite direction.
The code to get the normal is at: https://github.com/sjhalayka/ms_curvature/blob/c3ddbd5d9a995a7241b915c9570248fe331362c1/main.h#L281
The code to draw the normal is at: https://github.com/sjhalayka/ms_curvature/blob/c3ddbd5d9a995a7241b915c9570248fe331362c1/main.h#L123
Thanks for any ideas.