|
Size: 671
Comment:
|
Size: 683
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 4: | Line 4: |
| First we must build the diff relation. It is interesting to not that this relation is what will limit the other relations | First we must build the diff relation. It is interesting to not that this relation is what will limit the other relations |
| Line 18: | Line 20: |
Given a line in one dimension from p1 to p2, we can find the line of length 1/2 (p2-p1) centered around the midpoint of the first line in MLPQ as follows:
/*
First we must build the diff relation. It is interesting
to not that this relation is what will limit the other
relations
*/
diff(x,y,z) :- x=0, y=0, z=0.
diff(x,y,z) :- diff(x1,y,z1), x-x1=1, z-z1=1.
diff(x,y,z) :- diff(x,y1,z1), y-y1=1, z1-z=1.
/* Our initial line */
line(0,1024, 0).
line(x,y,d) :- line(p1,p2,d1),
diff(p,p1,z1), diff(p2,p,z),
diff(x,p1,z2), diff(p,x,z2),
diff(p2,y,z3), diff(y,p,z3),
d-d1 = 1.