why is it that the venn diagram of people who understand 3d rotation math and people who do not know how to explain things is a circle

ME: what's a quaternion?

NERD: it's a four-dimensional complex number of the form (a + bi + cj + dk) where a, b, c and d are real numbers and i^2 = j^2 = k^2 = ijk = -1!

ME: ok. i understand that. but don't people use these for 3d rotations?

NERD: yeah!

ME: how?



NERD: well, you see, they're very important to use for rotations because they prevent gimbal lock,

Show thread

@prophet_goddess *snicker* he doesn’t understand the three seashells.

@zensaiyuki mathematics is just an elaborate prank. when you get a phd they let you in on the fact that it's all nonsense.

@prophet_goddess that’s not entirely untrue. the idea of university being for anyone other than the ruling class is extremely recent, and so a good proportion of its trappings are just about teaching you basically rich people gang signs.

the fact that mathematics turned out to be useful for things other than than games for rich kids is kind of an accident.

@prophet_goddess a lot of topics could be made way more accessible, but they aren’t because they’re deliberately designed to use jargon and overcomplicated articulation to make you feel bad for not understanding. the making you feel like you don’t belong is the point.

@zensaiyuki there is perhaps no field more prone to this than economics.

@prophet_goddess I just remembered something amusing. quaternions had just been invented when Lewis Carrol got so angry about them he wrote a book called Alice in Wonderland about how ridiculous they sound.

@prophet_goddess all the stuff about drink this to get bigger eat this to get smaller, unbirthdays, mad teaparties, disappearing cat smiles… not psychadelic imagery, pure quaternian angst

@zensaiyuki @prophet_goddess accident that has been around for a while though. Governments started funding it when they discovered it was good for building better warships in the colonial era.

@bulkington @prophet_goddess from around 1550-1600 (john dee), the “trappings” of math had been evolving for about 400 years by that point (i am counting from fibbonacci’s principia) but of course this is all gross simplification. and math didn’t suddenly become liberated from the elite once it was proven useful. it kinda still hasn’t.

@bulkington @prophet_goddess and to be clear that’s a eurocentric perspective on history. maths in other places had quite a different trajectory

@prophet_goddess I think this is just a function of mathematically knowledge and also why math educators are always in demand

@prophet_goddess @er1n “a monad is just a monoid in the category of functors”

@dankwraith i need to find either a quaternion or a rotation matrix that will transform one direction vector into another.

@prophet_goddess i need more information - do you have two specific direction vectors and you're trying to find the rotation that transforms one into the other?

@dankwraith yes. specifically, i'm trying to rotate an object so that its "up" vector is aligned with the direction between it and another object.

@prophet_goddess excellent. one last question - which math tool are you using

@prophet_goddess like are you using System.Numerics, Microsoft.Xna.Framework, Unity, etc

@prophet_goddess i think this will do it:

var rotation = Quaternion.Multiply(targetDirection, Quaternion.Inverse(startDirection));

@prophet_goddess oh wait uh you need to convert the directions to quaternions too

@dankwraith that's actually fine I think? I can easily get the up vector as a quaternion I think. is there a generic process for turning a direction into a quaternion?

@prophet_goddess i am currently applying my two brain cells to this problem, one moment please

@prophet_goddess ah ok, i get why i can't figure this out. one 3D vector is not enough to store complete rotation information in 3D space, you need a forward vector and an up vector

@prophet_goddess there's probably a way to optimize out the square root operation there but my brain is not large enough to figure it out

@dankwraith this whips. thank you so much! I'll check it as soon as I'm back at my computer!

Sign in to participate in the conversation

single-user instance for @prophet_goddess.