[OpenSCAD] Can you suggest some libraries of standard geometry conversions?
runsun
runsun at gmail.com
Sat Sep 19 11:58:20 EDT 2015
I've been working on a lib that can do a lot of what you describe, but it is
not ready for release yet :(
I'm gonna make some remark going through your list:
ufomorace wrote
> Vector3 modules // Vector3 in unity seems to have properties. OpenScad
> can't do properties. Besides, a vector and a point have the same
> representation, [x,y,z], so I simply treat them as points. Whatever you
> want to do with that vector, you have to use a function or module: do_what
> ( vector ).
>
> Angle Returns the angle in degrees between from and to. // Got this
>
> ClampMagnitude Returns a copy of vector with its magnitude clamped to
> maxLength. // Got this
>
> Cross Cross Product of two vectors. // openscad can do this
>
> Distance Returns the distance between a and b. // Got this
>
> Dot Dot Product of two vectors. // openscad can do this
>
> Lerp Linearly interpolates between two vectors. // Got this
>
> LerpUnclamped Linearly interpolates between two vectors. // Got this
>
> Max Returns a vector that is made from the largest components of two
> vectors. // [ for(i=[0:2]) max( v1[i], v2[i] ) ]
>
> Min Returns a vector that is made from the smallest components of two
> vectors. // [ for(i=[0:2]) min( v1[i], v2[i] ) ]
>
> MoveTowards Moves a point current in a straight line towards a target
> point. // Got this
>
> Normalize // Openscad can do this
>
> OrthoNormalize Makes vectors normalized and orthogonal to each other. //
> Not quite understand but shouldn't be hard
>
> Project Projects a vector onto another vector. // Got this
>
> ProjectOnPlane Projects a vector onto a plane defined by a normal
> orthogonal to the plane. // Got this
>
> Reflect Reflects a vector off the plane defined by a normal. // Got this
>
> RotateTowards Rotates a vector current towards target. // Got this
>
> Scale Multiplies two vectors component-wise. // ??
>
> Slerp Spherically interpolates between two vectors. // Got this (sort of)
>
> SlerpUnclamped Spherically interpolates between two vectors. // Got this
> (sort of)
>
> SmoothDamp Gradually changes a vector towards a desired goal over time. //
> not this
-----
$ Runsun Pan, PhD
$ -- libs: doctest , faces ( git ), offliner ( git );
tips: hash( 1 , 2 ), sweep , var
$ -- Linux Mint 17.1 Rebecca x64 + OpenSCAD 2015.03.15/2015.04.01.nightly
--
View this message in context: http://forum.openscad.org/Can-you-suggest-some-libraries-of-standard-geometry-conversions-tp13900p13904.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
More information about the Discuss
mailing list