Slider

tick tock

If you want to try out various values for a variable, you can use a slider. A slider can take on any value within a given interval.

Use the tool Slider icon to input two sliders a and b. Make a point by writing A=(a,b)!

Image

You can change the minimum, the maximum and the increment. If you right-click on the slider you can choose Animation on.

The default value for a slider is Fix Object (so you don't accidently move the slider when trying to change the slider value). As long as the slider tool is selected it is possible to move the slider. In order to move the slider freely, regardless of what tool is selected, right-click on it and uncheck Fix Object.

Animated gif

Export as animated gif

You can use a slider to export an animated gif. The animation must only rely on one slider, so if your animation uses several sliders, you must rewrite the slider dependencies using linearity. If you for instance want to use the resulting gif on a web page, don't use too many steps. Each step results in one image stored within the gif-file. The small gif to the right uses 140 steps and is 889 KB. The large applet at the top of the page uses 43 200 steps and is 12 KB (and the animation takes approximately 12 hours).


Exercise 1 - Make a pool table

Pool

You can vary the speed of the sliders and turn off trace by right-clicking.

Exercise 2 - Make a clock and an animated gif

Follow the instructions to make a clock, or watch the recording below.

Set up the slider

A minute extends 6 degrees on an analog clock. If using a slider we can set it to use 360 degrees and make the increment 6. If we also want to depict hours we need 12 times as many steps on the slider.

If using the unit degree on a slider we can not have more than 360°. It is hence easier to use normal numerical values and then change them into degrees afterwards.

Image

Then choose the animation tab and choose Increasing.

Make the rotating points

Using polar coordinates, one can enter two points for minutes and hours like this:

	Min=(3;a°) 
	Hour=(2;a°/12)

Adding the ° symbol will convert the numbers to degrees. You can add degrees by clicking Ctrl+o.

The points move in a counter-clockwise direction starting at the x-axis. Adjust this by changing the polar angles to 90°-a° and 90°-a°/12.

Export to gif

Add visual elements and hide the objects that should not be shown. Make the graphics view the size you want on the gif. Then choose File->Export->Graphics View as Animated GIF.

by Malin Christersson under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Sweden License

www.malinc.se