GeometryXD - multidimensional geometry manipulations. Primarily targeted for 3D objects (points, vectors, curves).
Additional methods allow manipulate with arrays.
Convert arrays. Int <-> Float <-> String <-> Int Arrays.
Sum arrays. Parallel sum of arrays elements.
Diff arrays. Parallel diff of arrays elements from first array elements.
Multiplying arrays. Parallel multiplication of arrays elements.
Sum array elements.
Calculate max abs value from Float Array.
Not pro level library.

Static methods

staticmain ():Void

trace GeometryXD is ready for use message in time of initialisation

staticinlinepositive_inside_I (a:Array<Int>):Bool

return true if incoming Int Array have at least one positive element

Parameters:

a
  • incoming array

staticinlinezero_inside_I (a:Array<Int>):Bool

return true if incoming Int Array have at least one zero element

Parameters:

a
  • incoming array

staticinlinenegative_inside_I (a:Array<Int>):Bool

return true if incoming Int Array have at least one negative element

Parameters:

a
  • incoming array

staticinlinepositive_inside_F (a:Array<Float>):Bool

return true if incoming Float Array have at least one positive element

Parameters:

a
  • incoming array

staticinlinezero_inside_F (a:Array<Float>):Bool

return true if incoming Float Array have at least one zero element

Parameters:

a
  • incoming array

staticinlinenegative_inside_F (a:Array<Float>):Bool

return true if incoming Float Array have at least one negative element

Parameters:

a
  • incoming array

staticinlinesame_size_I (a:Array<Array<Int>>):Null<Bool>

return true if Int Arrays have same size

Parameters:

a
  • incoming arrays

staticinlinesame_size_F (a:Array<Array<Float>>):Null<Bool>

return true if Float Arrays have same size

Parameters:

a
  • incoming arrays

staticsame_xI (a:Array<Array<Int>>):Null<Bool>

compare Int Arrays. Returns true if all arrays have equal data

Parameters:

a
  • incoming array field

staticsame_xF (a:Array<Array<Float>>):Null<Bool>

compare Float Arrays. Returns true if all arrays have equal data

Parameters:

a
  • incoming array field

staticinlinesum_I (a:Array<Int>):Null<Int>

returns sum of Int Array elements. [1,2,3] -> 6. tested

Parameters:

a
  • incoming array

staticinlinesum_F (a:Array<Float>):Null<Float>

returns sum of Float Array elements. [1.1,2,3] -> 6.1. tested

Parameters:

a
  • incoming array

staticdiff_I (a:Array<Int>):Null<Int>

returns diff between first and others Int Array elements. [1,2,3] -> -4. tested

Parameters:

a
  • incoming array

staticdiff_F (a:Array<Float>):Null<Float>

returns diff between first and others Float Array elements. [1.1,2,3] -> -3.9. tested

Parameters:

a
  • incoming array

staticmiddle_F (a:Array<Float>):Null<Float>

returns middle value of Float Array

Parameters:

a
  • incoming array

staticinlinemultiply_I_I (a:Array<Int>, n:Int):Array<Int>

multiplies each element of an Int Array by Int

Parameters:

a
  • incoming array
n
  • multiplier of each element

staticinlinemultiply_F_F (a:Array<Float>, n:Float):Array<Float>

multiplies each element of an Float Array by Float

Parameters:

a
  • incoming array
n
  • multiplier of each element

staticinlinemultiply_I (a:Array<Int>):Null<Int>

multiplies all elements of an Int Array. [1, 2, 3] return 1 * 2 * 3

Parameters:

a
  • incoming array

staticinlinemultiply_F (a:Array<Float>):Null<Float>

multiplies all elements of an Float Array. [1.1, 2.0, 3.0] return 1.1 * 2.0 * 3.0

Parameters:

a
  • incoming array

staticinlineminus_I (a:Array<Int>):Array<Int>

multiplies each element of the Int Array by -1

Parameters:

a
  • incoming array

staticinlineminus_F (a:Array<Float>):Array<Float>

multiplies each element of the Float Array by -1

Parameters:

a
  • incoming array

staticsum_xI (a:Array<Array<Int>>):Array<Int>

return Int Array which is Int Arrays sum. [[1, 2, 3], [-3, -2, -1]] return [-2, 0, 2]

Parameters:

a
  • incoming arrays

staticsum_xF (a:Array<Array<Float>>):Array<Float>

return Float Array which is Float Arrays sum. [[1.1, 2, 3], [-3, -2, -1]] return [-1.9, 0, 2]

Parameters:

a
  • incoming arrays

staticdiff_xI (a:Array<Array<Int>>):Array<Int>

return Int Array which is result of diff between first Int Array and others. [[1, 2, 3], [-3, -2, -1]] return [4, 4, 4]

Parameters:

a
  • incoming arrays

staticdiff_xF (a:Array<Array<Float>>):Array<Float>

return Float Array which is result of diff between first Float Array and others. [[1.1, 2, 3], [-3, -2, -1]] return [4.1, 4, 4]

Parameters:

a
  • incoming arrays

staticmiddle_xF (a:Array<Array<Float>>):Array<Float>

return Float Array with middle values from arrays. [[1.1, 2, 3], [-3, -2, -1]] return [(1.1 - 3) / 2, (2 - 2) / 2, (3 - 1) / 2]

Parameters:

a
  • incoming arrays

staticmultiply_xI_I (a:Array<Array<Int>>, n:Int):Array<Array<Int>>

return Int arrays which is result of multiplying each element by Int

Parameters:

a
  • incoming arrays
n
  • multiplier

staticmultiply_xF_F (a:Array<Array<Float>>, n:Float):Array<Array<Float>>

return Float arrays which is result of multiplying each element by Float

Parameters:

a
  • incoming arrays
n
  • multiplier

staticmultiply_xI (a:Array<Array<Int>>):Array<Int>

return Int Array which is result of multiplying arrays. [[1, 2], [3, 4]] return [1 * 3, 2 * 4]

Parameters:

a
  • incoming arrays

staticmultiply_xF (a:Array<Array<Float>>):Array<Float>

return Float Array which is result of multiplying arrays. [[3.1, 2], [3, 4]] return [3.1 * 3, 2 * 4]

Parameters:

a
  • incoming arrays

staticmultisum_xI (a:Array<Array<Int>>):Null<Int>

Int Arrays bonus function. Short form of sum_I(multiply_xI(a)). [[a, b], [c, d]] return a * c + b * d

Parameters:

a
  • incoming arrays

staticmultisum_xF (a:Array<Array<Float>>):Null<Float>

Float Arrays bonus function. Short form of sum_F(multiply_xF(a)). [[a, b], [c, d]] return a * c + b * d

