I have to find two vectors in 3D space, a
and b
such a x b = c
where c
is known. I also know one constraint, let's say that a_y = 0
So I have to look for these 2 vectors on (c_x)x+(c_y)y+(c_z)z=0
plane, for vector a
I can simplify it to (c_x)x+(c_z)z=0
for vector b
since it's perpendicular to a
as well it has to be in intersection of (a_x)x+(a_z)z=0
plane and (c_x)x+(c_y)y+(c_z)z=0
plane.
After adding cross product equation to that I have 4
equations and 5
unknowns (a_x,a_z,b_x,b_y,b_z)
. How can I solve this?
Thanks in advance.
EDIT: Maybe explaining what I need these for will help out somehow.
I have camera direction vector and I need vector that points to the right of screen, and second one that points up.