second_proj_axis

EXPRESS specification:

FUNCTION second_proj_axis
(* Modified for LPM/6 *)(z_axis, x_axis, arg: direction) : direction; LOCAL y_axis : vector; v : direction; temp : vector; END_LOCAL; IF NOT EXISTS(arg) THEN v := dummy_gri || direction([0.0,1.0,0.0]); ELSE v := arg; END_IF; temp := scalar_times_vector(dot_product(v, z_axis), z_axis); y_axis := vector_difference(v, temp); temp := scalar_times_vector(dot_product(v, x_axis), x_axis); y_axis := vector_difference(y_axis, temp); y_axis := normalise(y_axis); RETURN(y_axis.orientation);
END_FUNCTION;