Looking for an example of the CenterView command

Download0091 shared this question 6 years ago
Answered

Hello,


While I know what it does, I am not quite clear as to when (or how) the CenterView command should be used. If someone has a good example of its proper usage, I would appreciate your sharing it.


Thank you,


John.

Comments (8)

photo
1

Hallo John,


The problem of CenterView[] and others commands to influence the Area of view is the initial-phase.

It's necessary to use for the most applications in this context Corner[2] (together with other event triggers).


In the initial-phase the coordinates of corners change about 3 times and Corner[2] ensures that this updates take into consideration by the own scripts.


Attached an example


Raymond

https://ggbm.at/2698497

photo
1

hello

what about a new dynamic contour concept?

run the file

saludos

https://ggbm.at/2698567

photo
1

Hello Mathmagic,


I see you are online as I type this. What you posted looks great but, when I try to open the file with GeoGebra desktop, I get an error message about something in the script being not the way it likes it and then GeoGebra closes. In other words, I don't get to see how did that.


I am using version 205, what version are you using, I'll install the same version you have if I have it.


Thank you and saludos too! :-)


John.

photo
1

After starting the worksheet about 20 times (LOL), it says


    "Error in script at line 1 (called from n)"

    null


I hope that helps,


Saludos!


John.

photo
1

@Raymond


That was very useful. Thank you very much Raymond. Now I see how I can use that command.


@Mathmagic


I edited the .xml file and changed "CenterView[-1]" to "CenterView["T"]" then GeoGebra was happy with that. It looks like version 205 does not like the -1 parameter.


After I got to see your example, that is a beautiful use of that command. I will be using that. :-)


Gracias and saludos,


Thank you both, that was great. I'm glad I asked the question.


John.

photo
1

After starting the worksheet about 20 times (LOL), it says


    "Error in script at line 1 (called from n)"

    null


I hope that helps,


Saludos!


John.

there is a ¿bug? at begining of file when it charges the variables with "on update script"

open the tube version

saludos

photo
1

open the tube version

saludos


I did. :-) Now with the "fix" I can run it on my desktop machine where it runs faster/smoother.


Saludos y gracias,


John.

photo
1

Hi all,


open the tube version

there nobody can see how you make this (nice idea :exclamation: ). But everybody can see "something or other works".


Raymond


I change before save: the animation was stopped (nothing else).


.

https://ggbm.at/2699059

© 2023 International GeoGebra Institute