Parameters:

a
  • incoming arrays

staticinlinesum_previous_I (a:Array<Int>):Array<Int>

return Int Array which is result of sum with previous element. [1, 2, 3] return [1, 3, 5]

Parameters:

a
  • incoming array

staticinlinediff_previous_I (a:Array<Int>):Array<Int>

return Int Array which is result of diff with previous element. [1, 2, 3] return [1, 1, 1]

Parameters:

a
  • incoming array

staticinlinesum_before_I (a:Array<Int>):Array<Int>

return Int Array which is result of sum each element with before elements sum. [1, 2, 3] return [1, 3, 6]

Parameters:

a
  • incoming array

staticinlinediff_before_I (a:Array<Int>):Array<Int>

return Int Array which is result of diff each element with before elements diff. [1, 2, 3] return [1, 1, 2]

Parameters:

a
  • incoming array

staticinlinesum_previous_F (a:Array<Float>):Array<Float>

return Float Array which is result of sum with previous element. [1.1, 2, 3] return [1.1, 3.1, 5]

Parameters:

a
  • incoming array

staticinlinediff_previous_F (a:Array<Float>):Array<Float>

return Float Array which is result of diff with previous element. [1.1, 2, 3] return [1.1, 0.9, 1]

Parameters:

a
  • incoming array

staticinlinesum_before_F (a:Array<Float>):Array<Float>

return Float Array which is result of sum each element with before elements sum. [1.1, 2, 3] return [1.1, 3.1, 6.1]

Parameters:

a
  • incoming array

staticinlinediff_before_F (a:Array<Float>):Array<Float>

return Float Array which is result of diff each element with before elements diff. [1.1, 2, 3] return [1.1, 0.9, 2.1]

Parameters:

a
  • incoming array

staticinlinerecounter_I_F (what:Array<Int>):Array<Float>

recount Int Array to Float Array

Parameters:

what
  • incoming array

staticinlinerecounter_F_I (what:Array<Float>):Array<Int>

recount Float Array to Int Array

Parameters:

what
  • incoming array

staticinlinerecounter_I_S (what:Array<Int>):Array<String>

recount Int Array to String Array

Parameters:

what
  • incoming array

staticinlinerecounter_F_S (what:Array<Float>):Array<String>

recount Float Array to String Array

Parameters:

what
  • incoming array

staticinlinerecounter_S_I (what:Array<String>):Array<Int>

recount String Array to Int Array

Parameters:

what
  • incoming array

staticinlinerecounter_S_F (what:Array<String>):Array<Float>

recount String Array to Float Array

Parameters:

what
  • incoming array

@:value({ full : false })staticinlinerepeater_F_F (n:Int, what:Array<Float>, full:Bool = false):Array<Float>

repeat Float Array to specified length

Parameters:

n
  • result array length
what
  • incoming array
full
  • if true then result array will be not cutted to result array length parameter

@:value({ full : false })staticinlinerepeater_I_I (n:Int, what:Array<Int>, full:Bool = false):Array<Int>

repeat Int Array to specified length

Parameters:

n
  • result array length
what
  • incoming array
full
  • if true then result array will be not cutted to result array length parameter

@:value({ full : false })staticinlinerepeater_S_S (n:Int, what:Array<String>, full:Bool = false):Array<String>

repeat String Array to specified length

Parameters:

n
  • result array length
what
  • incoming array
full
  • if true then result array will be not cutted to result array length parameter

@:value({ full : false })staticrepeater_F_I (n:Int, what_:Array<Float>, full:Bool = false):Array<Int>

repeat Float Array to specified length Int Array

Parameters:

n
  • result array length
what
  • incoming array
full
  • if true then result array will be not cutted to result array length parameter

@:value({ full : false })staticrepeater_S_I (n:Int, what_:Array<String>, full:Bool = false):Array<Int>

repeat String Array to specified length Int Array

Parameters:

n
  • result array length
what
  • incoming array
full
  • if true then result array will be not cutted to result array length parameter

@:value({ full : false })staticrepeater_I_F (n:Int, what_:Array<Int>, full:Bool = false):Array<Float>

repeat Int Array to specified length Float Array

Parameters:

n
  • result array length
what
  • incoming array
full
  • if true then result array will be not cutted to result array length parameter

@:value({ full : false })staticrepeater_S_F (n:Int, what_:Array<String>, full:Bool = false):Array<Float>

repeat String Array to specified length Float Array

Parameters:

n
  • result array length
what
  • incoming array
full
  • if true then result array will be not cutted to result array length parameter

@:value({ full : false })staticrepeater_I_S (n:Int, what_:Array<Int>, full:Bool = false):Array<String>

repeat Int Array to specified length String Array

Parameters:

n
  • result array length
what
  • incoming array
full
  • if true then result array will be not cutted to result array length parameter

@:value({ full : false })staticrepeater_F_S (n:Int, what_:Array<Float>, full:Bool = false):Array<String>

repeat Float Array to specified length String Array

Parameters:

n
  • result array length
what
  • incoming array
full
  • if true then result array will be not cutted to result array length parameter

staticinlinean_in_b_S (a:Array<String>, b:Array<String>):Array<Array<Int>>

return array of arrays with pair indexes which is indexes equivalent elements of a and b arrays. a=["1", "2"] b=["1", "2", "1"] return [[0, 0], [0, 2], [1, 1]]

Parameters:

a
  • array what find
b
  • array where find

staticinlinean_in_bn_S (a:Array<String>, b:Array<Array<String>>):Array<Array<Int>>

return array of arrays with pair indexes which is indexes equivalent elements of a and b arrays. a=["1", "2"] b=[["1", "2", "1"],["0", "2"]] return [[0, 0, 0], [0, 0, 2], [1, 0, 1], [1, 1, 1]]. where indexes [1, 0, 1] = [1(a), 0(b), 1(b[0])]

Parameters:

a
  • array what find
b
  • array where find

staticinlinean_in_b_I (a:Array<Int>, b:Array<Int>):Array<Array<Int>>

return array of arrays with pair indexes which is indexes equivalent elements of a and b arrays. a=[1, 2] b=[1, 2, 1] return [[0, 0], [0, 2], [1, 1]]

Parameters:

a
  • array what find
b
  • array where find

staticinlinean_in_bn_I (a:Array<Int>, b:Array<Array<Int>>):Array<Array<Int>>

return array of arrays with pair indexes which is indexes equivalent elements of a and b arrays. a=[1, 2] b=[[1, 2, 1],[0, 2]] return [[0, 0, 0], [0, 0, 2], [1, 0, 1], [1, 1, 1]]. where indexes [1, 0, 1] = [1(a), 0(b), 1(b[0])]

Parameters:

