# Thread: Corners of a Cube

1. ## Corners of a Cube

G'day, I've had this problem latly that has been driving me crazy, any help on what to do would be appreciated.

basicly i've been given a cube with the top like this (the slopy drawring attached) and i've been told the 3D coordinates of A and C. What is the best method of calculating points D and B with the only other information given is that we're talking about a pefect cube placed on a slant, so only the Z coordinates of B and D are the same.

I have calculated the vector between A and C, and also the midpoint of the line (also the midpoint between D and B) however i now have no idea how to proceed.

ANY help appreciated greatly.

2. Suppose you were given
A= (x1,y1,z1), C = (x2,y2,z2)

Then O the centre of the face is at 0.5* (x1+x2,y1+y2,z1+z2)

And you must have D = ((x1+x2)*0.5+a,(y1+y2)*0.5+b,(z1+z2)*0.5)
and B = ((x1+x2)*0.5-a,(y1+y2)*0.5-b,(z1+z2)*0.5)

since you were told the Z coordinates were equal.

Now OA = ((x1-x2)*0.5,(y1-y2)*0.5),(z1-z2)*0.5)
while OD = (a,b,0)

But OD.OA = 0 so (x1-x2)*a+(y1-y2)*b = 0;
Also |OA|=|OD] so aa+bb = ((x1-x2)^2+(y1-y2)^2+(z1-z2)^2)*0.25

Eliminate either a or b using the equation coming from OD.OA = 0 and then
solve the quadratic to find a or b.