Author Topic: anglestring()  (Read 374 times)

0 Members and 1 Guest are viewing this topic.

ABer

  • Administrator
  • Hero Member
  • *****
  • Posts: 1250
    • View Profile
anglestring()
« on: September 13, 2024, 04:09:08 PM »
Hi there - I made an interesting discovery today. The anglestring() function is designed to facilitate the arrangement of strings around a central point, say the position of planets in a sign within a chart.

Quote
Syntax anglestring(int mx, int my, int angle, int radius, char string[$]);

Action: displays the string 'string' from middle mx, my at angle 'angle' and radius 'radius'.

Typically, if one wants to use a series of strings in a linear arrangement, the putstring() function would be used. However, it seems that anglestring() can be adapted to support the flexible arrangement of strings in a linear fashion.

The code for this is as follows:

Code: [Select]
strset(s, "%a", lunarSort[i] / 12);
anglestring(10 + lunarSorted[i] * 2.5, top + 35, 270, 0, s);

Instead of specifying a centre point using vars mx and my, the linear position of the string and the top position of the string are substituted. The angle is specified as 270 degrees (vertical, leading character down) and the radius is given as 0.

The result can be seen in the screen shot below. The string in question is the degree and minute of the planet's position using modulus 30.

Thanks. Ed


Vol2

  • Guest
Re: anglestring()
« Reply #1 on: September 14, 2024, 07:31:41 AM »
I also like to use anglestring.
Your suggestion is great, it opens up interesting options.
Thanks for sharing.
Volker

ABer

  • Administrator
  • Hero Member
  • *****
  • Posts: 1250
    • View Profile
Re: anglestring()
« Reply #2 on: September 14, 2024, 07:51:43 AM »
Thanks Volker. Good to hear from you. I was amazed when I tried this just to see if it would work and 'hey presto' - it worked just like magic. All the best. Ed