a
  • array what find
b
  • array where find

staticinlinean_in_b_F (a:Array<Float>, b:Array<Float>):Array<Array<Int>>

return array of arrays with pair indexes which is indexes equivalent elements of a and b arrays. a=[1.0, 2.0] b=[1.0, 2.0, 1.0] return [[0, 0], [0, 2], [1, 1]]

Parameters:

a
  • array what find
b
  • array where find

staticinlinean_in_bn_F (a:Array<Float>, b:Array<Array<Float>>):Array<Array<Int>>

return array of arrays with pair indexes which is indexes equivalent elements of a and b arrays. a=[1.0, 2.0] b=[[1.0, 2.0, 1.0],[0, 2.0]] return [[0, 0, 0], [0, 0, 2], [1, 0, 1], [1, 1, 1]]. where indexes [1, 0, 1] = [1(a), 0(b), 1(b[0])]

Parameters:

a
  • array what find
b
  • array where find

staticchain_indexes (a_l:Int, n:Int, ring:Bool):Array<Array<Int>>

chain bonus function. split range to sequences specified length n with same border values. f(6, 3, false) return [[0, 1, 2], [2, 3, 4]]. But f(6, 3, true) return [[0, 1, 2], [2, 3, 4], [4, 5, 0]]. Can be used to split dotsXDfield (array of 3D dots) to array of separated 4dots curves trajectories which have same border dots. Just split array of dots length a_l to n = 4. Then recount to beziercurves or create multidot curve use each last three dots.

Parameters:

a_l
  • range of indexes (length of array which will be used later as splitted)
n
  • length of each sequence (chain link)
ring
  • if true then 0 will be added at the end of range of indexes, for the case of strict coincidence

@:value({ ring : false })staticinlinechain_S (a:Array<String>, n:Int, ring:Bool = false):Array<Array<String>>

create chain from String Array. Sequences with same border values

Parameters:

a
  • incoming array
n
  • chain link length
ring
  • if true then first incoming element will be added at the end of range, for the case of strict coincidence

@:value({ ring : false })staticinlinechain_I (a:Array<Int>, n:Int, ring:Bool = false):Array<Array<Int>>

create chain from Int Array. Sequences with same border values

Parameters:

a
  • incoming array
n
  • chain link length
ring
  • if true then first incoming element will be added at the end of range, for the case of strict coincidence

@:value({ ring : false })staticinlinechain_F (a:Array<Float>, n:Int, ring:Bool = false):Array<Array<Float>>

create chain from Float Array. Sequences with same border values

Parameters:

a
  • incoming array
n
  • chain link length
ring
  • if true then first incoming element will be added at the end of range, for the case of strict coincidence

@:value({ borders : false })staticinlinesteps_internal (xmin:Float, xmax:Float, n:Int, borders:Bool = false):Array<Float>

split interval to equal steps

Parameters:

xmin
  • minimum border
xmax
  • maximum border
n
  • steps number
borders
  • if true then add borders into result

staticsteps_external (smin:Float, smax:Float, n:Int, direction:Int):Array<Float>

repeat step multiple times. f(1, 5, 3, -1) return [-11, -7, -3, 1, 5] f(1, 5, 3, 0) return [-11, -7, -3, 1, 5, 9, 13, 17] f(1, 5, 3, 1) return [1, 5, 9, 13, 17]

Parameters:

smin
  • step minimum border
smax
  • step maximum border
n
  • repeat number
direction
  • if < 0 then from negative to minimum border direction. if > 0 then from maximum border to positive direction. if == 0 then both

staticinlinesign_I (x:Int):Int

return sign of Int. if x < 0 return -1, else return 1.

Parameters:

x
  • number, sign of which should be calculated

staticinlinesign_F (x:Float):Int

return sign of Float. if x < 0 return -1, else return 1.

Parameters:

x
  • number, sign of which should be calculated

staticinlinesign3_I (x:Int):Int

return sign of Int or 0. if x < 0 return -1, if x > 0 return 1, if x == 0 return 0.

Parameters:

x
  • number, sign of which should be calculated

staticinlinesign3_F (x:Float):Int

return sign of Float or 0. if x < 0 return -1, if x > 0 return 1, if x == 0 return 0.

Parameters:

x
  • number, sign of which should be calculated

staticinlinesin_cos_cut (x:Float):Float

sin cos bonus function. Normalise sin cos, counted use vectors to -1...1 include boders. Need because sometimes (detected on python3 in the past) result of calculating sin cos uses vectors can be more then 1, or less then -1. For example 1.00000000001 etc. Just tiny correction, just for case.

Parameters:

x
  • incoming sin cos value for check

staticinlinedegrees (angle:Float):Float

convert radians angle to degrees angle value

Parameters:

angle
  • radians angle for recounting

staticinlineradians (angle:Float):Float

convert degrees angle to radians angle value

Parameters:

angle
  • degrees angle for recounting

@:value({ rad : false })staticangle_quadrant (angle:Float, rad:Bool = false):Int

return the quadrant of any angle. 0 angle return 4 quadrant. For example use degrees: ... 0 < angle <= 90 return 1 quadrant ... 90 < angle <= 180 return 2 quadrant ... 180 < angle <= 270 return 3 quadrant ... 270 < angle <= 360 return 4 quadrant

Parameters:

angle
  • angle for quadrant calculating
rad
  • if true then radians angle, default false (degrees angle)

staticvecXDnorm (vecXD:Array<Float>):Float

return vector length (other names "norm" or "magnitude"). For [2,3] return Math.sqrt((2 * 2) + (3 * 3))

Parameters:

vecXD
  • incoming vector

staticinlinevecXDfieldnorm (vecXDfield:Array<Array<Float>>):Array<Float>

return array of lengths of vectors

Parameters:

vecXDfield
  • incoming vectors array(vector field)

staticinlinezero_vector_inside (vecXDfield:Array<Array<Float>>):Null<Bool>

staticmaxabs (a:Array<Float>):Float

return Float Array element with maximum absolute value with sign. Each element compared as abs(element). [1, 2, -4] return -4.

Parameters:

a
  • incoming array

staticvecXD (dotXDa:Array<Float>, dotXDb:Array<Float>):Array<Float>

return vector builded uses two dots

Parameters:

dotXDa
  • start dot
dotXDb
  • end dot

staticvecXDone (vecXD:Array<Float>):Array<Float>

recount vector to length equal 1

Parameters:

vecXD
  • incoming vector

staticvecXDfield (dots:Array<Array<Float>>):Array<Array<Float>>

return vector field from first dot to each other

Parameters:

dots
  • dots field for vector field. dots[0] used as first dot

