Monday, February 9, 2015

Highlight your correct answers in Geogebra

I've led a number of sessions over the past few months introducing teachers to Geogebra and Desmos. My general outline for presentation is to show the basics of what you can do with these programs, as well as to share some of the great pre-made resources that are available online, namely at geogebratube.org.  After this we aim to have some playtime, during which teachers always ask me how to make the presentation below:



For this particular presentation, we asked students to perform a specific transformation of the graph of y=x^2.  You move the 5 points according to the description, then you input the equation for the transformed graph and check your answer.  The blue dashed graph turns green to let you know that you are correct, and a textbox appears saying "you got it!".  I've been promising a how-to blogpost on this topic.  Hope it is helpful!  Follow the steps below to create a modified version of what you see in the above video, and please let me know if you have questions.

Stage 1:  Create your objects

1. Type into the input bar g(x)=x^2 and f(x)=0.  Press enter after each entry.  (Note: I only use a function for g(x) if covering transformations.  No g(x) needed if you just want students to write the equation that goes through the 3 points).
2. Use the add a point tool to add 3 points to the grid.  Be careful not to put them on the axes or on an object.  This will attach them to an object, and we need them to be movable.  At this point in time I start changing the color and style of the objects.
right click-->object properties-->color (or style).



3.  Add an input box.  The caption should be "f(x)", and we attach it to object f. 




4.  Add a text box.  I chose the "You got it!" as my text.  Drag your textbox and input box to an appropriate location.   


Stage 2:  Boolean Variable and Conditions to Show

5.  Add a boolean variable.  My boolean variable is called sameGraph.  It is true if function f goes through points A, B, and C.  Otherwise it is false.  You add the variable by typing into the input bar.


6.  Type fcorrect=f into the input bar and press enter.  This creates a new function called fcorrect(x) that is exactly the same as f(x).

7.  Right click on function f and select object properties.  From here you can change the color and style.  I chose blue dashed.  Under the Advanced tab we will type !sameGraph into the "conditions to show object" box.  This means that function f will only show when our boolean variable sameGraph is false.  This means function f will only show when points A, B, and C are not on f.


8.  Right click on function fcorrect and select object properties.  From here you can change the color and style.  I chose green.  Under the Advanced tab we will type sameGraph into the "conditions to show object" box.  This means that function fcorrect will only show when our boolean variable sameGraph is true.  This means function f will only show when points A, B, and C are on f.


 9.  I also want my "you got it" textbox to show only when A, B, and C are on f.  The steps are the same as those above.  The tricky part is that your textbox may not be showing on the screen, so you can't right click on it.  If this is the case, right click on another object, select object properties, and then find your textbox in the objects list.


Below is what your final product will look like when you have a correct answer.  For this example, we transformed the points on y=x^2 three units right and one unit up.  Then we typed in the correct function into the input box.


Side note:  If I intend for students to interact with my presentation, I always change the point capturing to "fixed to grid".  This saves valuable class time, as points will automatically go to the nearest point with integer coordinates (or where gridlines cross, depends on your settings).  I haven't found this feature yet in Geogebra 5, so I use Geogebra 4 for these types of presentations.




No comments:

Post a Comment