Some Matrix Maths for OpenScad

Some Matrix Maths for OpenScad

thingiverse

Sometimes I find myself getting lost in the declarative transform world of OpenScad... translate() rotate() scale() rotate() . . . Then I smacked my head and discovered 'multmatrix()' I know you, as I, have often wondered, 'what is the multmatrix?' This thing is the answer. Basically a bunch more matrix routines to make life in OpenScad easier. Really I'm releasing this particular bit of work because I want to write an expose on declarative vs imperative programming and how to mix the two for 3D design goodness. What you'll find in this package are functions such as: vec4_mult_mat4(v,m) mat4_mult_mat4(m1,m2) mat4_transpose(m) transform_scale(xyz) etc. The devotees of OpenScad might find the gem known as 'ccerp' and begin to wonder what kind of crack I've been smokin on this father's day. But, that's for another post. The bottom line with this is, you can do your own fancy matrix transforms, and apply them wherever and whenever you like using the 'multmatrix()' module. Most people will scratch their heads in wonderment. Some might start bouncing down the halls with glee. The rest will just click on the next Colbert mash up. Instructions 1) Download the maths.scad 2) Use it to explore and learn about using matrices for graphics 3) Rejoice! If you have been playing with things like the hermite surfaces library, this one is not compatible with that one. Basically, the hermite looks like this: [[P0, M0], [P1, M1]] This thing changes the order to be: [P0, P1, M0, M1] So, be warned.

Download Model from thingiverse

With this file you will be able to print Some Matrix Maths for OpenScad with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Some Matrix Maths for OpenScad.