c4dynamics.states.state.state.velocity#
- property state.velocity#
Returns a vector of velocity coordinates.
If the state doesn’t include any velocity coordinate (vx, vy, vz), an empty array is returned.
Note
In the context of
velocity
, only vx, vy, vz, (case sensitive) are considered velocity coordinates.- Returns:
out (numpy.array) – A vector containing the values of three velocity coordinates.
Examples
>>> s = c4d.state(x = 100, y = 0, vx = -10, vy = 5) >>> s.velocity [-10 5 0]
>>> s = c4d.state(x = 100, vz = -100) >>> s.velocity [0 0 -100]
>>> s = c4d.state(z = 100) >>> s.velocity Warning: velocity is valid when at least one velocity coordinate variable (vx, vy, vz) exists. []