# RotateText in a Sequence

Duane Habecker shared this question 3 years ago

I'm making a ruler and would like the numbers on the ruler to rotate along with the ruler.

I've got this sequence and it is showing up perfectly on the ruler, but they don't rotate with the ruler...

Sequence[Text[i, A + i u - 0.8v - (0.1, 0)], i, 0, a]

The text is located perfectly, but doesn't rotate.

However, when I include RotateText, the list just sits at the origin. It rotates perfectly, but is no longer on the ruler.

Sequence[RotateText[Text[i, A + i u - 0.8v - (0.1, 0)], -α], i, 0, a]

Am I missing something obvious?

RotateText[] is a not really nice and not exact calculated laTex-command. The problem is that the center-point is shift with the rotate-angle.

To compensate this there is create the object rotTxtSample (hidden at position (1,1)). This Sample rotate also with angle alpha. And give an vector (rotVecTxt) from center (about) to the corner top left (about). This vector is needed in the list labelsInchRot to compensate the rotate-shift. The text is embeded in a TableText with a long space-line. This is for compensate the lengt of the text (1 or 2 digits).

.

The text-properties in rotTxtSample and in labelsInchRot must be same. Othervise the vector (rotVecTxt) is wrong.

.

The solution is only 90% exact. More precision need a lot more calculation and objects and is very complex.

But I think it's good enough.

.

1

RotateText[] is a not really nice and not exact calculated laTex-command. The problem is that the center-point is shift with the rotate-angle.

To compensate this there is create the object rotTxtSample (hidden at position (1,1)). This Sample rotate also with angle alpha. And give an vector (rotVecTxt) from center (about) to the corner top left (about). This vector is needed in the list labelsInchRot to compensate the rotate-shift. The text is embeded in a TableText with a long space-line. This is for compensate the lengt of the text (1 or 2 digits).

.

The text-properties in rotTxtSample and in labelsInchRot must be same. Othervise the vector (rotVecTxt) is wrong.

.

The solution is only 90% exact. More precision need a lot more calculation and objects and is very complex.

But I think it's good enough.

.

1

Thank you! This is exactly what I was looking for. You are brilliant!

1

why do you not use an image of a real rule for this?

1

rami's solution is prefect!

ps: as rotation and position, see this:

https://help.geogebra.org/t...

1

I agree with mathmagic for there are already many files in the platform that don't ask for the magic of rami, that are acurate and easy to use.

Take a look on https://www.geogebra.org/se...

chris

1

It's difficult for me to say the followeing in english, but I try and hope I meet the right sound:

I think GGB need no simulation of physical geometry tools.

To learn geometry I think with physical geometry tools is the best way.

But a simulation reduce/destroi the learning effect.

Analogie: The education for pilots of passenger aircrafts start in a Chesna and not with a PC-flight simulation.

Much more later, after a lot theorie und praxis in biger aircrafts, simulations are useful.

.

This is one aspect, another aspect is that GGB is a very nice tool to have pleasure for yourself. Similar like a game without further benefit. In this context a -- citation: "magic" -- solution is nice to find (I mean this with the (same ?) ironic undertone).

This is a underestimated aspect of GGB. Similar like mathematik: the chance to find something new is for the most people equal zero. You can be happy when you understand, what other people has found. But for me mathematik/geometrie is also like a game and it's also nice to gaming on a lower level. In combination with GGB it's near perfect.

.

But shure, if you want have (not with the priority self-design/make/pleasure) a simulated ruler (without really asking for what and why) a picture is the easiest way. And a copy from GGTube is most efficient.

For example: https://www.geogebra.org/ma...

1

Rami, Ich möchte es im Deutsch schreiben doch mit nur 2 jahre im schule genügt mein Deutsch nur in Vakanzen.

When I used the word magic I meant it, and that without irony.

If it is a task to devellop a ruler oneself, your solution is truely great. Many of the tools in GeoGebra to could be contructed by the users themselves e.g. a perpendicular line or a perpendicular bisector. Then you have to judge: will I use the tool in another construction or is it a task to construct them with ruler and compass.

With the ruler it's the same: is it an advanced GeoGebra task to combine texts, rotations etc. to construct a ruler oneself? Then you did a great job. Do you just like to use it as an existing tool, then choose an image. I cannot look into the brains of who asked the question. But he's got now two perfect options to suit what he's looking for. Sometimes it's very difficult to judge, reading a post, and already a few times I responded with something completely different then it was meant. So I gues I'll let it to him to interprete and to make his choice. I'll never reply in an ironic way to an answer given for free by a volunteer, as I am to.

greetings

chris

1

Rami's solution is exactly what I was hoping for. Using images to simulate a ruler would have been much quicker (and easier) if I was only interested in creating a ruler. Rami's solution allows me to use it in other situations where images are impossible or impractical.

I suppose it is the difference between finding a solution to a specific situation and finding a solution that is generalizable. :-)

1

Hi chris,

Thanks for clarification.

My irony was an irony. I make something nice (rotate text) for something, in my opinion, not nice (ruler in GGB).

Originally, I wanted to write this as a comment on my first post. But the reason for it needs many (english) words. I was too lazy.

.

greetings

Raymond