Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Fun?
I found it tedious as fuck. Especially writing solvers and matrix inversion routines (to invert general transforms).
If not for certain things I wanted which Eigen (C++ linear algebra library) didn't have, I would've used that instead. -
Skayo85687y<@ilikeglue>
Yeah I tried a lot but I wasn't happy with any of them... Then I decided to just write my own (I translate the Babylon Math Lib to Lua) according to my needs.
Also, some of the features used in the tutorial I'm following, are not present in every library. -
Skayo85687y<@RememberMe>
Yeah the invert function is pretty fucking complicated...
54 lines where a 1/3 is completely different from the others.
I think I'll save that for the end haha -
@Skayo it also depends on what algorithm you're using. And that depends on your application. For eg: I implemented a numerically stable(ish) Gauss-Jordan method because it fit my needs. There are a ton of inversion routines to choose from, with varying quality, stability, and speed.
Also, for 3D graphics, in most cases the transforms have trivial inverses (eg: flipping the sign on a translation matrix). You could take advantage of this by tracking how you've built up a transform, and simply build up the inverse transform by combining the individual inverses in reverse order.
Dunno why but writing a Vector Math Library is super fun! Especially in Lua!
random