All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Shapes > Geometry
Square from four points (Posted on 2013-01-08) Difficulty: 3 of 5

Given four points A, B, C, and D.

Construct a square PQRS such that the points A, B, C, and D lie on lines
PQ, QR, RS, and SP respectively
or
describe the configuration of the four points where the construction is not possible.

Note: Don't confuse lines (of infinite extent) with sides (of finite extent).

See The Solution Submitted by Bractals    
Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts Analytic beginning. | Comment 4 of 5 |
What the problem boils down to is creating a pair of parallel lines through A and C with a second perpendicular pair through B and D.  The four intersections of these lines would then be P,Q,R,S.  The trick is to make this rectangle a square.

Let the lines through A and C have slope m
so the lines through B and D have slope -1/m

http://en.wikipedia.org/wiki/Parallel_%28geometry%29
gives a nice formula for the distance between parallel lines through two points.

The lines through A and C have distance
 |(yc-ya)-m(xc-xa)|/√(m^2+1)
The lines through B and D have distance
 |(yd-yb)-(-1/m)(xd-xb)|/√((-1/m)^2+1)

Setting these distances equal should allow us to solve for m.  I don't have time to finish now but it looks quadratic in m which makes sense since playing with sketchpad indicates we often get two solutions.

Edit:
It's not quadratic.  The absolute values are giving the multiple solutions.
Setting the equations equal and simplifying a bit gives
|(yc-ya)-m(xc-xa)| = |(yd-yb)-(-1/m)(xd-xb)||m|
|(yc-ya)-m(xc-xa)| = |m(yd-yb)+(xd-xb)|
There will be two solutions: one for the possibility that the arguments inside the absolute values have the same sign and one for the possibility that the signs be different.

m = ((yc-ya)-(xd-xb))/((xc-xa)+(yd-yb))
or
m = ((yc-ya)+(xd-xb))/((xc-xa)-(yd-yb))

So the construction is complete.

Edited on January 10, 2013, 11:12 am
  Posted by Jer on 2013-01-09 13:48:50

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (5)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information