Remove trace of graphics-2 from graphics-1

Math123 shared this question 2 years ago
Answered

How to remove trace of point P in graphics-2 when P=Q. Let say I have tried But it did not work.

Graphics-1 ; SetActiveView[2] If[P==Q,ZoomIn[1]]

but both points are in Graphics-2

Comments (14)

photo
1

Try

Create a new Point in Graphics2 (for example P_1=P)

use the script command: SetTrace( P_1, <condition> )

see sample in attachment

photo
1

The answer above mean move (not remove)

If you mean remove: it's not possible to delete/remove 1 point from traced points.

But in this case maybe "record to spreadsheet" can help. For this send the ggb-file.

photo
1

Hi rami, a = slider in graphics-1. Points P & Q in Graphics-2,.. P with trace is moving as slider=a animation on toward Q . I want P trace remove trace when slider back to start position and new trace make on graphics-2 every time slider a comes back.

photo
1

the task is not clear and the task has a moved target (slider a).

2 free Points P&Q?? one direction P to Q??

P need a Path on wich he is moving with the slider! If this OK then:

need one free Point more in Graphic2: Q_0

and the new path f=Segment(Q_0,Q)

and P=Point(f,a)

and slider a in Graphics1 with values from=0 and to=1 and step=0.001 type "increment once"

and an animation ON/OFF bolean (b) in Graphics1 with script:

- If(b, {SetValue(a,1), RunUpdateScript( a )}, {StartAnimation(a, false)})

and a script in in a onUPdate:

- If(a==1,{SetActiveView(2),ZoomIn(1), SetValue(a,0)})

- If(b,StartAnimation(a, true))

The commands above are are tested (no warranty)!

Maybe you want create the above your self. Try!!!

If above OK or NOK make a new post.

.

PS: there exists more possibilities, there are more nice (but different of your task with given objects and rules)

photo
1

zoomin(1) command not working properly.

photo
1

try ZoomIn(1) <-- (2 letter: 1. and 5. as upper case)

If above not the problem: pls. send the ggb file

photo
1

I used ZoomIn(1) , it is not working i thought i used zoomin(-a,-a,b,b) for axis scaling. Neither zoomout(1) working. Pls suggest any other solution.

photo
1

pls. send the ggb file

photo
1

I tried, but zoomin[] command not working when i used for scaling axes zoomin[-a,-a,a,a] as well for remove trace zoomin[1].

Is there any other command/procedure we can use for remove trace.

photo
1

pls. send the ggb file

photo
1

Pls see the difference in both file. but in my project it work well but only for scaling axes not for remove trace.

I need when A = B it remove trace also when i slide b it also scale axes.

photo
1

Thanks rami for your efforts. I have used the same zoomin[-a,-a,a,a] for command when A=B except zoomin[1] it worked.

photo
photo
1

In my environment the trace include ZoomIn(1) works.

The Problem maybe is the timing. "a" is always animated. This can be a problem with scripts also in combination with the environment (web/not web and CPU performance). Another problem can be the sequence of the script-commands (not checked of my part)

So the big difference is by the slider "increase once". To make "decrease once" make the speed to a negative value in combination with "increase once". Now you can set the min-value in "a" to the exact value (y(B)). But with "increase once" you must restart the Animation. In the time when animation is OFF, then give no timing problems and in this time you can execute the script {SetAciveView(2), ZoomIn(1)} and others.

---------------------------------

In the attachment is version1B. In this version is implemented the trace AND a pseudo-trace (as segment). Also is implemented the possibility that with the animation the coordinates move (together with B). Here I use the command CenterPoint() so the axis ratio is not change and it's possible to see the "trace" in normal length. But a real trace is not possible because all changes in "Preferences Graphic" clear all traces. So I use in this case the Segment "pseudo trace" (alternatively it's possible to use "Record to Spreadsheet" for a real trace AND changes in "Preference Graphic").

photo
1

Thanks rami for the support.

photo
© 2022 International GeoGebra Institute