Docs
Getting started
Write, preview, and export one small physics scene.
PhysLoom compiles a short physics description into a diagram and motion. You do not place every pixel first. Describe what exists and how it is connected, then let the layout engine resolve the geometry.
Open Studio
Open Studio. The model is on the left and its result is on the right. The preview updates as you edit. When the model is incomplete, diagnostics point to the relevant statement.
Write the first scene
This scene contains a support, one pulley, and two loads. The rope is named R so its tension can be selected explicitly:
scene first_pulley
support ceiling orientation=horizontal
load A 2kg
load B 3kg
pulley P
P <-> ceiling
rope R
R: A -> P -> B
animate A speed=0.24
show R A.forces A.motion B.forces B.motion
Change a mass value and watch the diagram, acceleration, and force information update. A, B, and P are identifiers; later statements refer to those same entities.
Read the feedback
Studio separates two kinds of problem:
- Syntax diagnostics mean a line could not be parsed, usually with a line number and suggestion.
- Model diagnostics mean the statement is valid, but a connection is incomplete or violates a constraint.
Fix the first diagnostic first. Later messages can be consequences of that one error.
Export the result
The toolbar exports SVG and PNG, and it can download the original .phys source. Prefer SVG for articles and slides because it stays sharp at any size. PNG is convenient for messages and documents that do not accept SVG. Keep the .phys file when you want to edit the model again.
Continue with DSL basics to see how entities, connections, and presentation statements work together, or open Model recipes and modify the closest working example.