Change Log
Last updated
Last updated
Scenarios can now be organized into collections. Simply click on the + button to add a collection:
To learn more, check out our documentation for a full description on how to organize your scenarios into collections.
A new pie chart widget has been added:
Check the Python API or the MathJs API for more details.
The font stying for labels can now be changed by specifying the font, or by setting the style attribute to a set of CSS style rules.
Check out the Python API or the MathJs API to learn how to make your label objects look fancier!
The labels that are added to circles, rectangles, ellipses and arcs can also be made fancier in the same way.
Labels can now be added to your buttons, and the buttons come in different styles as well:
Check the Python API or the the MathJs API for more details on how to add labels and styling to the buttons.
You can now set the width and height of the graph bar chart, pie chart and table widgets. This can be set to a pixel dimension or a percentage of the viewable world.
Graph widgets can now have their own plot rates, overriding the scenario's default plotting rate.
You can now change the mode of your graphs to be either "scatter" or "line" and you can also display them as filled or not filled
You can now add comments to your students’ code. This allows you to add feedback that they can easily view and then resolve.
This makes giving feedback on student work super efficient.
Just click on a line, add your comment, and then the student will see an icon next to the line number, and when they hover over that line, the comment will pop up!
Students can then remove the comment if they like by clicking on the trash icon button.
We have added some new enhanced features to our code editor:
Code completion for all standard Python language features.
Code folding.
Find and replace.
Hotkeys
You can now import other Python libraries as long as they are supported by Pyodide. Check here for an allowed list of imported Python libraries.
Here are the bug fixes we have recently made:
Due to an upgrade on our server, users weren’t able to make changes to their profile. You should now be able to change your own profile.
Teachers couldn’t delete classes, they could only archive them. Teachers can now delete classes.
The entire app crashed when a user deleted a line of code that had previously caused an error. We fixed that in the Python editor, but we are still working on fixing that bug in the MathJs editor…
Goal states were not always saving, so the goal states on the Scenarios Index were not in sync with the actual goal states of the scenario. That has been fixed.
We are excited to announce new Teacher Classes!
Teachers can now create classes, add students to those classes, and then choose scenarios from their own scenario index to that class.
Students join the class through a simple join code. Once they have joined, they can see a listing of scenarios that the teacher has included for that class. Students can then click on that scenario and then clone it.
Through the classes interface, the teacher can see the students who have cloned a particular scenario and even see the goals that they have achieved, if there are goals defined for that scenario.
To learn more, check out the guide on Creating and Managing Classes
You can now add sound to your scenarios! Through the audio object, there are several ways to add different types of sounds:
simple tones
generate audio oscillations
play audio files from a URL.
Check out our Python API or our MathJs API for more information on how to use the new audio tools.
You can now set the world extents, meaning the position and size of the world view, through the Python or MathJs API. This is really handy when you want to control what is being seen in the simulation window based on user input or based on some other data value - like the position of an object.
Check out the Python API or MathJs API to learn more.
Here are the bug fixes we have recently made:
The Console for Python scenarios was broken (whoops!) from a recent update. That has been fixed.
Signing up for a new account was confusing if you weren’t using the Google authentication method, so we clarified that for new users.
Goals were not working properly in MathJs. That has been fixed.
Sometimes a keyboard key would get “stuck” in the keys list, especially if a user was pressing more than one key at a time. Keys are being cleared properly from the list now.
We have added two new gradient fill options for many of the Tychos objects.
The radial gradient and linear gradient objects are used as fill parameters for the following objects:
circle
rectangle
ellipse
arc
poly_line
Check out our Python API or our MathJs API for more information on how to use the new gradient fills.
Teachers can now update the goals in student cloned scenarios with the click of a button. This allows a teacher to adjust goals (by adding, removing, or editing them) after students have already cloned the teacher's scenario and have started working on their clone.
We know that you don't always get those goals written correctly, and then it was a real pain to have the students have to re-clone your scenario once you found the mistake...now you can change your goals, and then click a button (see below) and the new goals are pushed to all existing clones.
We fixed a few bugs in this release:
Graph, Table and Bar Chart tools were not showing up in the main World view. They are now viewable.
In the Python coding interface, The Toggle, Input, and Button tools were breaking if the input was None
or the binding was None
.
When a tool had an error due to some setting value being incorrectly input, the app went into an error state, but the tool disappeared, and so the user couldn't correct the error in the tool. The tools now are viewable, even when the app is in an error state.
Menus (in Python) were not filling in the values with choices if the values were not specified, which they should have been. Also, values could ony be numerical, but now they are strings. NOTE: If you want a value to be interpreted as a numeric value, you will need to cast it - e.g. int(my_menu.value)
We have one more object that you can create for your scenarios - the arc! In MathJs or Python, you can now create an elliptical arc.
The start and end parameters specify the starting angular position of the arc (in radians) and the ending angular position of the arc along an elliptical curve. Just like the ellipse object, arc objects also are defined by a center position as well as a size that identifies the length of the major and minor axes.
There are also three options for drawing the arc object to the screen. use the mode
parameter. You can choose "chord" mode, which will draw a connecting line from the starting point of the arc to the ending point of the arc, if the arc has a border. The "open" mode does not draw the connecting line. Finally, the "pie" mode creates a "pie slice" from the arc. You can also set the no_fill
parameter so that the arc is not filled in with a color.
Check out our Python API or our MathJs API for more information on how to create arcs.
We have added some new Python libraries to Tychos that are now loaded by default so that you can easily import them into your scenarios. Here is a listing of all the libraries that you can now import:
You can also import many of the standard Python packages that are included in the standard installation of Python, like math
, random
, datetime
, etc.
In the Settings Pane, we have changed out the slider which set the value of your dt
variable (the delta time for each step in your Calculations) to a numerical input defining your step rate. So when you enter a value of 100, this means that Tychos will set your dt
value to 1/100 or .01 seconds. You can now enter a rate value of 1000 or even higher, but keep in mind that the simulation will most likely run in real time at a much slower rate because it take time for the code in Calculations to be executed. So setting the rate to a high value (>50) will make your simulations more accurate, but they will slow down.
Additionally, the screen refresh rate is about 50 fps, so additional steps won't be rendered to the screen. If you use the step button, you will actually render these steps in the World view.
All widgets now have an align
property so that you can align them to either the left or right side of the screen. This allows for more control over how your widgets appear on the screen when the scenario is loaded.
We fixed a few bugs in this release:
Python scenarios were not rendering arrow components. They should be visible now when you set the show_components
to True
.
The suffix
value in the meter()
widget was not displaying. This has been fixed.
When a Goal was deleted, it's associated "goal state" (FAIL/PASS) was not being deleted as well, so those orphaned goal states were visible in the Scenarios Index page. They will be removed as soon as the scenario is loaded by Tychos, removing any orphaned goal states.
You can now add a button UI control that allows you to hook into the button's click event. The button is styled like a classic video game from the 1980's, because we love those games! You can make the button any color you like as well!
To learn more, see our API for adding a button to your scenarios.
We are now using the amazing Plotly graphing library to render our graphs and bar charts in Tychos. There are now some nifty tools for downloading images of the graphs and bar charts, as well as zooming into a region of the graph. Just hover your mouse over the graph or bar chart to see these tool buttons display in the top right corner of the graph.
We upgraded to Pyodide 0.24 which runs on Python 3.11. This has made Python significantly faster - approximately x 1.25.
You can now hide the grid in your scenarios with just the click of a checkbox.
Objects can now be removed from the World using a simple API call remove
that all objects support.
We significantly changed the Console Hack Panel so that it now allows for input, much like a REPL. You can execute lines of code, even updating objects in the simulation. The Python Console also allows users to use the help() command to get some help with the Python API.
Errors are now reported to the Console rather than to the World view, reducing clutter, and making the errors more readable. Error handling in general has been improved throughout Tychos.
We also made various speed/efficiency improvements so that scenarios with multiple objects run much smoother.
We enhanced some of the collision detection functions in our Python and MathJs API's. Here is a list of the changes:
Collisions can be detected for circles and rectangles that are rotated around an axis besides their own center points.
Lines have been added to object detection.
Using either get_intersections
in the Python API or getIntersectionPoints
in the MathJs API returns the points where the object boundaries have intersected.
Tables are back! Sorry that we took tables away, we had an issue with them, and we wanted to re-design them anyway. Now rather than the table being hidden in the Hack Panel, you can now add them as a draggable, resizable widget that floats above your scenario.
You can add a table by defining a new table object in your Python or MathJs code or you can add a table through the Tools menu. Please check out our Python API or our MathJs API to learn how to do this programmatically.
You can learn more about how to use tables in your scenarios by watching this tutorial video.
You can now upload a comma separated values (CSV) file into your Tychos session and then reference that data within your scenario. To do this, you simply go to the Settings pane of the Hack Panel, and then click on the Upload CSV button and choose your CSV file.
Keep in mind that we don't save this file to our server, so if you refresh your browser, the file will need to be uploaded again in order to reference the data in file.
We have brought back a table display tool for viewing data as a table. You can use API calls in either our Python or our MathJs language interfaces, or alternatively, you can add a table by choosing the tool from the Tools menu.
For more details please see our Python API our MathJs API to learn how to add a table by typing a few simple lines of code.
To learn more about how to use tables, we also have a tutorial video that will get you started.
You can now upload comma separated values (csv) data into Tychos and use then access that data through our API. To upload the data, you will find a new panel in the Settings tab that allows you to click a button, choose your file (it must have .csv as the file extension) and then you can access the data in your scenarios.
To learn more about how to access data that you have uploaded, check out our Pythn API documentation, or our MathJs documentation.
degrees
and radians
functions fixed for MathJsOops! We accidentally switched these calculations in the MathJs API. The functions degrees
and radians
have been fixed. The old aliases for these functions have also been brought back so as to be backwards compatible - rad_to_deg
and deg_to_rad.
Many of our current videos are very outdated, and we are trying to get those updated as time permits. The first one to be updated is our front page "tour" video. Finally...ugh.
We have added Python as the default language for coding your Tychos simulations! This is a huge change to Tychos, and if you are used to writing your scenarios in MathJs, don't worry, you still can! We have made it so Tychos will create simulations using either of the languages.
Python is such a great language with so much support and interest in both the scientific world and the academic world, that we decided to add Python and then make it the default language.
To switch between languages, you simply choose it in the Settings tab, from the Coding Language drop down.
We are using Pyodide
as our Python in the browser implementation. Pyodide allows Tychos users to write scenarios using Python using the standard library, but you can also import many other modules, such as numpy and pandas!
We think that the power of Python, as well as the flexibility of writing code that might match what many users are already familiar with will be a huge improvement in writing Tychos simulations. All the standard Tychos objects still exist, and we have tried to maintain much of our Tychos API, with only minor changes to match the style and syntax of other popular Python libraries and tools such as VPython.
Please note there are some Python modules that are not compatible with Pyodide, and therefore Tychos. Please refer to this page to learn more.
Much of the interface has not changed, but there are some differences, such as the addition of a Console that displays the stdout.
We have added a number of new tools to the tool menu that you can add to a scenario for analyzing data or for accepting a user's input. These are essentially identical to the components that can be added to a scenario by writing code, but now you can add them directly through the Tools menu.
The tools that can now be added are: Ruler, Timer, Meter, Gauge, Graph, Bar Chart, Toggle, Slider, Input, Menu.
You can also edit any of these tools properties by clicking on the little "gear" icon on top left side of the tool's panel, which will reveal that tool's different settings.
To bind the tool to a variable in your scenario, you just need to reference that variable in the Binding setting. The tool will then display the value of the bound variable, or if its an input tool (Toggle, Slider, Menu, Input) it will update that variable's value in your scenario.
For tools that are used for displaying values, you can also have Tychos evaluate an expression. For example, it the image below, the graph plot sets are evaluated using math expression for the y axis values: t^2
and sin(2*t)
Which results in this graph:
Circles, Rectangles and Ellipses can now be displayed with borders. These borders can also be displayed as either the default solid border (style: "none") or dashed (style: "dash") or dotted (style: "dot").
Lines as well as Arrows can also now be styled in the same way.
Now you can add a bar chart for visualizing data in your simulations. BarChart
is a chart of data that is displayed as a set of bars representing an array of data values. Each BarChart
that is created will appear on the right side of the World View.
We have added one new measuring tool to Tychos so that you can measure the distance between two points on the screen as well as the angle. You will find this new tool in a new menu that we also created where we intend to put some other tools soon!
It's been quite some time since we added anything new to Tychos. That's because we have been busy working on a complete rewrite of our codebase as well as...well, you know, in a pandemic.
Most of what we have been working on will be unnoticeable for our users (hopefully!) but it gives us some added flexibility as we move forward with some new features that are in the pipeline.
We have added one new object that we think you will like - the PolyLine object. The PolyLine
object draws a series of connected lines between a given set of points. This object can be used to represent a complex path or a shape other than a circle or rectangle.
Example:
The new createPoints function allows you to create a certain number of [X, Y] points based on a mathematical expression. You define the minimum and maximum value for the domain, as well as the "step". The range is then evaluated based on an expression.
The expression has to be a string that can be evaluated by the Tychos engine as a function of "x":
This can be useful for a number of things such as creating a set of points for a PolyLine object (see above):
We have fixed a problem where the Input, Menu and Slider user control widgets were not allowing you to update their values unless the scenario was running. It is now possible to update the widgets, and then press the "play" button and the values are all immediately captured from the widget in the first frame of the simulation.
The Input
widget now allows you to define a limit to the maximum and minimum value that it will accept in the input as well as a step value.
You can override the step value by just inputting the value from the keyboard as opposed to clicking the step buttons, but the maximum and minimum values can only be overridden in the code.
We decided to add a new Circle and Rectangle object that are meant to replace the Particle and Block objects. We did this in order to reflect a more general use for these objects. This way, Circle and Rectangle objects reflect just their visual nature, not a functional nature. A circle could represent a particle, but can also represent a wheel, a ball, etc. A rectangle could be a block, but it could also be a table, the ground, a ramp, etc.
New Circle
Class
New Rectangle
Class
We have not removed the Particle and Block objects, so all your past scenarios will work. We just think, moving forward, these new object names will better represent a more generalized definition.
Please check out the Circle and Rectangle classes to learn how you can start using these objects in your scenarios.
You have been able to draw arrows and lines on the screen, but these were not treated as objects in their own right.
We decided to change that, and now Arrows and Lines are objects, much like the other objects in Tychos.
New Arrow
Class
New Line
Class
We have not removed the drawArrow
or drawLine
functions, so all your past scenarios will work. We just think, moving forward, these new objects will better represent a more generalized definition.
Please check out the Circle and Rectangle classes to learn how you can start using these objects in your scenarios.
Every object and user interface (UI) widget now can be initialized using a more easily readable and decipherable name:value
input. This allows you to identify all the attributes with a name value pair as opposed to a list of comma separated arguments.
For example, before when creating a Spring object, you had to write this:
Which forced you to know the correct order of the parameters. You can now input a named/value pair in any order:
Although it does mean that there is more to type, you don't need get the order correct, and the name allows you to identify which parameter is which. Any missing parameters will just be replaced by default parameters for those objects and UI widgets. Please check out our updated Language Reference for more details.
We have added two new UI widgets to Tychos; the Input
widget and the Menu
widget. These will add additional interactivity options to your simulations.
The Input
widget:
To add the widget to your scenarios, you only need one parameter title
:
To access the value in the Input widget, you just need to do this:
The Menu
widget:
To add this widget to your scenarios, you need two parameters, the title
and an array for choices
and an optional third array argument values
that represent the values corresponding to the choices
, though if you don't supply these, the choices
array is used in place of values
:
Top access the chosen value, you simply type this:
We have been making some important changes to all the Tychos simulation objects. We have added these three attributes to every object:
opacity
: A value from 0 to 1 (default) that sets the opacity level of the object: 0 = transparent, 1 = opaque.
visible
: A value of true
(default) which means the object is visible, or false
, which means the object is invisible.
motion_map
: A flag (true
or false
) for activating the Motion Map for this object.
Motion maps are now activated by an attribute flag for each object in your simulation (see above). If an object's motion_map
attribute is set to true
, then a motion map will be displayed for this object.
Additionally, we have added a new setting in the Settings Panel where you can set the maximum motion map strobe images that will be displayed. This sets the number of motion map strobe images per object, so if you set this to 10, then each object in your scenario that has their motion_map
attribute set to true
, will display a maximum of 10 strobe images.
Limiting the number can be helpful for two reasons. It can reduce clutter on your screen and improve performance/speed of your simulation.
We want to apologize because we have noticed that there has been an inconsistency in how angles have been dealt with in Tychos. Object angles of rotation tended to be in degrees, while many of the functions in Tychos return angles in radians. That required annoying translation.
So we decided to standardize all angle values to radians. You can still translate between radian values and degree values using our helper conversion functions:
degrees(angle)
: takes a radian input angle and returns the angle in degrees.
radians(angle)
: takes a degree input angle and returns the angle in radians.
This may affect existing scenarios that have used functions that have by default expected degree inputs or returned degree outputs.
The Scenarios page now displays the goal status of each Goal in the scenario. This is true for your scenarios as well as the scenarios of anyone who clones your scenarios. If you are a teacher, this means that you will be able to now easily see your students' progress.
You can move your mouse over the green "check", red "X" or grey "?" to get a goal description, making it easy to see the goal associated with the goal status.
When Tychos detects a change to the goal status in a scenario, the user can update that new goal status by saving the scenario. If they don't save the scenario, the goal status will not be updated.
A "?" status indicates that the goal has not been tested because the goal when condition has not been met. For more details, please see Writing Goals.
Tychos now provides a way to access all the variables defined in the simulation at any frame. When writing goals it is often useful to compare a variable's value from one point of the simulation to another. For example, you might want to check if a Particle has moved, or accelerated. You can now do this because all your variable values are stored for each frame of the simulation.
To access a frame, you can simply type:
This captures all the variables values at frame 10. This is essentially a snap-shot of the simulation at that frame. To access an object and its properties (for example, the position of a particle) you simply use the "dot" notation:
This allows you to compare attributes of various objects or variables from one frame to another. So for example we can test to see if the "puck" particle has moved a certain distance by a specified time:
In this case the Goal is:
Description: "Move the particle a distance of 10 from the origin after two seconds."
When Condition: "t == 2
"
Victory Condition: "distance(frame(0).puck.pos, puck.pos) == 10
"
The victory condition in this case calculates the distance between the position of the "puck" particle's position at frame 0 and the current position of the "puck" particle when the time is 2 seconds.
You could also use frames to test if a particle is moving in a specific direction:
We think this is a great improvement to writing better Goals, and we hope you like it.
We have added some new useful functions. Here is a list of those functions and briefly what each one does:
between(value, min, max)
:
This function allows you to see if a value is between a minimum value and a maximum value. It is exclusive.
constrain(value, min, max)
:
This function takes a value and then constrains it to a minimum value or a maximum value.
perpCW(vec)
:
This function returns a two dimensional matrix representing the clockwise perpendicular vector of the given vector.
perpCCW(vec)
:
This function returns a two dimensional matrix representing the counter-clockwise perpendicular vector of the given vector.
We have greatly enhanced two functions for helping model collisions. Collision detection and resolution are typically quite difficult for students to program. We have added the ability to detect as well as assist in the modeling of collision resolution much easier. The functions and how they have been enhanced are listed below:
hasCollided(source, target)
:
This function takes two objects (Particle
or Block
) as its arguments and then returns true or false if the two objects are overlapping.
getIntersect(source, target)
:
This function returns a two dimensional matrix representing the minimum translation vector (MTV) that would be needed to separate two objects when they overlap. This can be used to simulate collision forces based on the magnitude and direction of the MTV.
For some good examples of how these functions can be used to model realistic collisions, check out these demonstrations:
We have made some significant improvements in load times for Tychos when you first visit the site due to utilizing some caching and compression technologies. We hope you appreciate the faster loading times!
We have moved Tychos.org to different servers to improve reliability and monitoring. Tychos was unavailable for half a day—we apologize for that. Now that we have created this change history for Tychos, we will announce maintenance issues here.
Some scenarios were crashing when the Settings pane was opened. We found the problem and now all scenarios should have an accessible Settings pane.
Teachers can now hide different panes in order to more finely control access to different aspects of scenarios. In the Settings Pane, there is now an Access sub pane that allows you to show or hide one of the Hack Panel's panes:
You can now add a Label object to your simulations. This gives users the ability to add and then animate text in the Tychos world.
You can create text in any RGB color and define its size and position:
myLabel = Label(position=[0, 0], size=[100, 100], “text”, “green")
You can then rotate the text as well:
myLabel.rotate(PI/4)
Particle and Block objects can also be given a text labels. This is similar to the Label object.
particle.addLabel(text="Hello", color="green")
To learn more, check out our documentation here:
https://docs.tychos.org/docs/learn/language-reference-api#label
We have added some new useful functions. Here is a list of those functions and briefly what each one does:
stop(test=false)
:
Allows you to stop the simulation if a condition is met. The input can be any logical statement that can be evaluated to true or false.
hasCollided(p1 = Particle, p2 = Particle)
:
This function takes two Particle objects as its arguments and then returns true or false if the two Particles are overlapping. This function only works with particles at this time, but we plan on building in more sophisticated collision detection for blocks too!
getIntersect(source, target)
:
This function returns a two dimensional matrix representing the minimum translation vector (MTV) that would be needed to separate two Particle objects when they overlap. This can be used to simulate collision forces based on the magnitude and direction of the MTV.
polar(radius, angle, units=”rad”)
:
This function is a utility function for quickly defining a 2d vector in polar form. It takes two required arguments, the scalar angle, and the scalar radial length. You can optionally include a tag of “deg” or “rad” to identify the angular units. The default value for units is “rad” for radians.
In the Settings Pane, you can now choose a new code color scheme that is better for presentation. Besides these changes we have added some other UI enhancements like better tooltips for the output gutter in the Initial State pane and the Calculations pane as well as a more organized Settings Panel. We hope you like the changes, and we are always looking for feedback and ideas on how to make Tychos better. A huge thanks to all the users that have contacted us and given us some great ideas!
We have added some new enhancements to graphs:
Graphs are now resizable so that you can make them larger or smaller on the screen.
You can alternatively “roll” up the graph into the panel title bar.
We have added tooltips for the data points in the graphs.
This is has been a feature that we have wanted to add for quite some time, and we have an initial version ready for you! With just a few lines of code, you can now create a data table for displaying variable values. This can be really helpful for recording a history of the simulation. We think this is a crucial tool for helping students connect the code they write to the simulation animation. You can create a data table by setting the columns in the Initial State Pane like this:
table.setColumns(["column1", "column2", ...])
Where the array of strings "column1"
and "column2"
would be the table column headers. You must have a table with at least one column, but you can have many more. Then you can record a new row in the table using this command in the Calculations Pane:
table.addRow([val1, val2, ...])
Where the array of values for example - val1
and val2
- could be any variable values you would like to record. The array of values must have the same number of values as columns in the table.
You can now get the position of the mouse mapped to the simulation extents. This allows you, for example, to build interactive simulations where Particles or Blocks can respond to the mouse position. To do so, you simply just need to reference the mouse position like this: mouse.pos
This will return the mouse position within the scenario coordinate system. We have also added the ability to detect “mouse over” events. The following function allows you to test if the mouse is over a Particle or a Block:
Here is a demonstration to check out these the new mouse interaction features: