How to apply one script on multiple objects and hide?

Hayat shared this question 1 month ago
Answered

e.g: Point A , B , C ; Line , f,g ; vector u,v

a = slider [1-5]

If[a=0 , hide ????]

if[a=0, setvisibleinview[{A,B,C,f,g,u,v},1,false],setvisibleinview[{A,B,C,f,g,u,v},1,false]]

How to execute above command on multiple objects.

Pls also share how to show/hide multiple objects with if[] command.

Comments (20)

photo
1

You have 3 possibilities:

If you have 1 windows free (Grafics, Grafics2 or 3D): then use: script in slider (not nice)


  • SetVisibleInView( <object>, 1, a != 0)
  • SetVisibleInView( <object>, 1, a == 0)

or

write a JS (javascript) not nice

or

use properties advanced (nice, see attached)

photo
1

Thanks rami for the reply, i used SetVisibleView[object,view,true/false] command , i want to add multiple objects in this one script . How to add them. in place on <object>

i tried many but none of them worked. e.g {A,B,C} , selectedobjects[] , execute[].

photo
1

Otherwise i need to copy paste the same script for every single object. and change the object.

If there is any other command to hide multiple objects . Pls share.

photo
1

SetVisibleView[object,view,true/false] using in the slider is really not nice

Quote/Question: How to add them. in place on <object>?

Answer: (I think you mean with <object> for example A,B,C..)

then: with conditionToShow in properties/advanced (very nice solution) and not with script

If the condition is complex then use a bolean, defined in the Algebra-View. In some cases it's OK when the bolean is set in scripts. (exor)

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

see sample

photo
1

Pls suggest,how to hide point A,B,C and vector u,v in ConditionToShow

when slider a=0 A,B,C hide otherwise it shows

photo
1

thanks rami, its done. I used condition to show.

Is there any script for hide/show objects and multiple objects in one scipt in the position of <object>. also Pls have a look my other questions.

photo
photo
1

See a sample with bolean here.

Note: also you can use && and || and ! (and/or /not) in conditionToShow

(check all objects in conditionToShow, check script in slider)

-----------

The other question:

I use not GGB 6.0 (less experience)

but I think (not sure) there exist no script commands for this.

photo
1

Yes rami i posted 3-4 question which i need to know the answers. Pls have a look at this. i run out my holidays . with you and GGB team help i can complete my projects.

photo
1

What is not be answered? (please exact not quick)

photo
1

specially the question you mentioned i need answer (about hide/show clipping and change background color by command) and grid on xz , yz plane in 3D graphics as in xy plane.

photo
1

sorry: I use not GGB 6.0 (less experience)

for grid try to use ShowGrid( <View>, <Boolean> )

for axes try to use ShowAxes( <View>, <Boolean> )

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

one sample more for "conditionToShow" without scripts

photo
1

for 3D look also here

https://help.geogebra.org/t...

photo
1

Thanks for reply. but my question is 3D graphics has only xy grid is shown . I want to show yz and xz grid also. is there any way to show and hide xz and yz grid.

photo
1

Also this command not working for hiding the plane just lowerin the shade of plane. setvisibleinview(xOyPlane,-1,false)

photo
1

https://help.geogebra.org/t...

you can send a post more and you can set "vote"

photo
1

Thanks rami, i set a "vote" also i have post as well.

photo
1

Can you pls see how to show/hide clipping in 3D graphics.

photo
1

search in google with "clipping script" site:Geogebra.org

I think script not exist (not sure)

photo
photo
1

make your on grid and plane (movable with A)

photo
1

Thanks rami . This is good idea to make a grid.

How can we make vector field on yz and xz axis only.

If ,

f(x,z) =P(x,z) i + R(x,z) k [vector field on xz plane]

g(y,z) = Q(y,z) j + R(y,z) k [vector field on yz plane]

in 3D graphics.

photo
© 2019 International GeoGebra Institute