::hwat::math::PointOnVector

Finds a point on a vector at a given distance from the tail (starting point) of the vector. If the distance is given in percentage, it finds a point at percentage of the total vector length.

Syntax

::hwat::math::PointOnVector {startpnt} {endpnt} distance

Arguments

startpnt
Tcl list of x, y, and z coordinates of the tail node of the vector.
endpnt
Tcl list of x, y, and z coordinates of the tip node of the vector.
distance
Distance to find the point at.
Default = 50%.

Returns

Success
Tcl list of the x, y and z coordinates of the point on the vector.
Failure
{}

Example

set newLoc [PointOnVector [list 0.0 0.0 0.0] [list 10.0 8.5 7.0] 20 ]

Comments

This is an N-dimensional operation. Both lists must be the same length and the return list will also be the same length as the input lists.