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