Working with sequences
Introducing sequences
GeoGebra offers the command Sequence which produces a list of objects. Thereby, the type of object, the length of the sequence (that’s the number of objects created) and the step width (e.g. distance between the objects) can be set using the following command syntax:
Sequence(, , , , )
For example: Sequence(Segment((a, 0), (0, a)), a, 1, 10, 0.5)
Segment((a, 0), (0, a))
(a, 0)
with variable a). Each segment connects a point on the x-axis with a point on the y-axis (e.g. points (1, 0) and (0, 1); points (2, 0) and (0, 2).
a
-
1,10
-
0.5
Explore the construction...
List of points
Sequence((i, i), i, 0, s)
- If s is a slider with interval from 1 to 10 and increment 1, then command
Sequence((i, i), i, 0, s])
creates a list of s + 1 points whose length can be changed dynamically by dragging slider s.
- Points have coordinates (0, 0), (1, 1), ..., (10, 10)
Explore the construction...
Instructions
1. | | Enter Sequence(Segment((a, 0), (0, a)), a, 1, 10, 0.5)
into the Input Bar. |
2. | | Create a slider s for a number with Interval from 1 to 10 and Increment 1. |
3. | | Enter Sequence((i, i), i, 0, s)
into the Input Bar. |
4. | Move the slider s to check the construction. |
Task
Create a List of Segments and a List of Points like in the applets above by following the instuctions below.