Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: (untagged)
Posted
Updated 18-Mar-10 19:34pm
v2

I think you should give a try in the Algorithms[^] forum. You may have better answers there to get the approach and once you have the ideas, then reask about the implementation.

Maybe I'm totally wrong or my option can not be resolved mathematically (long time without using algebra and vector spaces), but considering that a cube has same side length, and sides of 4 adjacent points are perpendicular to each other (V12 with V14 and with V15)
Then you could try:
Get the ecuation of the line that goes through each point Xa,Ya along the Z-direction and then try to solve an ecuation system of spheres assuming that the S1 (sphere along line L1) must cut L2 and L5, S3 must cut L2 in the same point and L7, and S6 must cut L5, L2 and L7 in the same points as the previous ones. That would give you the half of the cube.
Then you can do the same for the other side, or try to find lines with 90 and 45 angles parting of the previously founded points that intersect in the same coordinates along the other vertical lines.
 
Share this answer
 
thanks, i have done most of the calculations, i am not good in maths, but google is my friend. the problem i was facing is to find the coordiantes that will form one face of the cube in a optimal way. thank you.
 
Share this answer
 
thanks 4 the response. I am trying to solve this since last few hrs. and i do not actually need an answer in any specific language, i just need some one to guide me, if at all posible. and instead of pointing out so many mistakes, u could have mentioned the approach to solve this problem, that would be very help full. any ways thanks again for the response.

made a bit progress on it, now i can determine the sqaures(i shld say rectangles) but the problem is how to find the coordiantes for each rectangle??
 
Share this answer
 
v2
Wow - your tag is coding. You linked to a coding problem on another site. You spelled code 'cude'. Your first step is to specify a language. Your second is to try to solve it, thinking about it is the reason these things are posed, not so you can ask random strangers to tell you how to do it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900