Message Boards Message Boards

GROUPS:

Get formula to calculate text rotation angle (clock angle problem)?

Posted 9 days ago
106 Views
|
1 Reply
|
2 Total Likes
|

Hello. Let's say we have circle. We cut it to 4 'triangles' but longest hand is perfect arc. I want to write some letters on this arc but rotate it to be horizontal always. In other words, how to make clock face with horizontal numbers. It can be any hour, so can be 12-3-6-9, but can be 1-4-7-11 etc. Thanks for suggestions.

The description is not very clear. Do you mean something like this?

numbers = Range[12];
angles = Table[i*2*Pi/12, {i, 1, 12}];
numberAngles = AssociationThread[numbers, angles];
Graphics[{
  Circle[{0, 0}, 10],
  Text[Style[#, 14, Blue, Bold], {9 Sin[numberAngles[#]], 9 Cos[numberAngles[#]]}] & /@ {1, 4, 6, 7, 11}}]

enter image description here

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract