SimSketch

A drawing-based modelling and simulation platform for science and maths education. Learners sketch a phenomenon, give its parts behaviours, and run the drawing.

What it is

SimSketch is a ground-up rebuild of the research-based SimSketch drawing-to-simulation tool (Bollen & van Joolingen, 2013). A learner draws the objects in a phenomenon, gives them behaviours such as orbit, wander, eat or reproduce, and presses play. If the result isn’t what they expected, they change the drawing and run it again.

I design and develop it at Utrecht University’s Faculty of Science, supervised by Prof. Dr. W.R. van Joolingen. That covers product and UX design, frontend, backend, security, testing and deployment.

Four studios in one codebase

One Flutter codebase runs in the browser and natively on five operating systems. It is offline-first: every studio works without a network, AI features work with the user’s own key and no account, and cloud features degrade gracefully.

  • Sandbox: multi-agent simulation with 22 composable behaviours, including predation, flocking, SIR epidemics, orbits and raycast light
  • Ecology: a population lab with live graphs
  • Gears: involute meshing, compound axles, chain drives and jam detection
  • Math Studio: a custom expression compiler with Euler, RK2 and RK4 integrators

A faster, frame-rate-independent physics engine

I rewrote the 2D physics engine around velocity Verlet sub-stepping, impulse contacts with Coulomb friction and a sort-and-sweep broad phase. Step time at 200 bodies fell from 15 ms to 0.5 ms, and results no longer depend on the frame rate.

An AI assistant that proposes, not decides

The assistant works with Gemini, OpenAI or Claude and has Socratic and directive teaching modes. It reads the live workspace and proposes changes as schema-validated JSON, which learners accept or reject. It can also turn text into drawings and photos into models.

Guard rails include prompt-injection screening, strict output validation, rate limiting and API keys held in the system keystore.

Tools for teachers

In the Customizer Studio, teachers choose the studios, behaviour palette, starter scene and AI policy for a lesson and publish it as a link. They can build new behaviours with visual blocks, a composite mixer or a small scripting language. All three compile to a JSON AST that a sandboxed, deterministic interpreter runs without eval.

The optional Firebase backend adds classrooms with join codes, submissions and feedback, teacher and admin dashboards, moderation and audit logging. Staff accounts use TOTP two-factor authentication, and Firestore access is governed by role-based security rules.