# Algodoo

Algodoo (/ˌælɡəˈduː/) is a physics-based 2D freeware sandbox from Algoryx Simulation AB (known simply as Algoryx) as the successor to the popular physics application Phun. It was released on September 1, 2009 and is presented as a learning tool, an open-ended computer game, an animation tool, and an engineering tool.
The software is functional with desktop and laptop computers, touch screen tablets, and interactive white board systems such as SMART Boards. The physics engine in Algodoo utilizes the SPOOK linear constraint solver by Claude Lacoursière and a modified version of the Smoothed-Particle Hydrodynamics (SPH) computational method. On the App Store, it costs £4.99 and is only available for iPads.
This program has been used by many people including educators, students, and children. Algodoo has remained as a popular choice from websites like List Of Freeware and Download Cloud for a physics sandbox program due to its complexity, simple GUI and free price.

## History

In 2008, Emil Ernerfeldt created an interactive 2D physics simulator for his master's thesis project in computer science at Umeå University in Umeå, Sweden. This project was released for public and non-commercial use under the name "Phun" and gained considerable attention after a clip of Ernerfeldt using the software went viral on YouTube.
In May 2008, Ernerfeldt brought the Phun project to Algoryx Simulation AB, a company founded in 2007 by Ernerfeldt's former supervisor at Umeå University, Kenneth Bodin. In 2009, Phun was rereleased under the name "Algodoo" (a combination of the words algorithm and do). The name change was motivated by the fact that the word "phun" is used by many sites deemed inappropriate for younger users and the fact that trademarking "phun" was nearly impossible.
In October 2011, Algoryx released two new versions: Algodoo for Education and Algodoo 2.0.0. In February 2017, Algodoo for iPad was updated to version 2.1.2 to maintain functionality with iOS 10. Beginning in April 2024, Algoryx began releasing public betas for version 2.2.0, bringing 64-bit support to Windows, support for Apple Silicon, and fixes to several long-standing issues. This culminated with the stable release of version 2.2.1 on all platforms.

## Graphical user interface

Algodoo's graphical user interface (GUI) incorporates several moveable toolbars generated around the edges of the screen including the top menu toolbar, the browser toolbar, the (general) toolbar, the tool options toolbar, the simulation controls/environment toolbar, and the properties toolbar. Among other things, these toolbars provide the user with the options to change language; run tutorials; browse and save scenes; find and share scenes online; draw, edit, and interact with scenes; zoom in and out; play and pause the simulation; undo and redo; turn on/off gravity, air friction, and a background grid; and change the properties of the selected object such as the material type and the color.
Within the (general) toolbar users can use the following tools to create and move shapes:
* Plane tool (A) - used to create infinite planes. Can also be drawn with the sketch tool by drawing a T shape pointing at the orientation of the plane.
* Brush tool (B) - used to draw shapes with brush strokes.
* Circle tool (C) - used to create circles. Can also be drawn using the sketch tool.
* Drag tool (D) - used to apply a force to an object while the simulation is running. Fluids and planes cannot be dragged.
* Tracer tool (E) - used to attach a tracer to an object (which draws the path of where that object has traveled). Can also be drawn with the sketch tool by drawing a filled-in circle.
* Fixate tool (F) - used to weld an object to the object behind it or the background. Can also be drawn with the sketch tool by drawing a teepee shape, like an hourglass but without the top.
* Gear tool (G) - used to create gears with axles.
* Axle tool (H) - used to connect an object with an underlying object or the background with an axle. Can also be drawn with the sketch tool by drawing a small circle.
* Sketch tool (K) - a single tool with the functions of many of the other tools. Drawing a line going down that touches noting will play and pause. Going right or left will undo/redo.
* Laser pen tool (L) - used to create a laser.
* Move tool (M) - used to move objects.
* Chain tool (N) - used to create chains and ropes. Can also be drawn with the sketch tool by drawing a line that goes to an object.
* Thruster tool (O) - used to attach a thruster to an object.
* Polygon tool (P) - used to draw free form shapes.
* Scale tool (R) - used to change the size of the object (along both axes equally with SHIFT, by integer values such as 2x or 3x with CTRL).
* Spring tool (S) - used to connect two objects with a spring (or to connect a single object and the background in a similar fashion). Can also be drawn with the sketch tool by drawing a line with a loop that goes to an object.
* Knife tool (T) - used to cut polygons along a drawn line. Can also be done with the sketch tool by drawing a line that passes through an object.
* Texture tool (U) - used to move, scale, and rotate the texture of an object (texture used here as in the mapping sense to refer to applying a picture to an object).
* Box tool (X) - used to create rectangles (or squares with SHIFT). Can also be drawn with the sketch tool by drawing a rectangle or square.
* Rotate tool - used to rotate objects.
* Erase tool - used to erase objects.
The drop-down menu (accessed by double clicking or right clicking an object) includes several tools for liquifying objects; turning them into sponges; cloning them; mirroring them; generating plots of physics-relevant quantities of the object (such as velocity vs. time or y-position vs. x-position); selecting objects in various ways; changing the appearance of objects (including the option to toggle the presence of velocity, momentum, and force vectors); assigning text to an object; changing the simulated material of the object (including parameters such as density, mass, friction, restitution, refractive index, and attraction); assigning and changing an object's linear and angular velocity; showing a list of information about an object (including the area, mass, moment of inertia, position, velocity, angular velocity, momentum, angular momentum, total energy, kinetic linear energy, kinetic angular energy, potential energy (gravity), potential energy (attraction), and potential energy (spring)); assigning objects to various collision layers; performing "geometry actions" such as gluing objects to the background, loosening them, adding center axles, adding center thrusters, attaching tracers, transforming the object into a gear, or transforming the object into a circle; editing objects via 2D constructive solid geometry (CSG); assigning keystrokes for controlling the object; and for opening a scripting menu for the selected object(s).
User-created simulations in Algodoo are referred to as scenes. With the tools listed above, users can create complex scenes. The easily accessible tools in Algodoo allow new users to quickly create simple things like cars or basic machines, while still allowing more experienced users to make more complex constructions like intricate Rube Goldberg machines.

