News for hackers. Stuff that matters.
Re:Swirling Forces, Crushing Pressures Measured in the Proton by jeffwass on Thursday March 14, 2024 @12:31PM (#39705999)
Below quote from your wiki link. I’m not a graphics guy, but would appreciate if someone with experience in computer graphics could please give an example of this common problem.

“A common problem in computer graphics is to generate a non-zero vector in R3 that is orthogonal to a given non-zero vector. There is no single continuous function that can do this for all non-zero vector inputs.”

Re:Swirling Forces, Crushing Pressures Measured in the Proton by itishappy on Thursday March 14, 2024 @12:58PM (#39706353)
Humans have an intuitive understanding of "up", so there's usually a single obvious way to orient a camera when taking photos. However, what happens when you point a camera straight up or down? There's no longer an obvious choice, any direction you choose is reasonable (orthogonal)!

Another way to think about it is assigning cardinal directions to the Earth. Which way is north from the north pole? There's no possible way to create a map that has defined directions at every point.

The pictures in the Wikipedia article give a great intuitive understanding, particularly if you can figure out why a sphere and torus behave differently. (You can build a globally consistent map on a torus.)

Re:Swirling Forces, Crushing Pressures Measured in the Proton by bmacho on Thursday March 14, 2024 @02:44PM (#39707503)
> (You can build a globally consistent map on a torus.)

No, you can not, there is no global map on the torus.

Re:Swirling Forces, Crushing Pressures Measured in the Proton by itishappy on Thursday March 14, 2024 @04:24PM (#39708544)
My language may be imprecise.

What I mean is that you can assign a direction to each point of the torus, and have it be consistent with it's neighbors (free of discontinuities) throughout the entire surface. This is in contrast to a sphere, which will always have tufts (poles) at at least one point.

Note that this only applies within the surface itself, not to it's embedding in 3d space (the donut shape we're all familiar with). If north points up on the outside edge, it'll point down to us on the inside edge, but an ant on the surface would experience no contradictions.

https://en.wikipedia.org/wiki/Torus#/media/File:Torus_cycles...

Re:Swirling Forces, Crushing Pressures Measured in the Proton by Aerroon on Thursday March 14, 2024 @02:02PM (#39707077)
Is this a consequence of tan(90) being undetermined? (approaches +infinity from one side and -infinity from the other)
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.
Re:Swirling Forces, Crushing Pressures Measured in the Proton by bmacho on Thursday March 14, 2024 @01:04PM (#39706412)
What example of what common problem? That's a true statement, and its proof is right above it, in the wiki page?
Re:Swirling Forces, Crushing Pressures Measured in the Proton by a1369209993 on Thursday March 14, 2024 @05:03PM (#39708940)
> There is no single continuous function that can do this

Nitpick: that should be "no single continuous deterministic function"; it's (relatively) very easy to sample uniformly randomly from the unit circle orthogonal to a given non-zero vector, but that won't give, for example, approximately the same result on two consecutive video frames, such that you could usefully orient the camera with that direction "up".

Re:Swirling Forces, Crushing Pressures Measured in the Proton by Sharlin on Friday March 15, 2024 @04:59AM (#39713491)
How is that continuous? Sure, there’s a trivial continuous mapping from a vector to the set of vectors orthogonal to it, but that’s hardly relevant to the problem st hand. Anyway, functions are deterministic by definition unless explicitly specified otherwise in some context.