Vector Lerp¶
Functionality¶
This node’s primary function is to perform the linear interpolation between two Vectors, or streams of Vectors. If we have two Vectors A and B, and a factor 0.5, then the output of the node will be a Vector exactly half way on the imaginary finite-line between A and B. Values beyond 1.0 or lower than 0.0 will be extrapolated to beyond the line A-B.
Inputs¶
Vector Evaluate needs two Vertex stream inputs (each containing 1 or more vertices). If one list is shorter than the other then the shortest stream is extended to match the length of the longer stream by repeating the last valid vector found in the shorter stream.
Parameters¶
Param |
Type |
Default |
Description |
---|---|---|---|
mode |
Enum |
Lerp |
Lerp will linear interpolate once between
Evaluate will repeatedly interpolate
|
Vertex A |
Vector |
None |
first group of vertices (Stream) |
Vertex B |
Vector |
None |
second group of vertices (Stream) |
Factor |
Float |
0.50 |
distance ratio between vertices A and B. values outside of the 0.0…1.0 range are extrapolated on the infinite line A, B |
Outputs¶
The content of EvPoint depends on the current mode of the node, but it will always be a list (or multiple lists) of Vectors.
Example of usage¶
0.5
Vector-> Vector In
List->List Main-> List Join
Viz-> Viewer Draw
-0.5
Vector-> Vector In
List->List Main-> List Join
Viz-> Viewer Draw
1.5
Vector-> Vector In
List->List Main-> List Join
Viz-> Viewer Draw
range float `0.0 … 1.0 n=10` Evaluate
Number-> Number Range
Vector-> Vector In
Viz-> Viewer Draw
range float `0.0 … 1.0 n=10` Lerp
Number-> Number Range
Vector-> Vector In
Viz-> Viewer Draw
Lerp interpolation with noise
Generator-> Circle
Vector-> Vector Noise
A*SCALAR: Vector-> Vector Math
Matrix-> Matrix In
Viz-> Viewer Draw
The development thread also has examples: https://github.com/nortikin/sverchok/issues/1098
See also¶
Number-> Mix Inputs
Vector-> Vector Interpolation
Matrix-> Matrix Interpolation