Marketplace › From Ordinate 2D
Measure friction by tilting
Tilt a platform slowly: the block slips when tan θ = μ.
Use in Ordinate 2DOpens in the Script tab: it runs when you press Run. Free, no account needed.
"""Measuring friction by tilting: a block starts to slide when tan θ = μ.
The platform is tilted slowly (2° per second). The script notes the angle at which the block first moves
(a speed above 2 cm/s) and compares tan θ with the block's coefficient of static friction, 0.45.
Runs in the studio (Script tab → Run) and locally: python3 friction_critical_angle.py
"""
import math
import studio as s
MU, RATE = 0.45, 2.0 # static friction; degrees per second
THICK = 0.2
s.clear()
s.gravity = (0, -9.81)
platform = s.box(0, 0, 5, THICK, static=True, name="Platform", friction=MU, color="#8b939b")
block = s.box(0, THICK / 2 + 0.15, 0.5, 0.3, mass=2, name="Block", friction=MU, restitution=0, color="#e5484d")
slipped = False
@s.on_start
def begin():
global slipped
slipped = False
platform.angle = 0
@s.on_step
def tilt(t, dt):
global slipped
if slipped:
return
angle = math.radians(RATE * t)
platform.angle = -angle # the platform's right end goes down: the block slides to the right
if round(t / dt) % 24 == 0:
s.record(t=t, angle_deg=RATE * t, tan_angle=math.tan(angle), block_speed=block.speed)
if t > 1 and block.speed > 0.02:
slipped = True
print(f"it slipped at {math.degrees(angle):.1f}°: tan θ = {math.tan(angle):.3f}, μ = {MU}")
s.stop()
s.run(30)