
This is a library for manipulating and visualizing 3D vectors in OpenSCAD. It has basic functions like crossProduct_3DVector() and magnatude_3DVector() as well as some more complex functions to test vector angles and rotate one vector towards another vector. Check out the instructions tab to see more detail.To use it in your own project, download the .scad and put it in your openscad library folder or in the same folder as the project you are using it in. Then at the top of your script just type : use <3dvector.scad> We've also included this in Customizer! Include it in your customizers by typing: use <utils/3dvector.scad> Here'Â?s a full list of the functions and modules included: function magnatude_3DVector(v) give this function a 3D vector in [x,y,z] format and it will return the length of that vector function angleBetween_3DVector(u, v) give this function two 3D vectors in [x,y,z] format and it will return the angle, in degrees, between them function normalize_3DVector(v) give this function a 3D vector in [x,y,z] format and it will return a vector that points in the same direction but with a length of 1 function dotProduct_3DVector(u, v) give this function two 3D vectors in [x,y,z] format and it will return the dot product of those vectors function crossProduct_3DVector(u, v) give this function two 3D vectors in [x,y,z] format and it will return the cross product of those vectors function rotMatrix_3DVector(axis, angle) give this function a 3D vectors in [x,y,z] format for axis and an angle in degrees and it will return a rotation matrix for the axis-angle rotation function rotAxisAngle_3DVector(vec, axis, angle) give this function an initial 3D vector and a 3D vector for the axis in [x,y,z] format, and an angle in degrees and it will return the rotated vector function trackTo_3DVector(cur, tar, influence) give this function an initial 3D vector and a target 3D vector in [x,y,z] format, then give it an influence between 0 and 1 and it will return an interpolated vector between the two vectors according to the influence function random_3DVector(seed = undef) calling this function without any parameters will return a random 3D vector. pass it a seed value to get the same "random" vector each time this module will draw a colored arrow to represent a 3D Vector. root controls where the vector starts from. magnatude_range defines the vector length that will result in a purple arrow. Vectors approaching 0 length will be red. radius_from_magnatude controls if the arrow gets fatter when it is longer. manual_radius controls the radius if radius_from_magnatude is set to false. res is the number of facets around the arrow. this module will recursively draw a chain of colored arrows end to end to represent a list of 3D Vectors. root controls where the vector chain starts from. iterations_left controls how many more recursions will occur, this parameter will self populate and only needs to be exposed because of how recursion works in OpenSCAD. Don'Â?t set this unless you have a good reason to.
- 0 inches x 0 inches x 0 inches
- this product is 3D printed
- 16 available colors
- material is a strong plastic
- free delivery by May 05
- 0 parts
