List of Spheres

MiroFrey shared this question 7 years ago

Hi there,

I am having a hard time figuring out, how to delete spheres from my list of spheres I just created. Please tell me were my mistake is.

I attached the the construction, so you can follow through using the construction protocol.

The interesting stuff happens in steps 13 to 15

Though I am trying deleting the just added element (in two different ways) the element is still in the newly returned list.


Comments (2)



it seems to me that GG does not compare conics point to point nor by definition

you can create a <listofcentres> like Zip[centres[c],c,list1]

another <list of radius> like Zip[radius[c],c,list1]

then localize the sphere using indexof[] and remove using keepif or zip or take

think that create a list of centres and radius is better than create spheres at the beginning



Thanks to you, I was able to come up with a solution using KeepIf. and just one line of code

I again attached a file using this idea.

Basically the following line is needed

    KeepIf[(Radius[conus] ≠ Radius[sphere]) ∧ (Center[conus] ≠ Center[sphere]), conus, list]

where "sphere" is the sphere we want to delete from "list".

conus is just a name of a variable.

This idea spreads nicely to other objects which lists in GeoGebra cannot handle.

One figures out how to characterize the objects of the list

and then negates it like above.

This way all objects which fulfill the characteristica will be deleted.

For KeepIf see

© 2022 International GeoGebra Institute