calculate_torque
Compute rotational force (torque) from force and position vectors using the cross product formula τ = r × F. Determine torque magnitude and direction for applications like door hinges, wrenches, and motors.
Instructions
Calculate torque from force and position: τ = r × F (cross product).
Torque is the rotational equivalent of force. It causes angular acceleration
and depends on both the force magnitude and the distance from the pivot point.
Args:
force_x: X component of force in Newtons
force_y: Y component of force in Newtons
force_z: Z component of force in Newtons
position_x: X component of position vector from pivot to force application (meters)
position_y: Y component of position vector from pivot to force application (meters)
position_z: Z component of position vector from pivot to force application (meters)
Returns:
Dict containing:
- torque: Torque vector [x, y, z] in N⋅m
- magnitude: Torque magnitude in N⋅m
Tips for LLMs:
- Torque direction follows right-hand rule (perpendicular to force and position)
- Maximum torque when force is perpendicular to position vector
- Zero torque when force is parallel to position vector
- Use for: wrenches, door hinges, motors, gears
Example - Opening a door:
result = await calculate_torque(
force_x=50.0, # Push perpendicular to door
force_y=0.0,
force_z=0.0,
position_x=0.0,
position_y=0.0,
position_z=0.8 # 0.8m from hinge
)
# Torque = 40 N⋅m
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force_x | Yes | ||
| force_y | Yes | ||
| force_z | Yes | ||
| position_x | Yes | ||
| position_y | Yes | ||
| position_z | Yes |