# Sticky rotations

MatteLIST shared this question 2 years ago

I want to get an object to stay fixed at all possible positions when i rotate it around a point. When an object is rotated 90 degrees around a point, I get three copies, when it is rotated 1 degree, I get 359 copies etc.. Take a look at this worksheet from the NRICH project to get a better idea of what i mean: https://www.geogebra.org/m/M73Wf7PQ

The question is: how do I get the rotation to "continue" from the first copy created?

2

Hopefully this will get you started:https://wiki.geogebra.org/en/Sequence_Command

1

Thank you so much! I see the NRICH version used spreadsheet, but I wanted to see if there is another way. Can't believe I didn't think of sequences! :)I made this version: https://www.geogebra.org/m/dxjnhnr3 which basically creates 360 copies of the polygon for every value of n. The worksheet then became very unresponsive in the desktop version of GeoGebra, but seems to work fine in the web-app. I tried in Chrome on a PC and Safari on a MAC. Could you check it out and see if it works acceptable on your device/browser?

2

Attached a sample with the command Sequence()

The object (polygon1) is defined outside of the rosette in Graphics2

The following command create the rosette in Graphics1

l1=Sequence(Translate(Rotate(polygon1, (360°) / n m, O'), Vector(O', O)), m, 1, n)

This nested command has (from inside to outside) 3 parts (in bolt)

• Rotate(polygon1, (360°) / n m, O') rotate the originial (outside rosette)
• Translate(Rotate(polygon1, (360°) / n m, O'), Vector(O', O)) → move the object above to O (make a copy)
• Sequence(Translate(Rotate(polygon1, (360°) / n m, O'), Vector(O', O)), m, 1, n) → repeate the 2 nested commands above

The result in Graphics1 can be move with the point O (undependet of the original polygon1)

1

Thank you so much! I see the NRICH version used spreadsheet, but I wanted to see if there is another way. Can't believe I didn't think of sequences! :)I made another version based on sequences, which only uses Graphics1: https://www.geogebra.org/m/dxjnhnr3 which basically creates 360 copies of the polygon for every value of n. The worksheet then became very unresponsive in the desktop version of GeoGebra, but seems to work fine in the web-app. I tried in Chrome on a PC and Safari on a MAC. Could you check it out and see if it works acceptable on your device/browser?

2

yes, works OK in Windows 10, Chrome

1

Thanks for the help guys. I'm also working on another case of rotations, where everything works perfectly in the desktop app, but when i upload it to geogebra.org, the start button returns the error: "Error in script at line 3 from object knapp1(button1). UnknownCommand: if."

Do any of you know why this is?

Screenshot of the worksheet attached. Image is from GeoGebra 5, because 6 automatically translate commands to Norwegian.

2

Try with If (upper case) instead of if.

Maybe the translation to/from norwegian is wrong (I test in my environment: no problems)

.

Note: To check for errors: normally the ggb-file is needed

1

Thank you, the error was lower case. When upper case, If translated to the norwegian Dersom and the applet runs on geogebra.org.

1

Also, I am OP, from another account :)