Follow

for that last project i wound up writing some ugly python code that dumps giant ugly equations in C syntax

i wound up adding a lot of 3D specific hacks like the ordering of elements (e321 instead of e123, etc) because there were just too many patterns to try to figure out how to generate in code otherwise. but i do generate the multiplication table in code so at least that's something, i.e. the table in the top right here: terathon.com/pga_lengyel.pdf

Show thread

anti-commutivity is really weird to deal with but I'm probably overcomplicating it. basically for each element on the right hand side, i measure the "distance" between like products and flip the sign if it's an odd distance.

Show thread

i modified the script to dump the computation split into xmm registers, but the result is that half the instructions are just dedicated to loading the B vectors. didn't benchmark it though; realistically you wouldn't use the full function and just have subtypes for points/lines/planes etc where most of the terms are zero

Show thread

more of a curiosity thing than attempting to solve a problem

Show thread
Sign in to participate in the conversation
Cybrespace

Cybrespace is an instance of Mastodon, a social network based on open web protocols and free, open-source software. It is decentralized like e-mail.