News for hackers. Stuff that matters.
Re:Swirling Forces, Crushing Pressures Measured in the Proton by arbitrandomuser on Thursday March 14, 2024 @12:47PM (#39706196)
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 .
Re:Swirling Forces, Crushing Pressures Measured in the Proton by perihelions on Thursday March 14, 2024 @12:53PM (#39706278)
Right: 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.

Re:Swirling Forces, Crushing Pressures Measured in the Proton by itishappy on Thursday March 14, 2024 @12:54PM (#39706299)
This 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.