dtto represent time.
dtdoes not change. This is the interval time - the segment of time between each frame. It is the "time step", or "delta time" that is used to calculate the amount of change that occurs from frame to frame. The smaller the value of
dt, then the more frames per second that will be calculated for the animation. This will result in a smoother animation.
frame_countis the number of frames that have elapsed since you pressed the start button. This value represents the number of time intervals that have elapsed, and thus the number of times the universe has been updated. The varialbe
tis actually the time in seconds that have elapsed since you pressed the start button. Type the following line of code into the Calculations pane:
m1in the Initial State Pane:
xthat we used before. Now assign the first element in the matrix to the value of
x. This is done in the Calculations pane:
m1will change in value by [1, 1] so each of the elements in the matrix will increment by 1 every frame.
Meteris a numeric display that you create in the Initial State Pane and then you specify the data to display in the Calculations Pane. Each
Meterthat is created will appear on the left side of the World View. Your program needs to tell the
Meterwhat value it needs to display by using the
Meter, you first need to write this line of code in the Initial State Pane:
Meterto actually display data, you need to specify a numeric variable's value to
display. This line of code would need to be written in the Calculations Pane:
Meterto read the value of the variable
Meterand display it on the screen. You can only read a non-matrix value to a
Meter, so if you want to display a matrix value you can only display one element of the matrix using this notation:
s, and we want to change the value of
sby 10 each second. Create the variables in the Initial State Pane:
swould already be 500 by the end of the first second!
dtand its value is based on a the number of frames that pass each second. If the frame rate were 50 frames per second, then the value of
dtwould be .02 because:
dsthat will represent how much we want to change s each frame:
swill increase by .2 each frame, and because there 50 frames in a given a second, then we can see that the value of s after a single second should increase by 10 because it increased by 0.2 fifty times in one second: