vectors "jumping" unexpectedly

lohabithi shared this question 8 months ago
Answered

Hello, whenever the output of a user tool comprises vectors, and when I use several instances of the same tool on different objects, the vectors from the previous instance "jump" at the location of the new instance. If I move the input objects of the first instance, the vectors "jump" back in their initial position, but then the vectors of the second instance jump also!!!

This has been happening since years. I took the habit of not having vectors as output of user tools, but sometimes it is useful! (lists of vectors work, they do not "jump". But lists are not always convenient as you can't select an item by clicking on it).

Has anyone an idea how to work around this?

Is there a plan to solve this problem?

Thank you,

Laurent


Note: Points work. So a turn around is to have points as output which I then must link to create vectors. But it doesn't show what is the direction of the vector, so it takes time to find this direction by other methods...

Comments (15)

photo
1

Note: Points work. So a turn around is to have points as output which I then must link to create vectors. But it doesn't show what is the direction of the vector, so it takes time to find this direction by other methods...

photo
1

Note: This problem happens in 3D only.

photo
1

I think it is an

Application to computer graphics of https://en.wikipedia.org/wi...

so it is not possible solve the problem as you hope

photo
1

This is an interesting theorem :)

However, I think there is no math difficulty in joining points by a vector. If the points exist, we can always join them... (As I do by thand as a turn-around)

So it looks more like a problem of how user tools handle vector outputs.

photo
photo
1

I have attached a simple example of this phenomenon. When you apply the tool "force from face" (in the menu) to the faces of the tetrahedron, successively, the element's values are correct in the algebra window and the points are shown correctly, but the vectors are all shifted to the last element modified...

photo
1

Maybe try constructing the tool in a different way

photo
photo
1

I can not open your tool; what should the tool do?

photo
1

Oh... The mystery thickens...

I tried opening the tool in "manage tools/open" and it shows only undefined objects!!!

And yet the tool works!!!

I never saw that...

Attaching the file, with the tool applied to another polygon. (please open the 3D view, all objects are in 3D)

Thank you so much for looking into this!

photo
1

Now I have made another tool doing the same thing.

This is the script:

First I make a plane in 3D to be sure all objects will be 3D

Then I make a polygon on this plane (here it's a pentagon). The name is poly1

Now this is the script:

O=Centroid(poly1)

P=O + PerpendicularVector(poly1)

e=Vector(O, P)


Now the output objects of the uset tool are e, O, P

The input objects selected automatically are the 5 points of the pentagon.

BUT I remove these 5 points and select the pentagon instead. (This is very convenient as the tool can be used with one single click with any polygon)

And that's it.


PLEASE NOTE that the tool is working, in the sense that all the output objects are defined, and correctly defined, in the algebra view.


It is only an issue of display of the 3D vectors when they are the output of a tool... Slightly irritating... ;)

photo
1

If I unclick "show object" for the output vectors and create new vectors from the output points it works fine. (This is what I do in practice). Also I can still use the VALUES of the output vectors, which are correct. It's just that they are shown from the wrong starting point.

photo
1

tienes razón: he construido una herramienta desde el principio para hacer el vector a partir de un polígono y cuando la uso varias veces me redefine el punto centroide de los polígonos sucesivos al último de ellos y me pone todas las direcciones perpendiculares al polígono en el mismo punto, y tampoco puedo editar la herramienta

solo puedo concluir que no es posible hacer una herramienta empezndo con poligono en 3D y que funcione.

photo
1

No it really works. All the objects in the algebra view are created as expected. It's only a visualisation issue for vectors in 3D.


Also it has nothing to do with having the input as a polygon. If you keep the 3 points (or 5 points) automatically selected by the wizard, it does the same anyway: The vectors are all shown starting at the last occurrence of the tool, instead of staying where they have to.

photo
1

There is a slight ambiguity with the representation of vectors in geogebra: Geogebra tries to encode the starting point together with the vector, but without showing it explicitly. The only way you can see it has encoded the starting point is when the vectors are shown in bold in the algebra view. This feature is extremely useful. Otherwise if we want to encode a vector's location we have to keep a list of points in parallel. However the handling of this feature is tricky at times. Some operations loose the location, and the resulting vector is shown in normal font (not bold). It is tricky when such vectors are input or output of user tools...

photo
photo
1

En el adjunto hay dos herramientas construidas siguiendo exactamente los mismos pasos

una de ellas se puede abrir/editar y la otra no y ambas no tienen vector alguno, así que las herramientas para polígonos 3D no funcionan como las herramientas para los polígonos 2D

Files: foro.ggb
photo
1

Thank you Mathmagic, that's good to know... But why tools with 3D polygons can't be edited? Mystery... The 3D modules of GGB probably have some shortcuts that make them less robust than 2D...

I used 3D user tools already but with scripts only. But for quick problem-solving, normal user tools are great!

So I hope this problem will be solved one of these days!

photo
© 2021 International GeoGebra Institute