staticinlinevecXDsame (vecXDa:Array<Float>, vecXDb:Array<Float>):Null<Bool>

compare vectors. Returns true if vectors have equal data

Parameters:

vecXDa
  • incoming vector
vecXDb
  • incoming vector

staticinlinevecXDfieldsame (vecXDfield:Array<Array<Float>>):Null<Bool>

compare vectors from vector field. Returns true if all vectors have same data

Parameters:

vecXDfield
  • vector field(array of vectors)

@:value({ x : 3 })staticvecXDrandom (x:Int = 3):Array<Float>

return random vector with length equal 1

Parameters:

x
  • number of vector dimension. For example x = 3 -> 3D vector, x = 4 -> 4D vector

staticvecXDsum (vecXDa:Array<Float>, vecXDb:Array<Float>):Array<Float>

return vector, which is sum of two vectors

Parameters:

vecXDa
  • vector
vecXDb
  • vector

staticvecXDfieldsum (vecXDfield:Array<Array<Float>>):Array<Float>

return vector, which is sum of vector field

Parameters:

vecXDfield
  • vector field (array of vectors)

staticvecXDdiff (vecXDa:Array<Float>, vecXDb:Array<Float>):Array<Float>

return vector, which is diff of vectors. vecXDa - vecXDb

Parameters:

vecXDa
  • vector
vecXDb
  • vector

staticvecXDfielddiff (vecXDfield:Array<Array<Float>>):Array<Float>

return vector, which is diff of vector field. v0-v1...-vn

Parameters:

vecXDfield
  • vector field(array of vectors)

staticvecXDback (vecXD:Array<Float>):Array<Float>

return opposite vector. [1, 2, -4] return [-1, -2, 4]

Parameters:

vecXD
  • vector

staticvecXDfieldback (vecXDfield:Array<Array<Float>>):Array<Array<Float>>

return opposite vector field. [[1, 2], [3, -4]] return [[-1, -2], [-3, 4]]

Parameters:

vecXDfield
  • vector field(array of vectors)

staticvecXDparalleled_sameside (vecXDa:Array<Float>, vecXDb:Array<Float>):Null<Bool>

return true if vectors paralleled and have same direction

Parameters:

vecXDa
  • vector
vecXDb
  • vector

staticvecXDparalleled_opposite (vecXDa:Array<Float>, vecXDb:Array<Float>):Null<Bool>

return true if vectors paralleled and have opposite direction

Parameters:

vecXDa
  • vector
vecXDb
  • vector

staticvecXDparalleled (vecXDa:Array<Float>, vecXDb:Array<Float>):Bool

return true if vectors paralleled

Parameters:

vecXDa
  • vector
vecXDb
  • vector

staticvecXDscalar (vecXDa:Array<Float>, vecXDb:Array<Float>):Null<Float>

return scalar product of vectors

Parameters:

vecXDa
  • vector
vecXDb
  • vector

staticvecXDcos (vecXDa:Array<Float>, vecXDb:Array<Float>):Null<Float>

return cos between vectors

Parameters:

vecXDa
  • vector
vecXDb
  • vector

@:value({ rad : false })staticvecXDangle (vecXDa:Array<Float>, vecXDb:Array<Float>, rad:Bool = false):Null<Float>

return angle between vectors

Parameters:

vecXDa
  • vector
vecXDb
  • vector
rad
  • if true then return radians angle, default false(degrees angle)

staticvec3Dnormal (vec3Da:Array<Float>, vec3Db:Array<Float>):Array<Float>

return vector 3D, which is result of cross product of vectors (normal vector of plane based on two vectors). Result vector placed so if you will see from end of result vector, then the rotating direction will be CCW from vec3Da to vec3Db

Parameters:

vec3Da
  • vector
vec3Db
  • vector

staticvec3Dfieldnormal (vec3Dfield:Array<Array<Float>>):Array<Float>

return vector 3D, which is result of step by step cross product for each next vector 3D from vector field with previous cross product result vector 3D

Parameters:

vec3Dfield
  • vector field 3D(array of vectors 3D)

staticvecXDmiddle (vecXDa:Array<Float>, vecXDb:Array<Float>):Array<Float>

return vector with middle value. Just call middle_xF([vecXDa, vecXDb])

Parameters:

vecXDa
  • vector
vecXDb
  • vector

staticvecXDfieldmiddle (vecXDfield:Array<Array<Float>>):Array<Float>

return vector with middle value. Just call middle_xF(vecXDfield)

Parameters:

vecXDfield
  • vector field(array of vectors)

staticvecXDsamesize (vecXDa:Array<Float>, vecXDb:Array<Float>):Null<Bool>

return true if vectors have same size. Bonus function. Just call same_size_F([vecXDa, vecXDb])

Parameters:

vecXDa
  • vector
vecXDb
  • vector

staticvecXDfieldsamesize (vecXDfield:Array<Array<Float>>):Null<Bool>

return true if vector from vector field have same size. Bonus function. Just call same_size_F(vecXDfield)

Parameters:

vecXDfield
  • vector field(array of vectors)

staticdotXDoffset (dotXD:Array<Float>, vecXD:Array<Float>, t:Float):Array<Float>

return dot, which result of offset dotXD along vecXD to t

Parameters:

dotXD
  • dot
vecXD
  • vector
t
  • distance

@:value({ dplane : 0 })staticdot3Dline3D_x_plane3D (dot3D0:Array<Float>, vec3D0:Array<Float>, vec3Dplane:Array<Float>, dplane:Float = 0):Array<Float>

return dot 3D, which is intersection dot for line3D(dot3D0, vec3D0) and plane3D(vec3Dplane, dplane)

Parameters:

dot3D0
  • dot 3D start for line
vec3D0
  • vector 3D of line direction
vec3Dplane
  • vector 3D, which is plane 3D normal vector
dplane
  • displacement of plane 3D from [0,0,0]. default 0 ([0,0,0] dot belongs to the plane)

staticprojection_dot3D_on_plane3D (dot3D:Array<Float>, plane3D:Array<Float>):Array<Float>

return dot 3D, which is projection of dot3D to plane3D

Parameters:

dot3D
  • dot 3D, which is [x, y, z]
plane3D
  • plane 3D, which is [a, b, c, d]. Where (a, b, c) - normal vector of plane 3D. (d) - distance from (0, 0, 0). if d = 0, then the plane passes through the center of coordinates

staticdot3D_to_dot2Dviewplane (dot3D:Array<Float>, dot3Dviewplanecenter:Array<Float>, vec3Dviewplane:Array<Float>, vec3Dviewplane_ox:Array<Float>):Array<Float>

