The code is very simple because we have built into the environment many different visual tools that would normally require importing libraries or making function calls that have nothing to do with coding the actual rules of the simulation. This reduces the amount of code to the bare essentials and allows students to focus on coding the computations needed to simulate nature.
The Coding Panes
In Tychos, you write your code in two different panes. One pane (Initial State) is used for establishing your simulation's initial conditions. The Calculations pane is the program's main loop. This is similar to how an Arduino program or a Processing program is structured with a setup() function and a loop() function.
This simple structure allows students to clearly define the variables that they need, and then code the updating of those varaibles in a separate area, keeping the code organized and clearly identified.
A Projectile in Tychos
A Projectile in VPython
To illustrate the reduction in code that is accomplished using Tychos, take a look at the VPython code below for creating a simulation of a projectile.
We have highlighted the lines of code that are not needed in Tychos. Although we love VPython, we built Tychos to be a simulation buidling tool from the ground up, eliminating the need to code some of the more common features in a computational modeling environment.