   Finding missing points of a rectangle
  I've had a lot of caffeine, so please bare with me. I have two diagonal points of a rectangle, and the distance of one of the sides of the rectangle. I want to find one of the other corners. Am I missing something incredibly simple to obtain this?The rectangle is not actually axis aligned, as is so in my drawing. I have points R and P, and I have the distance from R->B, which is obviously equal to P->G. I want to find point G.Appreciate any help. If given a choice, I would prefer to use vector math. I would understand even ugly vector math better than any clean trigonometry.   
  Trigonometry? You have two lengths and a right-angle.   ;  Could you be more specific? The only references I have are positions R and P, and the distance between R and B. There's no known line that serves as a right angle, is there?   ;  With the information that you've given there are 2 possible answers:  a rectangle that goes up the page and one that goes down the page.  i.e. P and G could just as easily be above B and R as they could be below.That should be sufficient information.But if not: there are only 2 possible lines that extend from R that are also 90 degrees from the line B->R.[EDIT: misread the problem...  sorry]All you need to know is SOA CAH TOASin(angle) = opposite/adjacentCos(angle) = adjacent/HypotenuseTan(angle) = opposite/adjacentIn your case you know the length of the hypotenuse and one of the sides of the right triangle.  so solve for the missing variables and you can find the distance of the other side of the rectangle.  from there you should be able to find the points.-me   ;  I'm starting to feel pretty dumb, but I'm still not catching on. Let me just make sure I'm understood. This is all of the information I have:I don't have position B. It can be anywhere on the outside of the circle around R.   ;  You know the distance between R and P as well. You can calculate the distance between B and P using Pythagoras.Then you can solveR.B = B.P = 0 for B with the constraint that length(RB) is as calculated.EDIT: No, that's wrong. Bear with me I'll make another post.So no trig just pythagoras and dot products I think.There should be just the 1 solution if it is 2D. Otherwise there are infinitely many rotations around the axis RP.   ;  Two different methods come to mind.  You know R, P, and the radius of the gray circle.  The point B is going to be on the circumference of the circle such that RB and PB are perpendicular.  So all you need to do is find the line through P perpendicular to the circle at R.  Note how there are two such possible lines, indicating that there isn't a single unique solution to the problem.The second approach is to use the Pythagorean theorem to determine the length of PB/RG.  So now you have a circle at R with radius r1 and a circle at P with radius r2.  Solve for their intersection to get B.  Again, the circles will intersect in two places indicating two solutions.On a final note, the two solutions will be mirrors of each other about the line PR.   ;  You know that PBR is a right angle. You know the length of BR and the length of RP. You know the length of 2 sides of a triangle, and you know one of the angles opposite to one of those sides. You can use the law of sines to find the rest of the information you need.For this special case of a right triangle, the SOH CAH TOA interpretations of sine, cosine, and tangent can be used.[Edited by - Vorpy on September 12, 2007 2:09:45 PM];  I left out a pretty important detail. B will always be "to the right" of R when facing P. R and B are attached, and B actually has a "front" which will be facing P in the correct result.This routine is actually to aim a turret (B) at a target (P) that's attached to a pivot point (R).I'm still looking at the information presented so far. Some sense of logic may indeed sink in soon.   ;  Well you could just rotate a vector in the direction of RP by the angle BRP, and then scale it so it is length RB.   