return dot 2D (x, y) from dot3D projected on view plane, View plane determined by coordinate axes center plane 3D dot, and plane 3D normal vector. View plane vector 3D of axis ox, will be projected to view plane. Incoming value can not be strictly belongs to the view plane.

Parameters:

dot3D
  • dot 3D (x, y ,z) which will be projected
dot3Dviewplanecenter
  • view plane 3D center dot. Used as coordinate axes center
vec3Dviewplane
  • view plane normal vector 3D ()
vec3Dviewplane_ox
  • vector 3D of axis ox. Must be not parelleled view plane normal vector. Second axis will be calculated automatically, uses rotate projected ox around view plane normal vector

staticdotXDscale (dotXD:Array<Float>, scaleXD:Array<Float>, dotXDc:Array<Float>):Array<Float>

returns dot with scaled values relative to the scaling center

Parameters:

dotXD
  • dot . For 3D case [x, y, z]
scaleXD
  • scales array . For 3D case [sx, sy, sz]
dotXDc
  • scaling center dot . For 3D case [xc, yc, zc]

@:value({ rad : false })staticvec3Drotate (vec3D:Array<Float>, vec3Daxis:Array<Float>, angle:Float, rad:Bool = false):Array<Float>

returns vector 3D, rotated around axis vector to angle

Parameters:

vec3D
  • vector 3D
vec3Daxis
  • axis of rotation . vector 3D
angle
  • angle of rotation
rad
  • it true then radians angle, default false (degrees angle)

@:value({ rad : false })staticvec3Dfield_rotate_around_vec3Daxes (vec3Dfield:Array<Array<Float>>, vec3Daxes:Array<Array<Float>>, angles:Array<Float>, rad:Bool = false):Array<Array<Float>>

returns vector 3D field, each vector of which rotated to own angle, around own axis

Parameters:

vec3Dfield
  • vector 3D field(array of vectors)
vec3Daxes
  • axes 3D field(array of vectors)
angles
  • angles of rotating for each vector
rad
  • if true then radians angles, default false (degrees angles)

@:value({ rad : false })staticdot3Drotate (dot3D:Array<Float>, dot3Dc:Array<Float>, vec3D:Array<Float>, angle:Float, rad:Bool = false):Array<Float>

returns dot 3D, rotated to angle, around center of rotation determined by dot and axis of rotation

Parameters:

dot3D
  • dot 3D
dot3Dc
  • rotation center dot 3D
vec3D
  • rotation axis vector 3D
angle
  • rotation angle
rad
  • if true then radians angle, default false (degrees angle)

staticplane3D_dot3Dnormal (dot3D:Array<Float>, vec3D:Array<Float>):Array<Float>

returns plane 3D (a, b, c, d) determined by dot 3D and vector 3D. Where (a, b, c) is plane 3D normal vector, and (d) is displacement plane from (0, 0, 0)

Parameters:

dot3D
  • dot 3D
vec3D
  • plane 3D normal vector 3D

staticplane3D_dot_vec_vec (dot3D:Array<Float>, vec3Da:Array<Float>, vec3Db:Array<Float>):Array<Float>

returns plane 3D (a, b, c, d), determined by dot and two not paralleled vectors. Where (a, b, c) is plane 3D normal vector, and (d) is displacement plane from (0, 0, 0)

Parameters:

dot3D
  • dot 3D
vec3Da
  • vector 3D
vec3Db
  • vector 3D

staticplane3D_3dots (dot3D:Array<Float>, dot3Da:Array<Float>, dot3Db:Array<Float>):Array<Float>

returns plane 3D (a, b, c, d), determined by three not equal dots. Where (a, b, c) is plane 3D normal vector, and (d) is displacement plane from (0, 0, 0)

Parameters:

dot3D
  • dot 3D
dot3Da
  • dot 3D
dot3Db
  • dot 3D

staticplane3D_2dots (dot3D:Array<Float>, dot3Da:Array<Float>):Array<Float>

returns plane 3D (a, b, c, d), determined by two not equal dots. Where (a, b, c) is plane 3D normal vector, and (d) is displacement plane from (0, 0, 0)

Parameters:

dot3D
  • dot 3D
dot3Da
  • dot 3D

staticdistance_dot3D_plane3D (dot3D:Array<Float>, plane3D:Array<Float>):Null<Float>

returns distance from dot 3D to plane 3D

Parameters:

dot3D
  • dot 3D (x, y, z)
plane3D
  • plane 3D (a, b, c, d). Where (a, b, c) is plane 3D normal vector, and (d) is displacement plane from (0, 0, 0)

staticrandom_vec3D_in_plane3D (plane3D:Array<Float>):Array<Float>

returns a random vector 3D paralleled to the plane 3D(lies on plane 3D)

Parameters:

plane3D
  • plane 3D (a, b, c, d). Where (a, b, c) is plane 3D normal vector, and (d) is displacement plane from (0, 0, 0)

staticrandom_dot3D_in_plane3D (plane3D:Array<Float>, dot3D:Array<Float>, radius:Float):Array<Float>

returns random dot 3D belongs on plane 3D

Parameters:

plane3D
  • plane 3D (a, b, c, d). Where (a, b, c) is plane 3D normal vector, and (d) is displacement plane from (0, 0, 0)
dot3D
  • dot 3D . Determine start position for round area on plane 3D for calculating result. If dot not in plane , then will be uesd projection this dot on plane
radius
  • radius of round area on plane 3D. Result will be calculated inside area

staticcurve3D_4dots (dot3D1:Array<Float>, vec3D1:Array<Float>, distance1:Float, dot3D2:Array<Float>, vec3D2:Array<Float>, distance2:Float):Array<Array<Float>>

returns curve 3D ((x, y, z), (x, y, z), (x, y, z), (x, y, z)) with internal dots, calculated use offset from border dots along levers to distances. The resul curve 3D have 4 dots 3D, two border dots incoming, and two internal dots calculated. Result will [dot3D1, dot3D1offset, dot3D2offset, dot3D2]

Parameters:

dot3D1
  • dot 3D (x, y, z) start curve incoming dot
vec3D1
  • vector 3D (a, b, c) for offset start internal dot
distance1
  • distance for offset start internal dot along offset vector
dot3D2
  • dot 3D (x, y, z) end curve incoming dot
vec3D2
  • vector 3D (a, b, c) for offset end internal dot
distance2
  • distance for offset end internal dot along offset vector

@:value({ a_s : -1, lever2 : 0.55, lever1 : 0.55 })staticcurve3D_3dots (dot3D0:Array<Float>, dot3D1:Array<Float>, dot3D2:Array<Float>, lever1:Float = 0.55, lever2:Float = 0.55, a_s:Int = -1):Array<Array<Float>>

