I need to find the optimal coordinates for a pyramid apex

42 Views Asked by At

The problem I want to solve is to find the coordinates of the apex of a generic square pyramid from the coordinates of the four points that form the base. And the condition that has to be fulfilled is that the angles that form the edges that join the apex with each point of the base with respect to the vertical cannot be greater than 45º. I attach an image 1 to exemplify the problem.

Image 1. Description of the problem

I am treating the problem as a multiobjective optimization problem. The functions to optimize are four, one for each angle/edge, and they result from the inner product between the normal vector to the xy plane and the vector resulting from joining each vertex of the base with the apex. I attach an image 2 with the development to obtain them (only one is developed since all are the same but with the coordinates of each point of the corresponding base). And the restrictions I am using is that each of the functions minus 45 must be less than or equal to zero.

Image 2. Equations used

I am using the NSGA-II genetic algorithm (https://ieeexplore.ieee.org/document/996017) to solve this problem but the family of solutions I get are not at all as expected. It is true that many of the proposed solutions are valid but they are not close to what should be the most optimal value (I am currently testing it with a regular square pyramid of side 1). I have looked to see if transforming the functions would improve the results but it has not been helpful.

So, I would like to ask you if you think it makes sense to treat this problem as a multiobjective optimization problem and if you think it is appropriate to use genetic algorithms for this case. I have done some research on the subject but I can't find anything clear on the Internet.

Thank you very much for your time and help.