Can Point[ <Object>, <Parameter> ] be released?
Answered
I would like to implement linkages in GeoGebra by disallowing positions of the constrained mover point which make no sense. My attempt is at https://www.geogebra.org/m/ZrwBFhYr. Here I restricted D to be freely draggable first, but when E is undefined, then D will be put to the last useful point. This is done by creating ppD=PathParameter[D] and for the on-update script of D the following JavaScript is started:
- if (ggbApplet.getValue("x(E)")) {
- var ppD = ggbApplet.getValue("ppD");
- ggbApplet.evalCommand("ppDok="+ppD);
- } else {
- var ppDok = ggbApplet.getValue("ppDok");
- ggbApplet.evalCommand("D=Point[d,"+ppDok+"]");
- }
This fixes D when it is dragged to a disallowed position. Its position is OK now, but I want it to be draggable again. Is this possible somehow? Thanks for any hints in advance.
hello
I am not English and sometimes I do not understand some words
I suppose you want the attached
I have created some orange objects. see DM and O overall (DM instead D, O instead one intersection) I use two intersect points of circle ever
saludos
That's very clever. Not a solution in general, but for this particular example it's perfect. Thank you!
I think more general than others
https://www.geogebra.org/m/Drbxq9Y5
hello again
try this code
var ppD = ggbApplet.getValue("ppD");
ggbApplet.evalCommand("ppDok="+ppD);
} else {
var ppDok = ggbApplet.getValue("ppDok");
ggbApplet.evalCommand("SelectObjects[]");
ggbApplet.evalCommand("SetValue[D,Point[d,"+ppDok+"]]");
}
then you will want another point like D for the other half of curve
saludos
This is exactly I was searching for! That's wonderful. Thank you so much! :-)
I think you can do the script in GGscript
Yes, maybe it's possible in simple GGscript also. Now I added an extra idea by computing the ordinal of the intersection. This one cannot be animated, just dragged.
hello
select DM and walk slowly around arcs over the vectorial path
0<=pathparameter[]<=1 so 0.05 and 0.97 are near pathparameter values
Comments have been locked on this page!