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, a pulley, two bodies, and one rope:

scene first_pulley {
  support ceiling
  pulley P fixed to ceiling
  body A mass=2kg
  body B mass=3kg
  rope R path body(A) -> around(P) -> body(B)

  show tension
}

Change a mass value and watch the diagram and force information update. The names A, B, P, and R are identifiers. Later statements use them to refer to the 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, PNG, or a complete project. 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.

Continue with DSL basics to see how entities, connections, and presentation statements work together.