# Use a slider to add blocks for students to visualize a patter

**URL:** <https://cl.desmos.com/t/use-a-slider-to-add-blocks-for-students-to-visualize-a-patter/5293>\
**Category:** Questions\
**Tags:** patterns\
**Created:** [December 22, 2023, 8:46pm UTC](https://cl.desmos.com/t/use-a-slider-to-add-blocks-for-students-to-visualize-a-patter/5293 "2023-12-22T20:46:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SAMANTHA\_CALVERT](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/samantha_calvert/32/4706_2.png) [@SAMANTHA\_CALVERT](https://cl.desmos.com/u/SAMANTHA_CALVERT)\
**Post date:** [December 22, 2023, 8:46pm UTC](https://cl.desmos.com/t/use-a-slider-to-add-blocks-for-students-to-visualize-a-patter/5293/1 "2023-12-22T20:46:23Z")

</div>

I am trying to build an activity for my students to start to visualize the pattern x^2. I wanted a slider where students could see one block when the slider was at n=1, and then they could move it over to n=2 and see 4 blocks, n=3 and see 9 blocks, etc.

Is there a way to have a slider attached to specific polygons appearing, rather than just attached to a graph?

Thanks so much!

---

<div class="post-metadata">

**Author:** ![Daniel\_Wekselgreene](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_wekselgreene/32/1819_2.png) [@Daniel\_Wekselgreene](https://cl.desmos.com/u/Daniel_Wekselgreene)\
**Post date:** [December 23, 2023, 9:26am UTC](https://cl.desmos.com/t/use-a-slider-to-add-blocks-for-students-to-visualize-a-patter/5293/2 "2023-12-23T09:26:19Z")

</div>

I’ve made an activity like this. I did it using list comprehensions to generate sets of polygons, which is what you are probably looking for. Take a look and let me know if you have questions about it.

I have two versions. The first one was made for my Math 1 students so the interface is more scaffolded. The second one was adapted for my Math 2 students, and it only has quadratic patterns. In either case, the template is fairly easy to modify to make new problems once you understand how the list comprehensions work.

Math 1: [Unit 4, CYU #10: Visual Patterns in multiple representations • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/621d18b5f16f3e48ab4c7dd6?collections=62e2f7e75e1347c3f4c064c5%2C62e2f9be5e1347c3f4c064e3)

Math 2: [CYU Unit 5, Lesson 4: Quadratic Visual Patterns • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/64023731f8bbb777e500d745)

---

<div class="post-metadata">

**Author:** ![Daniel\_Wekselgreene](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_wekselgreene/32/1819_2.png) [@Daniel\_Wekselgreene](https://cl.desmos.com/u/Daniel_Wekselgreene)\
**Post date:** [December 24, 2023, 2:36am UTC](https://cl.desmos.com/t/use-a-slider-to-add-blocks-for-students-to-visualize-a-patter/5293/3 "2023-12-24T02:36:32Z")

</div>

Here is a desmos file with just a generator for a square pattern:

> **[square pattern generator](https://www.desmos.com/calculator/qgbglvxu9z)**
>
> Explore math with our beautiful, free online graphing calculator. Graph functions, plot points, visualize algebraic equations, add sliders, animate graphs, and more.

Here’s the same idea but more complex for a pyramid pattern:

> **[pyramid pattern list comprehension](https://www.desmos.com/calculator/taqb8aojjl)**
>
> Explore math with our beautiful, free online graphing calculator. Graph functions, plot points, visualize algebraic equations, add sliders, animate graphs, and more.

Here’s another example for a linear pattern:

> **[visual pattern generator](https://www.desmos.com/calculator/mvnseorn30)**
>
> Explore math with our beautiful, free online graphing calculator. Graph functions, plot points, visualize algebraic equations, add sliders, animate graphs, and more.
