Transform most recent version of image

Mrs Bowie shared this question 2 years ago
Answered

I have an image (a picture that I inserted) that I'd like to be able to reflect and rotate with buttons/sliders. However, I want the transformations to build on one another (so if you reflect and then rotate, it's the reflected image that rotates, not the original). Right now, all the buttons are acting on the original figure. Is there a way to do make them transform the most recent image?

https://www.geogebra.org/cl...

Best Answer
photo

Improved version

- center from pic_{1} is moved to (0,0)

- only the last is visible

- transparent background picture

- rotation is variable

Comments (9)

photo
1

do you mean Reflect(pic1'_{1}, f)

photo
1

Normally, yes! But I want them to be able to do whatever combination of moves they want, and the button or slider to always act on the most recent image. (So they could reflect, then rotate three times, then reflect again, or whatever combo of moves, and it would show those moves building on one another.)

photo
photo
2

¿cómo pueden ellos decirle a GG si quieren reflejar o rotar?

suponga que el alumno decide rotar reflejar rotar y rotar; ¿cómo GG sabe el centro de la rotación y el eje del reflejo?

¿estos elementos están ya en la página? me parece que quiere que el alumno sea capaz de hacer lo que hacen las herramientas de GG pero sin usar las herramientas y eso para mí que es imposible

tal vez se pueda simular construyendo una lista de acciones y traduciendola a un comando execute

o creando herramientas personales para cada accion o mediante botones que realicen la accion y oculten el ultimo elemento creado actuando según un contador de elementos creados con esos botones

Files: foro.ggb
photo
1

perhaps: use navitagation bar

photo
1

perhaps: use navitagation bar

photo
1

In the appendix a solution based on Execute() (idea mathmagic)

The name of the transformed image gets a sequence number (last+1)


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

Depending on how you answer the questions of mathmagic, the solution must be modified.

I made some (simple) assumptions.

Note: If the center from pic_{1} is moved to (0,0) (using point A), then the result may be more to your liking.

In this case inactivate the last 2 script lines in buttonPostProcess (character # at position 1 of line)

photo
1

Improved version

- center from pic_{1} is moved to (0,0)

- only the last is visible

- transparent background picture

- rotation is variable

photo
1

This is exactly what I needed! Such a clever way of getting it to transform the last image - I learned so much here. Thank you!

photo
© 2023 International GeoGebra Institute