4 ms·
i might be misunderstanding , but it seems easy if you want a vector orthogonal to A , generate a random vector B non co-linear to A and take AxB (cross produc
by arbitrandomuser 3y ago
i might be misunderstanding , but it seems easy
if you want a vector orthogonal to A , generate a random vector B non co-linear to A and take AxB (cross product). AxB is orthogonal to A .
- perihelions 3y agoRight: and that's not a single, continuous function that works for all inputs—specifically, it fails on the input B itself. BxB = 0. Any solution will have a discontinuity in its output vector angles. I don't know how this problem is applied in computer graphics, but you probably want to avoid rendering objects in the vicinity of a discontinuity: you'd get some kind of flickering artifact when you cross it, with small ɛ-displacements being amplified into something much larger.
- itishappy 3y agoThis does not work on all non-zero vectors, hence your "non co-linear" comment. If the vectors point in the same direction, the cross product is zero, and you have an extra degree of freedom when choosing your "up" vector.