REMIS: A Collision Detection Problem by Hoon Hong (Circle-Square)

Computational Geometry - A Collision Problem by Hoon Hong

Description of the problem on p.318: A circle of diameter 2 is initially centered at $(0,0)$, and it is moving with the velocity 1 along the x-axis. The square has side-length 2, and is initially centered at $(0,-8)$, and is moving with the velocity [vx] and [vy]. We want to decide if these two objects would collide.

load redlog;
rlset ofsf;

vx, vy: velocity of the square.

pcol := ex({tt,x,y},
   tt>0 and -1<=x-vx*tt<=1 and -9<=y-vy*tt<=-7 and (x-tt)**2+y**2<=1);

refined sentence (p.319) adding necessary condition for the collision time:

col :=  ex({tt,x,y},
   6<=vy*tt<=10 and -1<=x-vx*tt<=1 and -9<=y-vy*tt<=-7 and (x-tt)**2+y**2<=1);

selection for vx, vy on p.318:

vx := vy := 17/16;

rlqe col;

selection on p.325:

vx := vy := 15/16;

rlqe col;

end;  % of file