3
$\begingroup$

Many of you know dynamic geometry exercises in Euclidea; if not, here is one example. It lets you do a geometric construction and sends a message once you achieve the result.

I am looking for a way to produce exercises for students in a similar form. At the moment I use C.a.R. which uses Java plugins. But as you may know, all major browsers stopped supporting Java plugins in 2014 or so. So I have to make my students install JDK (or OpenJDK) which is not fun.

There is plenty of software that does dynamic geometry, but as far as I see nothing else has the exercise mode that I need; or did I miss something?

$\endgroup$
2
  • 3
    $\begingroup$ This seems like a better fit for MESE. $\endgroup$
    – LSpice
    Commented Nov 27, 2021 at 4:38
  • 1
    $\begingroup$ @LSpice I think there is a better chance to get an answer here (but I agree it does not fit perfectly in MO). $\endgroup$ Commented Nov 27, 2021 at 6:23

1 Answer 1

1
$\begingroup$

Yin Bon Ku created an assignment that solves my problem in GeoGebra. It uses the Global JavaScript; see Event Listeners.

One has to create an activity with the boolean value welldone = false. Add a text Well done!, and write welldone in its Settings > Advanced > Condition to Show Object. Use the following code in Scripting > Global JavaScript:

function ggbOnInit() {
ggbApplet.registerAddListener("newObjectListener");
}

function newObjectListener (obj) {
if (obj != "finished") {
  var cmd = "finished = ("+obj+"== target)";
  ggbApplet.debug(cmd);
  ggbApplet.evalCommand(cmd);
  finished = ggbApplet.getValueString("finished");
  if (finished.indexOf("true") > -1) {
    ggbApplet.setValue("welldone",1);
  }
}
}

Then, one may create a construction assignment. Hide the intermediate steps, label the result as target, and uncheck Selection Allowed in its Settings > Advanced tab. And everything works!

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .