how to create the transformation matrix implied by a given n
how to create the transformation matrix implied by a given normal
as title.
thank you very much.
odgematrix3d::worldtoplane
odgematrix3d:

lanetoworld
vladimir
thank you again!
but i just get the result.jpg.
attached images (21.7 kb, 13 views)
attached files (192.0 kb, 5 views)
algorithm
from the autodesk public "dxf reference":
arbitrary axis algorithm
let the given normal vector be called n.
let the world y axis be called wy, which is always (0,1,0).
let the world z axis be called wz, which is always (0,0,1).
here we are looking for the arbitrary x and y axes to go with the normal n.
they will be called ax and ay. n could also be called az (the arbitrary z axis)
as follows:
if (abs (nx) < 1/64) and (abs (ny) < 1/64) then
ax = wy x n (where 揦?is the cross-product operator).
otherwise,
ax = wz x n.
scale ax to unit length.
the method of getting the ay vector is as follows:
ay = n x ax. scale ay to unit length.
arbitrary