# Can you suggest some libraries of standard geometry conversions?

8 messages
Open this post in threaded view
|

## Can you suggest some libraries of standard geometry conversions?

 I love it when a geometry library has options like rotate towards, Vector3 to euler angles, Distance, lerp, and similar options. Is there any chance you could add these functions or an openscad file because they are not easy to code them to openscad, it's would be awesome to find a heavy geom functions library and just copy it into openscad engine: Vector3 modules Angle Returns the angle in degrees between from and to. ClampMagnitude Returns a copy of vector with its magnitude clamped to maxLength. Cross Cross Product of two vectors. Distance Returns the distance between a and b. Dot Dot Product of two vectors. Lerp Linearly interpolates between two vectors. LerpUnclamped Linearly interpolates between two vectors. Max Returns a vector that is made from the largest components of two vectors. Min Returns a vector that is made from the smallest components of two vectors. MoveTowards Moves a point current in a straight line towards a target point. Normalize OrthoNormalize Makes vectors normalized and orthogonal to each other. Project Projects a vector onto another vector. ProjectOnPlane Projects a vector onto a plane defined by a normal orthogonal to the plane. Reflect Reflects a vector off the plane defined by a normal. RotateTowards Rotates a vector current towards target. Scale Multiplies two vectors component-wise. Slerp Spherically interpolates between two vectors. SlerpUnclamped Spherically interpolates between two vectors. SmoothDamp Gradually changes a vector towards a desired goal over time.
Open this post in threaded view
|

## Re: Can you suggest some libraries of standard geometry conversions?

Open this post in threaded view
|

## Re: Can you suggest some libraries of standard geometry conversions?

Open this post in threaded view
|

## Re: Can you suggest some libraries of standard geometry conversions?

 Not a single library, but a number of libs and designs with some quite interesting functions: http://www.thingiverse.com/WilliamAAdams/designse.g.: Geodesic Maths for OpenScad - v0.1 http://www.thingiverse.com/thing:10540Quaternions for OpenScad http://www.thingiverse.com/thing:10249ciao,   Torsten. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org -- Torsten
Open this post in threaded view
|

## Re: Can you suggest some libraries of standard geometry conversions?

Open this post in threaded view
|

## Re: Can you suggest some libraries of standard geometry conversions?

 In reply to this post by ufomorace ufomorace wrote Lerp Linearly interpolates between two vectors. LerpUnclamped Linearly interpolates between two vectors. For this, check out my code and it's result here: http://forum.openscad.org/Irregular-mesh-generated-tp13765p13779.html \$ Runsun Pan, PhD \$ libs: scadx, doctest, faces(git), offline doc(git), runscad.py(2,git), editor of choice: CudaText ( OpenSCAD lexer); \$ Tips; \$ Snippets