returns curve 3D ((x, y, z), (x, y, z), (x, y, z), (x, y, z)). Shape of result curve will be close to arc (1/4 ellipse). Allowed few variants of result curve modification(distortion). Default lever1 and lever2 values equal 0.55. The 0.55 value in case of bezier cubic 3D curve will create shape close to ellipse arc.

Parameters:

dot3D0
  • center of ellipse trajectory dot 3D (x, y, z)
dot3D1
  • first arc dot 3D (x, y, z)
dot3D2
  • last arc dot 3D (x, y, z)
lever1
  • length of offset the first support dot along lever1 vector (depended of a_s)
lever2
  • length of offset the last support dot along lever2 vector (depended of a_s)
a_s
  • arc style. Determine of arc calculation way. if a_s > 0 then lever1 vector will be directed from dot3D0 to dot3D1. lever2 vector from dot3D0 to dot3D2 if a_s < 0 then lever1 vector will be directed from dot3D0 to dot3D2. lever2 vector from dot3D0 to dot3D1 if a_s = 0 then lever1 vector will be paralleled lever2 vector and both will be directed from dot3D0 to dot between dot3D1 and dot3D2 center dot

staticline3D_2dots (dot3D0:Array<Float>, dot3D1:Array<Float>):Array<Array<Float>>

returns line 3D ((x, y, z), (x, y, z), (x, y, z), (x, y, z)). Which is (dot3D0, 1/3 offset, 2/3 offset, dot3D1). Comfort for use as bezier cubic curve 3D as straight line

Parameters:

dot3D0
  • start line dot 3D
dot3D1
  • end line dot 3D

staticline3D_dot_offset (dot3D:Array<Float>, vec3D:Array<Float>, distance:Float):Array<Array<Float>>

returns line 3D ((x, y, z), (x, y, z), (x, y, z), (x, y, z)). Just call line3D_2dots with precalculated second dot 3D

Parameters:

dot3D
  • start line dot 3D
vec3D
  • offset start line dot vector 3D
distance
  • offset distance for end line dot

staticinlinecurve3D_4to12 (curve:Array<Array<Float>>):Array<Float>

returns curve 3D as 12 coordinates, recounted from 4 dots 3D. [[x, y, z], [x, y, z], [x, y, z], [x, y, z]] return [x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4]

Parameters:

curve
  • curve 3D ((x, y, z), (x, y, z), (x, y, z), (x, y, z))

staticinlinecurve3D_12to4 (curve:Array<Float>):Array<Array<Float>>

returns curve 3D as 4 dots 3D, recounted from 12 coordinates. [x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4] return [[x, y, z], [x, y, z], [x, y, z], [x, y, z]]

Parameters:

curve
  • curve 3D data (x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4)

staticinlinebeziercubic3D_derivativeparameters (curve:Array<Array<Float>>):Array<Array<Float>>

beziercubic3D_derivative bonus function. returns parameters for derivative calculation. [[x1, y1, z1], [x2, y2, z2], [x3, y3, z3], [x4, y4, z4]] return [[x1,x2,x3,x4],[y1,y2,y3,y4],[z1,z2,z3,z4]]

Parameters:

curve
  • bezier cubic curve 3D ((x1, y1, z1), (x2, y2, z2), (x3, y3, z3), (x4, y4, z4))

staticinlinebeziercubic_derivative (bcp:Array<Float>, p:Float):Null<Float>

return bezier cubic curve derivative for each dimension. Usual case x or y or z

Parameters:

bcp
  • bezier curve derivative parameters, precalculated uses beziercubic3D_derivativeparameters(...)
p
  • bezier cubic curve parameter. Standart values equal range 0...1 include borders

staticbeziercubic3D_derivative (curve:Array<Array<Float>>, p:Float):Array<Float>

returns bezier cubic curve 3D derivative

Parameters:

curve
  • bezier cubic curve 3D ((x, y, z), (x, y, z), (x, y, z), (x, y, z))
p
  • bezier cubic curve parameter. Standart values equal range 0...1 include borders

staticinlinebeziercubic_support_dot_one (beziercubic_one_axis_coordinates:Array<Float>):Null<Float>

returns cubic bezier curve support dot one(first lever) paramater for each coordinate. Usual case x or y or z

Parameters:

beziercubic_one_axis_coordinates
  • [c1,c2,c3,c4]. Where c is cubic bezier curve trajectory dots values for one of x or y or z

staticbeziercubic3D_support_dot_one (curve3D_4dots:Array<Array<Float>>):Array<Float>

returns dot 3D, which is bezier cubic curve 3D support dot one(first lever)

Parameters:

curve3D_4dots
  • curve 3D trajectory, which is [[x1, y1, z1], [x2, y2, z2], [x3, y3, z3], [x4, y4, z4]]

staticinlinebeziercubic_support_dot_two (beziercubic_one_axis_coordinates:Array<Float>):Null<Float>

returns cubic bezier curve support dot two(second lever) paramater for each coordinate. Usual case x or y or z

Parameters:

beziercubic_one_axis_coordinates
  • [c1,c2,c3,c4]. Where c is cubic bezier curve trajectory dots values for one of x or y or z

staticbeziercubic3D_support_dot_two (curve3D_4dots:Array<Array<Float>>):Array<Float>

returns dot 3D, which is bezier cubic curve 3D support dot two(second lever)

Parameters:

curve3D_4dots
  • curve 3D trajectory, which is [[x1, y1, z1], [x2, y2, z2], [x3, y3, z3], [x4, y4, z4]]

staticinlinebeziercubic3D_follow_4dots_trajectory (dots:Array<Array<Float>>):Array<Array<Float>>

returns bezier cubic curve 3D, calculated from 4dots 3D(curve 3D trajectory)

Parameters:

dots
  • curve 3D trajectory. Must be of the form [[x1, y1, z1], [x2, y2, z2], [x3, y3, z3], [x4, y4, z4]]

staticinlinebeziercubic_coordinate (beziercubic_one_axis_coordinates:Array<Float>, parameter:Float):Null<Float>

returns bezier cubic coordinate for each one axis. Usual case x or y or z

Parameters:

beziercubic_one_axis_coordinates
  • Must be of the form (c1, c2, c3, c4). For case [[x1, y1, z1], [x2, y2, z2], [x3, y3, z3], [x4, y4, z4]] curve and x axis must be [x1, x2, x3, x4]
parameter
  • parameter of bezier curve equation. Usual case range 0...1 include borders

staticbeziercubic3Ddot (beziercubic3D:Array<Array<Float>>, parameter:Float):Array<Float>

returns dot 3D, belongs on bezier cubic curve 3D

Parameters:

