Author Topic: Draw a horoscope  (Read 277 times)

0 Members and 1 Guest are viewing this topic.

CeesJ

  • Newbie
  • *
  • Posts: 2
    • View Profile
Draw a horoscope
« on: October 28, 2024, 10:46:43 AM »
I want to draw horoscopes that start with 0 deg Aries fixed at left. The standard drawhoroscope assumes th ascendant there, but I want every object including the axes asc-desc and MC-IC to be placed on their correct positions.

Is there a routine e.g. that draws the zodiac wheel at a given starting position without the asc-desc and MC-IC axes? Or any other piece of software that does the same?

CeesJ

Jean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1308
    • View Profile
Re: Draw a horoscope
« Reply #1 on: October 28, 2024, 11:12:02 AM »
Hi Cees,
I tried a few things but there's no easy quick way for drawhoroscope() to do that.
What you can do is make yourself a function to draw the horoscope by hand using drawzodiac() etc.

ps, I don't know any other astrology software  8)
Greetings from Groningen Netherlands.

Jean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1308
    • View Profile
Re: Draw a horoscope
« Reply #2 on: October 28, 2024, 11:52:55 AM »
Dit is een begin, je kunt er dan van maken wat je wil.
Je kan ook  nog column() erbij gebruiken.
Aspecten enzo er nog bijgezet.
Code: [Select]
window(800, 800);
menu(0, "Close", close);
copyhoroscope(-1, 0);
real planet[PLANETS], house[HOUSES], a;
int sorted[PLANETS];
char p1[256], p2[256], as[256];
getplanets(0, planet);
gethouses(0, house);
sortplanets(planet, sorted, 5, 0);
setsymbolsize(1);
@drawhoroscope(0, 0, width, height);
run;

#drawhoroscope(int left, int top, int w, int h)
{
visible(0);
int mx = left + (w - left) / 2,
    my = top + (h - top) / 2,
    r = mx / 2,
    r2 = h / 2 - 1,
    r1 = r2 - 40,
    r3 = r1 + 5,
    x1, x2, y1, y2;
drawzodiac(0, mx, my, r1, r2, r3);
circle(mx, my, r, -1);
setsymbolsize(1);
int i = 0; for (i < HOUSES)
  {
  a = house[i];
  getcirclepos(mx, my, r3, a, x1, y1);
  getcirclepos(mx, my, mx / 2, a, x2, y2);
  line(x1, y1, x2, y2, -1);
  getcirclepos(mx, my, r + 10, a + 10, x1, y1);
  putnumber(x1 - 8, y1 - 8, i + 1);
  }
i = 0; for (i < PLANETS)
  {
  a = sorted[i];
  getcirclepos(mx, my, r3 - 20, a, x1, y1);
  putplanet(x1 - 12, y1 - 12, i);
  getcirclepos(mx, my, r3, a, x2, y2);
  getcirclepos(mx, my, r3 - 10, a, x1, y1);
  line(x1, y1, x2, y2, -1);
  drawpos(mx, my, a, r1 - 70, 11, 2, planet[i]);
  }
int n = getaspects(0, p1, p2, as);
setsymbolsize(0);
i = 0; for (i < n)
  {
  getcirclepos(mx, my, r, planet[p1[i]], x1, y1);
  getcirclepos(mx, my, r, planet[p2[i]], x2, y2);
  line(x1, y1, x2, y2, aspectcolor[as[i]]);
  if (as[i] != CONJUNCTION)
    putaspect((x1 + x2) / 2 - 8, (y1 + y2) / 2 - 8, as[i]);
  }
visible(1);
}

:close;
  quit;

Greetings from Groningen Netherlands.

CeesJ

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Draw a horoscope
« Reply #3 on: October 28, 2024, 02:26:09 PM »
Dank Jean voor de voorbeeldcode. Ik was zelf al wat aan het knutselen met drawzodiac.

Jean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1308
    • View Profile
Re: Draw a horoscope
« Reply #4 on: October 28, 2024, 06:32:21 PM »
Helemaal vergeten, je kan ook drawplanets() gebruiken.
Er is ook nog drawaspects() maar die kijkt naar de horoscoop voor de asc, dus daar heb je niks aan.
Code: [Select]
window(800, 800);
menu(0, "Close", close);
copyhoroscope(-1, 0);
real planet[PLANETS], house[HOUSES], a;
int sorted[PLANETS];
char p1[256], p2[256], as[256];
getplanets(0, planet);
gethouses(0, house);
sortplanets(planet, sorted, 5, 0);
setsymbolsize(1);
@drawhoroscope(0, 0, width, height);
run;

#drawhoroscope(int left, int top, int w, int h)
{
visible(0);
int mx = left + (w - left) / 2,
    my = top + (h - top) / 2,
    r = mx / 2,
    r2 = h / 2 - 1,
    r1 = r2 - 40,
    r3 = r1 + 5,
    x1, x2, y1, y2;
drawzodiac(0, mx, my, r1, r2, r3);
circle(mx, my, r, -1);
setsymbolsize(1);
int i = 0; for (i < HOUSES)
  {
  a = house[i];
  getcirclepos(mx, my, r3, a, x1, y1);
  getcirclepos(mx, my, mx / 2, a, x2, y2);
  line(x1, y1, x2, y2, -1);
  getcirclepos(mx, my, r + 10, a + 10, x1, y1);
  putnumber(x1 - 12, y1 - 12, i + 1);
  }
drawplanets(0, mx, my, r1, r1 - 10, r1 - 20, 5, (r1 + r) / 2, 11, 0, 0);
int n = getaspects(0, p1, p2, as);
setsymbolsize(0);
i = 0; for (i < n)
  {
  getcirclepos(mx, my, r, planet[p1[i]], x1, y1);
  getcirclepos(mx, my, r, planet[p2[i]], x2, y2);
  line(x1, y1, x2, y2, aspectcolor[as[i]]);
  if (as[i] != CONJUNCTION)
    putaspect((x1 + x2) / 2 - 8, (y1 + y2) / 2 - 8, as[i]);
  }
visible(1);
}

:close;
  quit;


Greetings from Groningen Netherlands.