Tutorial:Conditional Visibility & Sequences

From GeoGebra Manual
Jump to: navigation, search

Visualizing Integer Addition on the Number Line

In this activity you can either use the following tools or corresponding commands. Make sure you know how to use them before you begin.

Tool Slider.gif Slider
Tool New Point.gif New Point
Tool Vector between Two Points.gif Vector
Tool Move.gif Move
Tool Segment between Two Points.gif Segment Between Two Points
Tool Insert Text.gif Insert Text
Tool Check Box to Show Hide Objects.gif Checkbox to Show/Hide Objects

Construction Steps

1. Open a new GeoGebra window and hide the Algebra View. Set the labeling option to All new objects (Options Menu).

2. Open the Properties dialog for the Graphics View. On tab yAxis, uncheck Show yAxis. On tab xAxis, set the distance of tick marks to 1 by checking the box Distance and entering 1 into the text field. On tab Basic set the minimum of the x-Axis to -21 and the maximum to 21.

3. Create sliders a and b (interval -10 to 10; increment 1). Show the value of the sliders instead of their names (Properties dialog).

4. Create points A = (0 , 1) and B = A + (a , 0).

5. Create vector u = Vector[A, B] which has the length a.

6. Create points C = B + (0 , 1) and D = C + (b , 0) as well as vector v = Vector[C , D] which has the length b.

7. Create point R = (x(D) , 0).

Note Hint: x(D) gives you the x-coordinate of point D. Thus, point R shows the result of the addition.

8. Create point Z = (0, 0) as well as the following segments: g = Segment[Z, A], h = Segment[B, C], i = Segment[D, R].

9. Use the Properties Dialog to enhance your construction (e.g. change color, line style, fix sliders, hide labels).

13 integer.PNG

Insert dynamic text

Enhance your interactive figure by inserting dynamic text that displays the corresponding addition problem.

10. Calculate the result of the addition problem: r = a + b

11. In order to display the parts of the addition problem in different colors you need to insert the dynamic text step by step. a. Insert text1: Select a from Objects b. Insert text2: + c. Insert text3: Select b from Objects d. Insert text4: = e. Insert text5: Select r from Objects

12. Match the color of text1, text3, and text5 with the color of the corresponding sliders and point R. Hide the labels of the sliders and fix the text (Properties Dialog).

13. Export the interactive figure as a dynamic worksheet.

13 integer2.PNG

Conditional Formatting – Inserting Checkboxes

Construction Steps

Insert a checkbox into the Graphics View that allows you to show or hide the result of the addition problem (text5, point R, and segment i).

1. Activate tool Checkbox to show and hide objects.

2. Click on the graphics view next to the result of the addition problem.

3. Enter Show result into the Caption text field.

4. From the drop down menu successively select all objects whose visibility should be controlled by the checkbox (text5, point R, and segment i).

5. Click Apply to create the checkbox.

6. In Move mode check and uncheck the checkbox to try out if all three objects can be hidden / shown.

7. Fix the checkbox so it can’t be moved accidentally any more (Properties dialog).

8. Export this new interactive figure as a dynamic worksheet.

Note Hint: You might want to use a different name for this worksheet.


13 integer3.PNG

Boolean variables

A Check Box to Show / Hide Objects is the graphical representation of a Boolean variable in GeoGebra. It can either be true or false which can be set by checking (Boolean variable = true) or unchecking (Boolean variable = false) the checkbox.

1. Open the Properties dialog. The list of Boolean values only contains one object called j, which is represented graphically as your checkbox.

2. Select text5 from the list of objects in the Properties dialog.

3. Click on tab Advanced and look at the text field called Condition to Show Object. It shows the name of your checkbox j.

Note Hint: This means that the visibility of text5 depends on the status of the checkbox.

4. Select point R from the list of objects in the Properties dialog. Click on tab Advanced. The text field Condition to Show Object is empty.

5. Enter j into the text field Condition to Show Object. The visibility of point R is now connected to the checkbox as well.

6. Repeat steps 4 and 5 for segment i which connects the second vector with point R on the number line.

Note Hint: Now the checkbox controls three objects of your dynamic figure: text5 (which shows the result of the addition), point R and segment i (which show the result on the number line).


The Sierpinski Triangle

You will now learn how to create a custom tool that facilitates the construction of a so called Sierpinski triangle.

Preparations

  • Open a new GeoGebra window.
  • Switch to Perspectives – Geometry.
  • In the Options menu set the Labeling to New Points Only.

Construction Steps

1 Tool Polygon.gif Create an arbitrary triangle ABC.
2 Change the color of the triangle to black (Properties dialog).
3 Tool Midpoint or Center.gif Create midpoint D of triangle side AB.
4 Tool Midpoint or Center.gif Create midpoint E of triangle side BC.
5 Tool Midpoint or Center.gif Create midpoint F of triangle side AC.
6 Tool Move.gif Construct a triangle DEF.
7 Change the color of triangle DEF to white and increase the filling to 100% (Properties dialog).
8 Change the color of the sides of triangle DEF to black (Properties dialog).
9 Create a new tool called Sierpinski.

Output objects: points D, E and F, triangle DEF, sides of triangle DEF

Input objects: points A, B and C

Name: Sierpinski

Toolbar help: Click on three points

10 Apply your custom tool to the three black triangles ADF, DBE and FEC to create the second stage of the Sierpinski triangle.
11 Apply your custom tool to the nine black triangles to create the third stage of the Sierpinski triangle.

Conditional Visibility

Insert checkboxes that allow you to show and hide the different stages of the Sierpinski triangle.

1 Tool Show Hide Object.gif Hide all points except from A, B and C.
2 Tool Check Box to Show Hide Objects.gif Create a Check Box to Show / Hide Objects that shows / hides the first stage of the Sierpinski triangle.

Caption: Stage 1

Selected objects: Only the large white triangle and its sides.

3 Tool Move.gif] In Move mode check and uncheck the checkbox to try out if the

white triangle and its sides can be hidden / shown.

4 Tool Check Box to Show Hide Objects.gif Create a Check Box to Show / Hide Objects that shows / hides the second stage of the Sierpinski triangle.

Caption: Stage 2

Selected objects: Three medium sized white triangles and their sides.

5 Tool Move.gif In Move mode check and uncheck the checkbox to try out if the second stage of the Sierpinski triangle can be hidden / shown.
6 Tool Check Box to Show Hide Objects.gif Create a Check Box to Show / Hide Objects that shows / hides the third stage of the Sierpinski triangle.

Caption: Stage 3

Selected objects: Nine small white triangles and their sides.

7 Tool Move.gif In Move mode check and uncheck the checkbox to try out if the third stage of the Sierpinski triangle can be hidden / shown.

Introducing Sequences

Visualizing Multiplication of Natural Numbers

Challenge of the Day: String Art Based on Bézier Curves

© 2024 International GeoGebra Institute