Rotate a geometric figure about a point

Thulani shared this question 2 years ago
Answered

Suppose I have a circle and a secant, how do I rotate these 2 figures about the centre of the circle to have different views of the construction using a slider. I want to rotate the original figures withouth having the traces. Example, if I have point A(2,3) and rotate by 90deg angle I want A to be (3,-2) I do not want A'.

There will be many objects, something like a cirle with chords and tangents,labels of angles etc. I want to rotate all of them at one time.

See attachment.

Files: temp.ggb

Comments (10)

photo
1

Create an angle slider alpha, then group in a list the objects that you want to rotate.

If C is the center of rotation and L is the list, use the command:

Rotate(L,alpha,C)
Move the slider in the attached file to view rotation

photo
1

Thanks, this I can achive, what I actually want is that the original objects be only visible objects but rotated. I do not want to see both original and image.

I tried setcoords command of the original list of points and hide the image list on the update of angle slider. I doesn't seem to work.

On the side, how do I use setcoords on each point on the list to take the corresponding point on the image list? I tried sequence and zip but they seem to generate new lists. This is to apply a command on each element on the list without generating new list.

photo
photo
1

GG creates objects then transform them. better if you creates objects then you transform them. if you want to see only the transformed objects you can hide the original clicking on blue dot near left of name or doing right click on object like in attached

if you do not see the objects in algebra view then check the auxiliary checkbox in basic properties

Files: foro.ggb
photo
1

Thanks, I did manage to rotate the original object using the list of original objects and the rotaion image list. Actually I had to hide the image list and update the original points. it works as expected.

But how do I use setcoords on each point on the list to take the corresponding point on the image list? I tried sequence and zip but they seem to generate new lists. This is to apply a command on each element on the list without generating new list.

photo
photo
1

I use element(list,position) for geting points of a list of points

setcoords(object) Changes cartesian coordinates of free objects.

https://wiki.geogebra.org/e...

photo
1

Thanks for response, I appreciate your answers, I've seen a lot of them in the forum and Simona Riva.

What I was looking for was a repeat. I can see in your response you mentioned setcoords operating on free objects.

I now have something like this:

Repeat(Length(L_1), SetCoords(C,x(Element[L_1', cnt]),y(Element[L_1', cnt])),SetValue(cnt,1)). I apply Setcoords on C 5 times with a list L_1 = {A,B,C,D,E}. GG is advanced I believe just that I haven't mastered it yet.

I believe there must be a tweak to get a free object given the element of a list. Eg. at position 1, I have point A, how can I then reference point A using the L_1 list so that I pass it to setCoords command?

photo
photo
1

If you want a free object from another you can use copyfreeobject(object)

photo
2

Thanks again, so there's no way one can just apply a command to a group of points like changing their coordinates.

photo
photo
1

I said

GG creates objects then transform them.

but if you use a script is posible. ie: script on update of a with the line

setvalue(L,copyfreeobject(rotate(L,1º,A))) will change L with L rotated around A

Files: foro.ggb
photo
1

GeoGebra has a tool that rotates objects around a point by simply dragging them.

In some cases it's very handy. You can find it in the first toolbox.

https://wiki.geogebra.org/e...

© 2021 International GeoGebra Institute