Slicer Discord
Quaternions for OpenScad – Modello 3D stampabile da Thingiverse Thingiverse

Quaternions for OpenScad

57 Download
60 Likes
0 Makes
Vai al Modello
Having some basic Matrix math operations available in OpenScad has been a wonderful thing. I found my life to be somewhat lacking though because rotations are a royal pain in the...

This thing adds Quaternion support to OpenScad

Besides sounding like a cool name for an 80s rock band, or a futuristic diabolical planetary leader, quaternions are a math construct that make doing rotations a fairly painless task.

basically: myquat = quat(axis, angle);

So, to do a 30 degree rotation around the z-axis for example, would look like this:

rotz = quat([0,0,1], 30);

Now, that's not going to do you much good in OpenScad by itself, so you need to turn it into a matrix that OpenScad can easily consume and apply as a transform, so you do this:

rotzmatrix = quat_to_mat4(rotz);

Once you have this, you can use it with multmatrix()

multmatrix(rotzmatrix);

or

multmatrix(quat_to_mat4(quat([0,0,1],30)));

Ok, so wow, big deal!!

OK. So, combinations can be done like t
Fonte
Thingiverse
Cosa serve per stampare: Principiante Bassa affidabilità
Pezzo unico
Supporti 1/3
Assemblaggio 0/3
Impostazioni 1/3
Dimensioni piano 0/3
Post-lavorazione 0/3
Stampante
FDM / FFF
Formato file
STL
Materiale
PLA
Software
Cura, PrusaSlicer o simile
Ancora nessuna valutazione
Ancora nessun commento – sii il primo!

Modelli simili

3 Suggerimenti
Feed Blog Slicer Calcolatore Ricerca per immagine Invia Contatto Discord ☕ Buy me a coffee
DE EN FR ES IT NL

Aggiungi alla collezione