new to prolog 
Author Message
 new to prolog

I am taking a class for progamming in prolog.
This is my first project and am stunck already.

write a prolog program to calculate the days between two days.

days(1, jan, 10, dec, 123).

succeed if there is such dates, etc

or days(1, X, 10 dec, 123)


or days(1, jan, 10, dec, X)


   ______   Meow
   \ OO /  _/  
  :(__ =)
    U \\

Thu, 02 Jul 1998 03:00:00 GMT  
 new to prolog


> I want to write, using prolog, an astrology program that would generate
> a chart given name, DoB, time and location of birth.

Prolog might not be a great choice of a language, unless you consider
yourself a prolog expert.


> I believe i can calculate positions of planets at any time based only
> on two things: Knowing, for sure, their positions at some point in time;
> knowing how many years it takes for a planet to orbit the sun. However,
> i may well be oversimplifying things here and would appreciate your ideas.

No, it is much more complicated than that. In the grossest sense the
long term orbits are fairly regular, but in detail there are a lot of
perterbations going on. The motions of the planets interact and the
entire system is NOT a set of concentric circles with each point
moving in a uniform manner. And remember that you are projecting the
planet's positions to the view from some spot on the earth. You are
essentially going to have to make some approximations to achieve the
goal, but the accuracy of your approximations are at issue. Even being
a minute of a degree off can lead to problems for some astrological
techniques used on accurate times and places. Note that I suggest
prolog might be a bad choice for its recursive, rule based approach,
which may be highly inefficient for accomplishing integration. A
straight procedural approach may be significantly more efficient.

It might be very educational to locate some astronomy source code and
try to decipher that before proceeding. Just to get an idea of the
complexity of the problem, it is no accident that there are so few
astrology programs. Use archie to locate the de118 source code, and
note that you are forbidden to use this code in an astrology program,
so this is simply for instructive purposes. (It is interesting how
our tax dollars support this type of work, but we are forbidden to use


> Further, how the hell would one go about calculating where the ascendant
> should be placed (after the local sidereal time at birth has been
> calculated) without the use of a lookup table?

Traditionally, we used lookup tables--"tables of houses". The formulas
for calculating houses are simple compared to planet positions.


> Does the ascendant spin around the zodiac like a planet? - if so how
> long does it take to traverse 360 degrees?

The ascendant is the degree of the zodiac rising on the Eastern
horizon. The same degree returns every 23 hours 56 minutes, or some
amount close to that.

Scan the newsgroup for other recent postings on this topic for more


Wed, 15 Jul 1998 03:00:00 GMT  
 [ 3 post ] 

 Relevant Pages 

1. OpenFile for new with Prolog

2. New to Prolog !!!! - Please Advise

3. New to ProLog

4. New to prolog

5. New GNU PROLOG stable version

6. New to Prolog - some help please!

7. New at Prolog

8. I'm new to Prolog, got question...

9. New in prolog

10. New to Prolog

11. New with Prolog

12. new to prolog - need help


Powered by phpBB® Forum Software