Kibo / AstroChart

A free and open-source JavaScript library for generating SVG charts to display planets in astrology.
MIT License
193 stars 63 forks source link

Wrong order on planets position #17

Open cptolemy opened 4 years ago

cptolemy commented 4 years ago

Good morning,

The routines are working great, but I found a small bug. If you look at the chart I send, to the red zone, you see that the planets are in the right place but in a litle bit "messy order". For instance, Saturn should be in Neptune's place - the line would be direct and closer and they wouldn't cross each other. What do you think?

Best regards

Kepler

image

Kibo commented 4 years ago

Dear Kepler thank you for your message. Yes, that is probably a bug.

Pls, try change the property in settings.js:: astrology.COLLISION_RADIUS = 10; //px

Has anything changed?

Tom

cptolemy commented 4 years ago

Hi Tom

I'm very sorry for the late reply. It solves one of them. But the others don't. I think the question is the order in degrees. Let's say that Mars and Jupiter are respectively in 15 and 10 Taurus. In the routine, Jupiter should be runned first because its longitude is less than Mars, even if in the array is in second, for example.

Clear skies Kepler

Kibo commented 4 years ago

Hi Kepler

thanks for your answer. You are right. It is bug, and it must be fix.

cptolemy commented 4 years ago

Hi

Thank you very much Kibo.

Clear skies Kepler

cptolemy commented 4 years ago

Good evening Kibo

How are you today?

Were you able to fix the problem? Sorry for disturbing.

Clear skies,

Kepler

damirmur commented 4 years ago

Good evening Kibo. Planets in a jumble. "planets":{"Moon":[258.08011522714537],"Venus":[258.5912389941932],"Jupiter":[252.89321884505577],"NNode":[307.69506558607495],"Mars":[337.3967626202549],"Lilith":[197.5099522088031],"Saturn":[63.5199982730417, -0.0812695056181732],"Uranus":[196.5099522088031],"Sun":[236.94743149654678],"Mercury":[258.4391577448461],"Neptune":[242.583140365416],"Pluto":[181.4691777663693]}

cptolemy commented 4 years ago

Greetings

I believe the problem is the array order runned for placing the planets and solving collisions. So, if a temporary array is created with the planets in ascending longitude value, there should be no jammed planets - we must be, however, very careful in placing the correct order of names/glyphs of the planets, and careful with and order like 333º, 356º and 3º, for instance (that goes from Pisces to Aries). If I knew the code well, that would be my best sugestion. I can make some few tries though.

Kind regards

Kepler

damirmur commented 4 years ago

Greetings I am also new to javascript. I wrote a graphic horoscope map in Java, it's difficult with collisions, but I did it right. So the code is there. It remains only to rewrite it correctly in javascript and insert it. Within a month, if God willing, I plan to do it. I'll let you know. There, there are other errors, wrong sign of Libra, strange colors of aspects, etc.

damirmur commented 4 years ago

Hello. I wrote, as promised, my version of the astrological chart. It is available here.

afucher commented 3 years ago

Hi @cptolemy ,

We are moving this repo to https://github.com/AstroDraw/AstroChart. All the issues will be handled there, if you want you can open this issue there. If not, in the next weeks I'll open it there for you 😄