Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

In a course of writing a software to do computer vision I'm trying to "calibrate" the assembly with as little user interaction as possible. As a result I'm getting a few numbers from the point of view of my hardware and then trying to analyze those and figure out the relative spacial positions and angular divergence of the pieces.

Of course I'm doing one plane at a time $(X, Y, Z)$ but even then I'm left with a system of three equations that I can reduce down to 2 and that's where I get stuck - I cannot resolve it around either x or y (the only two unknowns in that formula):

$$\arctan\left( \frac{ax}{d - y} \right) + \arctan\left(\frac{bx}{d - y} \right) = k$$

What do I do with this? One way for me would be to "try" different $x$ and $y$ and adjust them until the two equations are satisfied (within a given precision) but I'd rather solve it "cleanly", TBH.

Any help would be appreciated.

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Use the fact that

$$\arctan P + \arctan Q = \arctan\frac{P+Q}{1-PQ}$$

Then your equation becomes, after a little algebra

$$\frac{(a+b)(d-y) x}{(d-y)^2-a b x^2} = \tan k$$

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.