beziercubic3D
  • curve 3D, which must be of the form [[x1, y1, z1], [x2, y2, z2], [x3, y3, z3], [x4, y4, z4]]. Which is [dot3Dstart, lever3Dstart, lever3Dend, dot3Dend]
parameter
  • parameter of bezier curve equation. Usual case range 0...1 include borders

staticinlinecurve3D_4dots_follow_beziercubic_trajectory (beziercubic3D:Array<Array<Float>>):Array<Array<Float>>

returns curve 3D, which is 4 dots 3D bezier cubic curve, recounted to 4 dots 3D curve. Two internal dots belongs on bezier cubic curve trajectory, with parameter 1/3 and 2/3

Parameters:

beziercubic3D
  • curve 3D, which must be of the form [[x1, y1, z1], [x2, y2, z2], [x3, y3, z3], [x4, y4, z4]]

staticinlinecurve3Doffset (curve3D:Array<Array<Float>>, vec3D:Array<Float>, distance:Float):Array<Array<Float>>

returns curve 3D, offsetted along vector 3D to specified distance

Parameters:

curve3D
  • curve 3D, which must be of the form [[x1, y1, z1], [x2, y2, z2], [x3, y3, z3], [x4, y4, z4]]
vec3D
  • vector 3D (a, b, c)
distance
  • displacement distance

@:value({ rad : false })staticinlinecurve3Drotate (curve3D:Array<Array<Float>>, dot3D:Array<Float>, vec3D:Array<Float>, angle:Float, rad:Bool = false):Array<Array<Float>>

returns curve 3D, rotated around axis(determined by dot 3D and vector 3D) to specified angle

Parameters:

curve3D
  • curve 3D, which must be of the form [[x1, y1, z1], [x2, y2, z2], [x3, y3, z3], [x4, y4, z4]]
dot3D
  • dot 3D. Used for rotation axis
vec3D
  • vector 3D. Used for rotation axis
angle
  • rotation angle
rad
  • if true then radians angle, default false (degrees angle)

staticinlinecurve3Dscale (curve3D:Array<Array<Float>>, scale_xyz:Array<Float>, dot3D:Array<Float>):Array<Array<Float>>

returns curve 3D, scaled relative base dot 3D, uses own scale for each axis

Parameters:

curve3D
  • curve 3D, which must be of the form [[x1, y1, z1], [x2, y2, z2], [x3, y3, z3], [x4, y4, z4]]
scale_xyz
  • scale for each axis. Must be of the form [sx, sy, sz]
dot3D
  • scaling center(base) dot 3D

staticinlineellipse2Dperimeter_ramanujan (semiaxis_a:Float, semiaxis_b:Float):Null<Float>

returns ellipse perimeter, calculated use ramanujan method. Result will be max from perimeters, calculated by two ramanujan methods, with negative errors

Parameters:

semiaxis_a
  • ellipse a semiaxes. Usual paralleled x axis
semiaxis_b
  • ellipse b semiaxes. Usual paralleled y axis

statictangent_centered_ellipse2Ddot (semiaxis_a:Float, semiaxis_b:Float, ellipse_dot2D:Array<Float>):Array<Array<Float>>

returns vector 2D, which is tangent of centered ellipse 2D

Parameters:

semiaxis_a
  • ellipse a semiaxes. Usual paralleled x axis
semiaxis_b
  • ellipse b semiaxes. Usual paralleled y axis
ellipse_dot2D
  • dot 2D belongs to the ellipse perimeter

staticinlineellipse_e_parameter (semiaxis_a:Float, semiaxis_b:Float):Null<Float>

returns ellipse e parameter (ellipse eccentricity)

Parameters:

semiaxis_a
  • ellipse a semiaxes. Usual paralleled x axis
semiaxis_b
  • ellipse b semiaxes. Usual paralleled y axis

staticellipse_c_parameter (semiaxis_a:Float, semiaxis_b:Float):Null<Float>

returns ellipse c parameter (elipse foci) ... фокальное расстояние (полурасстояние между фокусами)

Parameters:

semiaxis_a
  • ellipse a semiaxes. Usual paralleled x axis
semiaxis_b
  • ellipse b semiaxes. Usual paralleled y axis

statictangent_vec3D_in_plane_of_ellipse2D_placed_in_3Dspace (dot3D:Array<Float>, vec3Dnormal_ellipse_plane:Array<Float>, vec3Dsemiaxis_a_direction:Array<Float>, semiaxis_a:Float, semiaxis_b:Float, semiaxis_a_negative:Float, semiaxis_b_negative:Float, angle:Float, rad:Bool):Array<Float>

returns vector 3D, which is tangent of ellipse, belongs to the plane 3D

Parameters:

dot3D
  • ellipse center dot 3D (x, y, z)
vec3Dnormal_ellipse_plane
  • ellipse plane 3D normal vector (a, b, c)
vec3Dsemiaxis_a_direction
  • ellipse semiaxis direction vector 3D (a, b, c). Will be projected on plane, no need strictly vector in plane. enought not paralleled with ellipse plane normal vector
semiaxis_a
  • ellipse semiaxis a length
semiaxis_b
  • ellipse semiaxis b length
semiaxis_a_negative
  • ellipse opposite semiaxis a length. Directed to negative side from projection of vec3Dsemiaxis_a_direction vector
semiaxis_b_negative
  • ellipse opposite semiaxis b length. Same but for other semiaxis vector
angle
  • angle for calculating dot 3D, belongs to the ellipse. Calculating will be directed from positive semiaxis a to positive semiaxis b, for positive angle
rad
  • if true then radians angle, default false(degrees angle)

staticellipse3D_dots (dot3D:Array<Float>, vec3Dsemiaxes:Array<Array<Float>>, semiaxes:Array<Float>):Array<Array<Float>>

returns 9 dots 3D, ellipse center dot and 8 ellipse perimeter dots

Parameters:

dot3D
  • ellipse center dot 3D
vec3Dsemiaxes
  • array of semiaxes vectors 3D. Include 4 semiaxes vectors 3D. Must be of the form [[a1, b1, c1], [a2, b2, c2], [a3, b3, c3], [a4, b4, c4]]. Which is [a, b, an, bn], where an and bn is negative semiaxes direction vectors
semiaxes
  • array of semiaxes lengths. Must be of the form [a, b, an, bn]

@:value({ rad : false })staticinlineellipse2Ddot (angle:Float, semiaxis_a_ox:Float, semiaxis_b_oy:Float, rad:Bool = false):Array<Float>

returns dot 2D, which belongs to ellipse perimeter

Parameters:

angle
  • angle of ellipse from semiaxis a to semiaxis b direction, for positive angle
semiaxis_a_ox
  • semiaxis a length
semiaxis_b_oy
  • semiaxis b length
rad
  • if true then radians angle, default false(degrees angle)

