1
$\begingroup$

I want to know if it possible, using only the $+ - \div \times$ operators to solve a simple geometry problem. The questions is further complicated because I want to integrate it into a very restricted equation editor (ie: I don't have a full programming language).

I know three points, $(x_1,y_1),(x_2,y_2), (x_3,y_3)$ and I don't know $(x_4,y_4)$. The blue line is the shortest route from $(x_3,y_3)$ to the red line.

Diagram of the problem

I know this would usually involve a dot product, and what is effectively a simultaneous equation, but I need the answer in terms of two one line equations. No variables or intermediate steps are possible.

$x_4 = \text{long line of calculations}$

$y_4 = \text{second long line of calculations}$

The answer doesn't have to be very precise, so an approximation would be equally helpful.

  • 0
    Step 1: find slope of AB. Step 2: immediately get slope of CD. Step 3: find equation of line AB/CD. Step 4: Solve the linear equation system. Step 5: Incorporate the four steps into a single program, each step being a small module and can handle input-errors, etc.2012-08-12

1 Answers 1