Share

compute_velocity

This computes the velocities between two frames for a given geometry, and stores it on the geometry. This is useful to provide velocities for moving meshes that are used in a simulation. Normally simulations will automatically compute velocities on input source or collider meshes, but this could be used for a custom solver. Another use is before a convert_to_volume so that the volume has velocities. This compound cannot be called inside a loop (such as do_while or for_each) because it uses a feedback port to keep the previous state of the geometry. However one can pass in an array of objects and it will output an array, thus loops should not be needed.

Inputs

geometry

Connect a single geometry or an array of geometry. These currently must be point objects or meshes. If the number of points or topology changes from the last frame the computed velocity will be zero.

start_frame

This is the frame to start computing velocities from. The computed velocity will be zero at or before the start frame, then subsequent frames will use the difference of position with the last frame to compute velocity.

Outputs

out_geometry

This is the input geometry (either a single object or an object array, depending on the input) with the additional computed geo properties point_velocity and point_velocity_prev (the velocity for the previous frame).

Was this information helpful?