Sliders and Movable Points

In Desmos, adding a slider is as simple as typing a letter where you might normally see a number. Sliders enable you to add movable points and shifting lines, create dancing curves, and explore many other dynamic interactions. Get started with the video on the right, then dive deeper with the resources and challenges below.

Getting Started with Sliders

Sliders for Free Variables

Any time you have free variables in an expression, the calculator will offer to let you define them with sliders. For example, if you type \(y=mx+b\), you will get a prompt to add sliders for \(m\), \(b\), or all.

Note: Desmos has a handful of defined constants that cannot be used as a slider.

GIF showing y=mx+b using sliders.

 

Shared Slider Variables

You can also use the same variables in several expressions to plot curves that will change together. Click on the image to explore how a single variable \(c\) can be used to make two parallel lines move up and down together.

Explore this example on how two lines stay perpendicular to each other for any value of \(m\).

Image showing the use of a slider variable as the slope to create two paralell lines.

 

Animating Sliders

Change the Interval and Step

By default, sliders are typically set to an interval of -10 to 10 in the Graphing Calculator and Geometry Tool and an interval of -5 to 5 in 3D. To adjust the interval of your slider, click either of the values at the ends of the slider bar and input your desired upper or lower bounds. By default, a slider can take on any value between the upper and lower bound. However, by entering a numerical "step", you can limit the values to fixed interval steps counting up from the lower bound.

Lower, Upper bounds, and step edit window for sliders. Screenshot.

Animation Mode

Next to every slider is a ‘play’ button to animate through all of the slider values. Beneath the ‘play’ button is an ‘animation properties’ button that opens an Animation Mode menu. Here, you can choose to loop forwards and backwards, repeat in one direction, play once, and play indefinitely. The speed button allows you to speed up or slow down your animation.

Animation options to play sliders. Screenshot.

Dynamic Bounds

If a free variable is already defined in the calculator, then that variable can be used in the upper or lower bounds of a slider, to enable a more dynamic interaction. One way to use dynamic bounds is to ensure a slider value stays between two other slider values. In the example to the right, notice how the slider ‘c’ is bounded between sliders ‘a’ and ‘b’. By clicking on the images, you can open the graphs and explore.

Graph showing the use of dynamic bounds. Screenshot.

Sliders in Geometry

Using Sliders in Transformations

Sliders can be used to animate transformations in Geometry at desmos.com/geometry. For the angle of rotation and scale factor, try entering a free variable directly into the angle or scale factor box. In the example, the slider variable \(k\) can be used to determine the vector length of a translation.

GIF showing a slider to determine the vector length of a translation.

Moving a Glider Along a line

Sliders can also be used along with the glider function in the geometry tool. Gliders restrict a point to another object and will follow that object’s path. For example, adding a glider to a line will create a point restricted to that line. Adding a free variable connected to a slider as the second argument in the glider function allows you to animate a point restricted to the line.

GIF showing the use of the glider function.

Movable Points and Surfaces

Draggable Points

You can change a static point to a movable point by long-holding on the icon in the expression line to open the option menu. Turn on the drag toggle to make your point movable and choose between the different drag options.

Point menu screen.  Shows how to make a point movable.  Screenshot.

Move a Point with a Slider

Another way to create a movable point is to enter a point with a parameter for one or both coordinates. Click and drag the point around the graph to change the value of the parameter(s).

Animation on how to make movable points using coordinates such as (a,b) with sliders.

Move a Point Along a Function

You can create a moveable point along a curve using sliders. For a function f(x), the point (a,f(a)) will stay along the path of your curve.

Movable point along a curve. Screenshot.

Move a Point Along a Parametric

You can also drag a movable point along a parametric path!

Animation showing a point moving along a parametric path. Animation.

Move a Plane

In Desmos 3D, sliders can be used to help visualize different slices of conic sections.

3D graph showing the slices of a conic section. Screenshot.

Learn More

Please write in with any questions or feedback to support@desmos.com.