users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

An example of finite domain?


From: Ugoretzc
Subject: An example of finite domain?
Date: Sat, 8 Mar 2003 14:08:07 EST

I am new to GNU-Prolog and I have a problem that I wish to solve
(I am trying to write a domino game and am trying to figure out how to lay
out the dominoes without them crossing).  Below is an except from that process.

Given two angles A1 and A2, X1 = 20*sin(A1), Y1 = 10*cos(A1), X2 = 20*sin(A2),
Y2 = 10*cos(A2).  Also X3 = 0, Y3 = 0.
Let VX1 = X2-X3, VY2 = Y2-Y3, VX2 = X1-X2, VY2=Y1-Y2.
Compute a function Q = VX1*VX2+VY1*VY2.

Make the domain of A1 and A2 equal to 0 ... 90.  Constrain the _expression_ Q > 0 to equal true.  Minimize the sum of angles A1 and A2.

I have tried solving the problem myself, but I am getting errors.  Can anyone help me please :-)?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]