# GeoGebra Script: if command, buttons, checkboxes and curves

Hey everyone, greetings from Brazil. Hope you all are doing fine.

I'm trying to plot a pair of parametric curves in 3D view using the curve command by clicking a button. In the button's properties I'm scripting the following in "On Click":

Curve(u, 5*cos(5*t -2*u + 45),u,0,1000) Curve(u,0, 5*cos(5*t -2*u + 45),u,0,1000)It works but I'm also trying to limit the number of times that I can plot this pair to just one so I'm trying to use checkboxes (boolean variables) as well. The main idea is to create different buttons to plot different curves and only one pair at the time. And the user may "reset" the button (erasing or hiding the associated pair) by clicking it. It's something like:Click the button 1 > If: boolean variable = TRUE > plot curves and prevent other buttons from being clicked (and other curves from being plotted) until button 1 is clicked for the second time, erasing the first pair of curves and allowing the others. I'm scripting something like this (it's a draft) but it's not working at all: If(a == 1, Curve(u, 5*cos(5*t -2*u + 45),u,0,1000), a == 1, Curva(u,0, 5*cos(5*t -2*u + 45),u,0,1000)) SetValue(a, 0) Any suggestions? Thank you for your time.

Please post your .ggb file

Loading...Comments have been locked on this page!