### Major changes in the GUI since Phun

Although Algodoo's GUI is essentially the same as in Phun, many significant changes were made in the available functionality. Two notable changes include a new optics modeling engine and a snap-to-grid feature allowing for higher precision scene creation. The inclusion of the optics modeling engine granted much more freedom in terms of using Algodoo's scripting language, Thyme, as users were thereafter able to initiate events by hitting an object with a stream of laser light. Other notable changes include the addition of a velocity menu, which allows users to set a geometry's velocity to a set value; incompressible water, which allows for much more realistic fluid simulation; the plotting menu; vector visualization; and many other new features, bug fixes, and improvements.

## Educational research

In 2011, a computer science master's student at Umeå University, Emanuel Dahlberg, completed his thesis on using the 2D mechanics in Algodoo to model electricity for the purposes of education. Several projects have since been published exploring how teachers can use Algodoo to help students learn about perpetual motion machines, the buoyant force, Archimedes' principle, Newton's cradles, rolling motion, oblique projectile motion, light refraction, and even Kepler's laws. Many of these studies highlight how Algodoo provides students with a unique environment to learn physics. One paper claims that allowing students to explore physics concepts in Algodoo motivates them to engage creatively in the classroom while "serving as a first step into the world of computing modeling in physics". Algodoo is largely based upon a constructionist learning paradigm.
Outside of physics education, Algodoo has been used as a stepping stone for testing machines in a simulation before building them in the real world due to its simple user interface and quick learning curve compared to other physics simulators. According to Hackaday, "[Sarah] turned to Algodoo, a physics simulation where anyone can put shafts on rotating hubs, spin everything up, and see what happens."

## File sharing

Originally, the upload system for Phun was hosted by a small website at the Academic Computer Club from Umeå University. The upload system was later moved to a Phunland site in an upload subdirectory and then moved again to the Phunbox file sharing directory created by Zuriki and Lukas Wolf (which contained 16,874 user uploads). After several more changes to the upload system, the directory was finally moved to the Algodoo website under the name Doobox. After a user suggested that Doobox might not be a good name for the file sharing system (it was also the name of a software company), the name was then changed to Algobox, which was suggested by Chronos.
Users of Algodoo can share the scenes they create via Algobox; the platform currently houses over 200,000 user-created scenes and is continuing to rise. Due to the decrease in the number of recent updates and Algodoo becoming free in 2013, many users have assumed that Algodoo is discontinued. After this, many long-time users abandoned the program, causing a sharp decline in scene submissions. However, in April 2024, Algoryx announced the beta for version 2.2.0.