@:value({ rad : false })staticcurve2D_4dots_elliptic_shape_restricted_to_quarter (angle0:Float, angle1:Float, semiaxis_a_ox:Float, semiaxis_b_oy:Float, rad:Bool = false):Array<Array<Float>>

returns curve 2D, which have ellipse shape restricted to quarter

Parameters:

angle0
  • start angle from semiaxis a to semiaxis b direction
angle1
  • angle from semiaxis a to semiaxis b direction started from end of angle0
semiaxis_a_ox
  • length of semiaxis a (ox)
semiaxis_b_oy
  • length of semiaxis b (oy)
rad
  • if true then radians angle, default false(degrees angle)

@:value({ rad : false })staticbeziercubic3D_elliptic_shape_restricted_to_quarter (dot3Dc:Array<Float>, vec3D_a_ox:Array<Float>, vec3D_b_oy:Array<Float>, semiaxis_a_ox:Float, semiaxis_b_oy:Float, angle0:Float, angle1:Float, rad:Bool = false):Array<Array<Float>>

returns bezier curve 3D, which have ellipse shape restricted to quarter. Result will have form [[x1, y1, z1], [x2, y2, z2], [x3, y3, z3], [x4, y4, z4]]

Parameters:

dot3Dc
  • center ellipse dot 3D
vec3D_a_ox
  • semiaxis a direction vector 3D
vec3D_b_ox
  • semiaxis b direction vector 3D
semiaxis_a_ox
  • semiaxis a length
semiaxis_b_oy
  • semiaxis b length
angle0
  • start angle from semiaxis a to semiaxis b direction
angle1
  • angle from semiaxis a to semiaxis b direction started from end of angle0
rad
  • if true then radians angle, default false(degrees angle)

@:value({ rad : false })staticangle_required_to_place_curve_on_ellipse (curve_length:Float, semiaxis_a_ox:Float, semiaxis_b_oy:Float, angle0:Float, rad:Bool = false):Null<Float>

returns angle required to place curve on ellipse. Max returned value is 360 degrees, or radians same value angle

Parameters:

curve_length
  • length of curve for placing on ellipse
semiaxis_a_ox
  • semiaxis a length
semiaxis_b_oy
  • semiaxis b length
angle0
  • start angle from semiaxis a to semiaxis b direction. Curve placing started from end of angle0
rad
  • if true then radians angle, default false(degrees angle)

staticpolygon3D_inside_ellipse (dot3D:Array<Float>, vec3Dsemiaxes:Array<Array<Float>>, semiaxes:Array<Float>, angle_proportions:Array<Float>):Array<Array<Float>>

returns polygon 3D dots array, which is poligon center dot and array of polygon perimeter dots. Result will have form [`dot3D`, dot3D(1), ... ,dot3D(`angle_proportion.length`)]

Parameters:

dot3D
  • polygon center dot 3D
vec3Dsemiaxes
  • base ellipse 4 semiaxes vectors, for creating polygon inside ellipse. Must be of the form [[a1, b1, c1], [a2, b2, c2], [a3, b3, c3], [a4, b4, c4]]. Which is [a, b, an, bn], where an and bn is negative semiaxes direction vectors
semiaxes
  • array of displacement values of polygon vetexes from center dot in ellipse plane
angle_proportions
  • proportions array for splitting 360 degrees angle(without units, not matter). [90, 90, 90, 90] returns result same as [1, 1, 1, 1], in both cases will be created quadrangle inside ellipse

staticpolygon3D_vec3Dfield_distances (dot3D:Array<Float>, vec3Dfield:Array<Array<Float>>, distances:Array<Float>):Array<Array<Float>>

polygon on vectors and displacements. Can be not belongs to one plane 3D. returns polygon 3D dots array, which is poligon center dot and array of polygon perimeter dots. Result will have form [`dot3D`, dot3D(1), ... ,dot3D(`distances.length`)]

Parameters:

dot3D
  • polygon center dot 3D
vec3Dfield
  • polygon vertexes vector field(array of vectors 3D). Each Vertex will be offsetted along own vector
distances
  • polygon vertexes radial distances array(offset length)

staticpolygon3D_in_plane (dot3D:Array<Float>, vec3Dplane_normal:Array<Float>, vec3Dsemiaxis_a_direction:Array<Float>, angle_proportions:Array<Float>, distances:Array<Float>):Array<Array<Float>>

polygon belongs to plane 3D. returns polygon 3D dots array, which is poligon center dot and array of polygon perimeter dots. Result will have form [`dot3D`, dot3D(1), ... ,dot3D(`angle_proportion.length`)].

Parameters:

dot3D
  • polygon center dot 3D
vec3Dplane_normal
  • polygon plane normal vector 3D
vec3Dsemiaxis_a_direction
  • semiaxis a, will be used as start vector of first vertex. Every next vertex will be calculated uses vec3Dsemiaxis_a_direction vector rotation (CCW direction, if look from end of vec3Dplane_normal vector) to specified angle and offset to specified distance
angle_proportions
  • proportions array for splitting 360 degrees angle(without units, not matter). [90, 90, 90, 90] returns result same as [1, 1, 1, 1], in both cases will be created quadrangle belongs to plane
distances
  • polygon vertexes radial distances array(offset length)

staticpolygon3D_to_vec3Dfield (polygon3D:Array<Array<Float>>):Array<Array<Float>>

returns vector field, which is vectors 3D, calculated from polygon center dot to each vertex. Result will have form [[a, b, c], ... , [a, b, c]], depend of incoming data length

Parameters:

polygon3D
  • must be of the form [ polygon center dot 3D, polygon vertex first dot 3D , ... ,polygon vertex last dot 3D ]

staticprojection_vec3D_on_plane3D (vec3D:Array<Float>, plane3D:Array<Float>):Array<Float>

returns vector 3D, which is vec3D vector projection on plane3D plane

Parameters:

vec3D
  • vector 3D (a, b, c)
plane3D
  • plane 3D (a, b, c, d), where (a, b, c) normal vector of plane, and (d) displacement from (0, 0, 0)

@:value({ rad : false })staticangle_vec3Dvec3D_projection_on_plane3D (vec3D1:Array<Float>, vec3D2:Array<Float>, plane3D:Array<Float>, rad:Bool = false):Null<Float>

returns angle, which is projection of angle between vec3D1 and vec3D2 vectors to plane3D

Parameters:

vec3D1
  • vector 3D (a, b, c)
vec3D2
  • vector 3D (a, b, c)
plane3D
  • plane 3D (a, b, c, d), where (a, b, c) normal vector of plane, and (d) displacement from (0, 0, 0)
rad
  • if true then radians angle, default false(degrees angle)