ball.pos

Syntax

v = ball.pos(bp)
ball.pos(bp) = v

Get/set the ball position.

Returns:v - ball position vector
Accepts:v - ball position vector
Arguments:bp - ball pointer

Component Access

f = ball.pos (bp)->x
ball.pos (bp)->x = f

f = ball.pos.x(bp)
ball.pos.x(bp) = f

Get/set the \(x\)-component of the ball position.

Returns:f - \(x\)-component of the ball position vector
Accepts:f - \(x\)-component of the ball position vector
Arguments:bp - ball pointer

Access other vector components (\(y\), \(z\) (3D ONLY)) by substituting the component name where \(x\) appears above. See Member Access Operator for information about accessing members from data types using ->.

Deprecated Component Access

Component access by adding an optional integer in the function arguments (e.g., f = ball.pos(bp,3)) is deprecated. It remains available but will not be supported in future versions. See Component Access with Integers in FISH on the Deprecated Commands and FISH page for details.

This is hidden. Added to include remaining tensor component access functions for inline help.

f = ball.pos.y(bp)
f = ball.pos.z(bp) (3D ONLY)