How to determine the visibility of an object from the top of a hill

148 Views Asked by At

We are developing software to train children how to cross the street safely. Part of the training is to teach them not to cross when they don't have enough visibility due to obstacles. In this case, the obstacle is a hill. The child is standing on a plateau on the top of the hill.

Diagram of the problem (not to scale)

Cars come up the hill at a constant speed (say, 13.88 m/s). The children need to have 6 seconds of visibility to cross safely. Therefore they need to be able to see the car for at least 83.33m of the car's travel (6s * 13.88m/s). Cars are 2m tall (assume they're rectangles), and the child is 1.25m tall. The slope of the hill will be constant and we'd like it to be 30 degrees. We want the distance between where the hill starts to round out (point A) to where it's completely parallel with the top of the ground (point B) to be 20 meters.

How do we calculate: The x-value of where the child is standing such that the distance along the road from the front of the car to the participant is exactly 83.33m, at the moment the participant can first see the car? (Assume that x=0 is point B)

The picture is not to scale. Also the box is a car, if that wasn't clear (not an artist).

1

There are 1 best solutions below

6
On
An outline of the solution is here:

Let the child be at $(a, 0)$. Child's eyes are at $(a, h_c)$. Let the vehicle be at $(x_1, y_1)$ and top of vehicle be at $(x_2, y_2)$. The height os the vehicle is $h_v$. Assume that the road is not a curve but a sharp joint located at $(0, 0)$ as in the image. Let the distance along the road from child to car be $K$. The angle of incline of the road is $\theta$. enter image description here.

  • $\frac{y_1}{x_1} = tan(\theta) \implies y_1 = x_1 tan(\theta)$ Equation of line through (0,0) making an angle $\theta$ with positive X-axis, and passing through $(x_1, y_1)$
  • $\frac{y_2-y_1}{x_2-x_1} = -cot(\theta)$ Line joining $(x_2, y_2)$ and $(x_1, y_1)$ is perpendicular to line joining (0,0) and $(x_1, y_1)$, so product of their slopes is -1.
  • $(x_2-x_1)^2+(y_2-y_1)^2=h_v^2 \implies h_v^2=(x_2-x_1)^2(1+cot^2(\theta)) = (x_2-x_1)^2cosec^2(\theta) \implies x_2=x_1\pm h_vsin(\theta)$ Applying distance between points formula
  • putting $x_2-x_1 = \pm h_vsin(\theta)$ back in second equation, $y_2 = y_1 \pm h_vcot(\theta)sin(\theta) = x_1 tan(\theta) \pm h_vcos(\theta)$
  • total distance along the road from child to vehicle $= K = a +\sqrt(x_1^2+y_1^2) \implies a+x_1sec(\theta) = K$
  • There is line of sight between child and top of car. At the earliest of such a possible point, the eyes of child and top fo vehicle are a straight line through the origin, so, $\frac{y_2}{x_2} = \frac{h_c}{a} \implies \frac{x_1 tan(\theta) \pm h_vcos(\theta)}{x_1\pm h_vcos(\theta)}=\frac{h+c}{a}$
  • From the last two equations, values for $a$, $x_1$ can be found