Difference between revisions of "Tutorial:Conditional Visibility & Sequences"
Liliana CB (talk | contribs) |
|||
(12 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | [[category:Tutorial]] | ||
==Visualizing Integer Addition on the Number Line== | ==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. | In this activity you can either use the following tools or corresponding commands. Make sure you know how to use them before you begin. | ||
Line 5: | Line 6: | ||
|[[Image:Tool_Slider.gif]]||[[Slider Tool|Slider]] | |[[Image:Tool_Slider.gif]]||[[Slider Tool|Slider]] | ||
|- | |- | ||
− | |[[Image:Tool_New_Point.gif]]||[[ | + | |[[Image:Tool_New_Point.gif]]||[[Point Tool|Point]] |
|- | |- | ||
− | |[[Image:Tool_Vector_between_Two_Points.gif]]||[[Vector | + | |[[Image:Tool_Vector_between_Two_Points.gif]]||[[Vector Tool|Vector]] |
|- | |- | ||
|[[Image:Tool_Move.gif]]||[[Move Tool|Move]] | |[[Image:Tool_Move.gif]]||[[Move Tool|Move]] | ||
|- | |- | ||
− | |[[Image:Tool_Segment_between_Two_Points.gif]]||[[Segment | + | |[[Image:Tool_Segment_between_Two_Points.gif]]||[[Segment Tool|Segment Between Two Points]] |
|- | |- | ||
|[[Image:Tool_Insert_Text.gif]]||[[Insert Text Tool|Insert Text]] | |[[Image:Tool_Insert_Text.gif]]||[[Insert Text Tool|Insert Text]] | ||
|- | |- | ||
− | |[[Image:Tool_Check_Box_to_Show_Hide_Objects.gif]]||[[Check Box | + | |[[Image:Tool_Check_Box_to_Show_Hide_Objects.gif]]||[[Check Box Tool|Checkbox]] |
|} | |} | ||
Line 57: | Line 58: | ||
==Conditional Formatting – Inserting Checkboxes== | ==Conditional Formatting – Inserting Checkboxes== | ||
===Construction Steps=== | ===Construction Steps=== | ||
− | Insert a [[Check Box | + | Insert a [[Check Box Tool|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 [[Check Box | + | 1. Activate tool [[Check Box Tool|Checkbox]] to show and hide objects. |
2. Click on the graphics view next to the result of the addition problem. | 2. Click on the graphics view next to the result of the addition problem. | ||
Line 95: | Line 96: | ||
==The Sierpinski Triangle== | ==The Sierpinski Triangle== | ||
You will now learn how to create a custom tool that facilitates the construction of a so called Sierpinski triangle. | You will now learn how to create a custom tool that facilitates the construction of a so called Sierpinski triangle. | ||
+ | |||
+ | [[Image:Sierpinski1.PNG|center]] | ||
===Preparations=== | ===Preparations=== | ||
Line 141: | Line 144: | ||
|1||[[Image:Tool_Show_Hide_Object.gif]]||Hide all points except from A, B and C. | |1||[[Image:Tool_Show_Hide_Object.gif]]||Hide all points except from A, B and C. | ||
|- | |- | ||
− | |2||[[Image:Tool_Check_Box_to_Show_Hide_Objects.gif]]||Create a Check Box | + | |2||[[Image:Tool_Check_Box_to_Show_Hide_Objects.gif]]||Create a Check Box that shows / hides the first stage of the Sierpinski triangle. |
Caption: Stage 1 | Caption: Stage 1 | ||
Line 150: | Line 153: | ||
white triangle and its sides can be hidden / shown. | white triangle and its sides can be hidden / shown. | ||
|- | |- | ||
− | |4||[[Image:Tool_Check_Box_to_Show_Hide_Objects.gif]]||Create a Check Box | + | |4||[[Image:Tool_Check_Box_to_Show_Hide_Objects.gif]]||Create a Check Box that shows / hides the second stage of the Sierpinski triangle. |
Caption: Stage 2 | Caption: Stage 2 | ||
Line 158: | Line 161: | ||
|5||[[Image: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. | |5||[[Image: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||[[Image:Tool_Check_Box_to_Show_Hide_Objects.gif]]||Create a Check Box | + | |6||[[Image:Tool_Check_Box_to_Show_Hide_Objects.gif]]||Create a Check Box that shows / hides the third stage of the Sierpinski triangle. |
Caption: Stage 3 | Caption: Stage 3 | ||
Line 166: | Line 169: | ||
|7||[[Image: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. | |7||[[Image: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. | ||
|} | |} | ||
+ | |||
+ | [[Image:Sierpinski2.PNG|center]] | ||
==Introducing 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[<expression>, <variable>, <from>, <to>, <step>]'' | ||
+ | |||
+ | Explanations: | ||
+ | * <expression>: Determines the type of objects created. The expression needs to contain a variable (e.g. (i, 0) with variable i). | ||
+ | * <variable>: Tells GeoGebra the name of the variable used. | ||
+ | * <from>, <to>: Determine the interval for the variable used (e.g. from 1 to 10). | ||
+ | * <step>: Is optional and determines the step width for the variable used (e.g. 0.5). | ||
+ | |||
+ | ===Examples for sequences=== | ||
+ | * Sequence[(n, 0), n, 0, 10] | ||
+ | ** Creates a list of 11 points along the x-axis. | ||
+ | ** Points have coordinates (0, 0), (1, 0), (2, 0), …, (10, 0). | ||
+ | |||
+ | [[Image:sequence.PNG|center]] | ||
+ | |||
+ | * Sequence[Segment[(a, 0), (0, a)], a, 1, 10, 0.5] | ||
+ | ** Creates a list of segments with distance 0.5. | ||
+ | ** Each segment connects a point on the x-axis with a point on the yaxis (e.g. points (1, 0) and (0, 1); points (2, 0) and (0, 2). | ||
+ | |||
+ | * 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) | ||
+ | |||
+ | [[Image:sequence2.PNG|center]] | ||
==Visualizing Multiplication of Natural Numbers== | ==Visualizing Multiplication of Natural Numbers== | ||
+ | ===Preparations=== | ||
+ | * Open a new GeoGebra window. | ||
+ | * Switch to Perspectives – Geometry. | ||
+ | * Show the [[Input Bar]] ([[View Menu]]). | ||
+ | * In the Options menu set the Labeling to ''All New Objects''. | ||
+ | |||
+ | [[Image:multiplication.PNG|center]] | ||
+ | |||
+ | ===Construction Steps=== | ||
+ | {|border="1" cellpadding="15" | ||
+ | |1||[[Image:Tool_Slider.gif]]||Create a horizontal slider ''Columns'' for number with ''Interval'' from 1 to 10, Increment 1 and Width 300. | ||
+ | |- | ||
+ | |2||[[Image:Tool_New_Point.gif]]||Create a new point A. | ||
+ | |- | ||
+ | |3||[[Image:Tool_Segment_with_Given_Length_from_Point.gif]]||Construct segment a with given length ''Columns'' from point A. | ||
+ | |- | ||
+ | |4||[[Image:Tool_Move.gif]]||Move slider ''Columns'' to check the segment with given length. | ||
+ | |- | ||
+ | |5||[[Image:Tool_Perpendicular_Line.gif]]||Construct a perpendicular line b to segment a through point A. | ||
+ | |- | ||
+ | |6||[[Image:Tool_Perpendicular_Line.gif]]||Construct a perpendicular line c to segment a through point B. | ||
+ | |- | ||
+ | |7||[[Image:Tool_Slider.gif]]||Create a vertical slider ''Rows'' for number with ''Interval'' from 1 to 10, Increment 1 and Width 300. | ||
+ | |- | ||
+ | |8||[[Image:Tool_Circle_Center_Radius.gif]]||Create a circle d with center A and given radius ''Rows''. | ||
+ | |- | ||
+ | |9||[[Image:Tool_Move.gif]]||Move slider ''Rows'' to check the circle with given radius. | ||
+ | |- | ||
+ | |10||[[Image:Tool_Intersect_Two_Objects.gif]]||Intersect circle d with line c to get intersection point C. | ||
+ | |- | ||
+ | |11||[[Image:Tool_Parallel_Line.gif]]||Create a parallel line e to segment a through intersection point C. | ||
+ | |- | ||
+ | |12||[[Image:Tool_Intersect_Two_Objects.gif]]||Intersect lines c and e to get intersection point D. | ||
+ | |- | ||
+ | |13||[[Image:Tool_Polygon.gif]]||Construct a polygon ABDC. | ||
+ | |- | ||
+ | |14||[[Image:Tool_Show_Hide_Object.gif]]||Hide all lines, circle d and segment a. | ||
+ | |- | ||
+ | |15||||Hide labels of segments. | ||
+ | |- | ||
+ | |16||[[Image:Tool_Move.gif]]||Set both sliders ''Columns'' and ''Rows'' to value 10. | ||
+ | |- | ||
+ | |17|| ||Create a list of vertical segments. | ||
+ | |||
+ | Sequence[Segment[A+i(1, 0), C+i(1, 0)], i, 1, Columns] | ||
+ | {{note|A + i(1, 0) specifies a series of points starting at point A with distance 1 from each other. C + i(1, 0) specifies a series of points starting at point C with distance 1 from each other. Segment[A + i(1, 0), C + i(1, 0)] creates a list of segments between pairs of these points. Note, that the endpoints of the segments are not shown in the Graphics view. Slider ''Column'' determines the number of segments created.}} | ||
+ | |- | ||
+ | |18|| ||Create a list of horizontal segments. | ||
+ | Sequence[Segment[A+i(0, 1), B+i(0, 1)], i, 1, Rows] | ||
+ | |- | ||
+ | |19||[[Image:Tool_Move.gif]]||Move sliders ''Columns'' and ''Rows'' to check the construction. | ||
+ | |- | ||
+ | |20||[[Image:Tool_Insert_Text.gif]]||Insert static and dynamic text that state the multiplication problem using the values of sliders ''Columns'' and ''Rows'' as the factors: | ||
+ | |||
+ | text1: Columns | ||
+ | |||
+ | text2: * | ||
+ | |||
+ | text3: Rows | ||
+ | |||
+ | text4: = | ||
+ | |- | ||
+ | |21|| ||Calculate the result of the multiplication: result = Columns * Rows | ||
+ | |- | ||
+ | |22||[[Image:Tool_Insert_Text.gif]]||Insert dynamic text5: ''result'' | ||
+ | |- | ||
+ | |23||[[Image:Tool_Show_Hide_Object.gif]]||Hide points A, B, C and D. | ||
+ | |- | ||
+ | |24||||Enhance your construction using the ''Properties dialog''. | ||
+ | |} | ||
==Challenge of the Day: String Art Based on Bézier Curves== | ==Challenge of the Day: String Art Based on Bézier Curves== | ||
+ | Bézier curves are parametric curves used in computer graphics. For example, they are used in order to create smooth lines of vector fonts. | ||
+ | Let’s create some ‘string art’ based on Bézier curves. | ||
+ | |||
+ | ===Preparations=== | ||
+ | * Open a new GeoGebra window. | ||
+ | * Switch to Perspectives – Geometry. | ||
+ | * Show the [[Input Bar]] ([[View Menu]]). | ||
+ | * In the ''Options menu'' set the Labeling to ''All New Objects''. | ||
+ | |||
+ | [[Image:bezier.PNG|center]] | ||
+ | |||
+ | ===Construction Steps=== | ||
+ | {|border="1" cellpadding="15" | ||
+ | |1||[[Image:Tool_Segment_between_Two_Points.gif]]||Create segment a with endpoints A and B. | ||
+ | |- | ||
+ | |2||[[Image:Tool_Segment_between_Two_Points.gif]]||Create segment b with endpoints A and C. | ||
+ | |- | ||
+ | |3||[[Image:Tool_Slider.gif]][[Image:Tool_Move.gif]]||Create a slider for number n with Interval 0 to 50, Increment 1 and Width 200. | ||
+ | |- | ||
+ | |4||||Create Sequence[A + i/n (B - A), i, 1, n]. {{hint|This sequence creates a list of n points along segment AB with a distance of one nth of the length of segment a.}} | ||
+ | |- | ||
+ | |5||||Create Sequence[A + i/n (C - A), i, 1, n]. {{hint|This sequence creates a list of n points along segment AC with a distance of one nth of the length of segment b.}} | ||
+ | |- | ||
+ | |6||[[Image:Tool_Show_Hide_Object.gif]]||Hide both lists of points. | ||
+ | |- | ||
+ | |7||||Create a list of segments. Sequence[Segment[Element[list1,i],Element[list2,n-i]],i,1,n] {{hint|These segments connect the first and last, second and last but one,…, last and first point of list1 and list2.}} | ||
+ | |- | ||
+ | |8||||Enhance your construction using the Properties dialog. | ||
+ | |- | ||
+ | |9||[[Image:Tool_Move.gif]]||Move points A, B and C to change the shape of your Bézier curve. | ||
+ | |- | ||
+ | |10||[[Image:Tool_Move.gif]]||Drag slider n to change the number of segments that create the Bézier curve. | ||
+ | |} | ||
+ | |||
+ | |||
+ | {{note|The segments you just created are tangents to a quadratic Bézier curve.}} | ||
+ | |||
+ | ===Task=== | ||
+ | Create more ''string art'' with GeoGebra using sequences of points and segments. | ||
+ | |||
+ | [[Image:bezier2.PNG|center]] |
Latest revision as of 17:27, 29 November 2019
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.
Slider | |
Point | |
Vector | |
Move | |
Segment Between Two Points | |
Insert Text | |
Checkbox |
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).
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).
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.
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.
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.
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.
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
Conditional Visibility
Insert checkboxes that allow you to show and hide the different stages of the Sierpinski triangle.
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[<expression>, <variable>, <from>, <to>, <step>]
Explanations:
- <expression>: Determines the type of objects created. The expression needs to contain a variable (e.g. (i, 0) with variable i).
- <variable>: Tells GeoGebra the name of the variable used.
- <from>, <to>: Determine the interval for the variable used (e.g. from 1 to 10).
- <step>: Is optional and determines the step width for the variable used (e.g. 0.5).
Examples for sequences
- Sequence[(n, 0), n, 0, 10]
- Creates a list of 11 points along the x-axis.
- Points have coordinates (0, 0), (1, 0), (2, 0), …, (10, 0).
- Sequence[Segment[(a, 0), (0, a)], a, 1, 10, 0.5]
- Creates a list of segments with distance 0.5.
- Each segment connects a point on the x-axis with a point on the yaxis (e.g. points (1, 0) and (0, 1); points (2, 0) and (0, 2).
- 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)
Visualizing Multiplication of Natural Numbers
Preparations
- Open a new GeoGebra window.
- Switch to Perspectives – Geometry.
- Show the Input Bar (View Menu).
- In the Options menu set the Labeling to All New Objects.
Construction Steps
Challenge of the Day: String Art Based on Bézier Curves
Bézier curves are parametric curves used in computer graphics. For example, they are used in order to create smooth lines of vector fonts. Let’s create some ‘string art’ based on Bézier curves.
Preparations
- Open a new GeoGebra window.
- Switch to Perspectives – Geometry.
- Show the Input Bar (View Menu).
- In the Options menu set the Labeling to All New Objects.
Construction Steps
Task
Create more string art with GeoGebra using sequences of points and segments.