3 ms·
In the realm of (real-time) computer graphics, I have recently developed a perspective that Quaternion representation is simply another "space" that you have to
by bob1029 4y ago
In the realm of (real-time) computer graphics, I have recently developed a perspective that Quaternion representation is simply another "space" that you have to spend finite resources transforming to and from. I am not aware of a rasterizer that can operate directly with quaternions, nor a way to apply perspective or orthographic projections to them.
For all of my personal applications, I have found that good old fashioned 4x4 homogeneous matrices are a really good way to deal with all of the transforms I am concerned with. I do recognize the utility of quaternions in dealing with certain specialized transforms, but these are not applicable in my simple DIY/hobby use cases (i.e. Q3A-tier graphics).
From a math perspective, I think quaternions are fantastic and far more elegant way to do certain things. I did recently discover Microsoft has all of this neatly wrapped up in System.Numerics, a SIMD-accelerated library for .NET: https://docs.microsoft.com/en-us/dotnet/api/system.numerics.quaternion?view=net-6.0 https://docs.microsoft.com/en-us/dotnet/api/system.numerics....
- yarg 4y ago> I am not aware of a rasterizer that can operate directly with quaternions, nor a way to apply perspective or orthographic projections to them. This reminds me of something (seen here) that I thought somewhat interesting. Orthographic projects of cones an n-dimensional euclidean space can be used to generate (n - 1)-dimensional voronoi diagrams. The author of the page that I looked at hadn't generalised to weighted diagrams, but that's trivially implementable by altering the gradients of the cones. The dimensionality issue is significantly nastier - with higher dimensional forms lacking GPU support, so the page only covered 2D voronois. It seemed like the idea could make for an interesting voxel engine, if 4D depth clipping were a possibility.
- eloisius 4y agoI use quaternions in 3D geometry contexts a lot right now. Manipulating point clouds, describing camera orientations etc. But I kind of agree, a standard 4x4 rotation matrix would most likely be just as useful. I use them because it’s how Colmap represents camera extrinsics. They might use them just because serializing q{xyzw} is more elegant than dumping a matrix to text.
- taneq 4y agoLikewise, I've read all the praises of quaternions and I keep meaning to use them but I always seem to end up just using good ol' matrices. The only thing I've really seen that seems to specifically need them is spherical linear interpolation (SLERP :D ) for smoothly blending orientations, but I've never quite had to use it.