0
$\begingroup$

Suppose that I have a convex regular polygon with $k$ vertices on the complex plane, and the first vertex lies on the positive real axis. Is there a neat way to formulate the convex hull with the shape of regular polygon and make it acceptable for CVX solver?
I could take the intersection of the half-spaces of each side of the polygon, but it seems to be a little bit complicated, when $k$ grows large.

$\endgroup$
9
  • $\begingroup$ Do you have a convex polygon or you just have its vertices? Are you vertices equidistant from (0, 0)? $\endgroup$
    – nicoguaro
    Oct 17, 2023 at 12:54
  • $\begingroup$ Thanks for the comment. I have a convex polygon. Suppose the radius is $r$, and the first vertex will be at $(r,0)$. Right now I am using the intersection of halfplanes of each side of the polygon to represent the convex hull. As the $K$ normally is not that large, maybe it's fine that I continue to use it. $\endgroup$
    – tyrela
    Oct 17, 2023 at 13:52
  • $\begingroup$ I don't understand, if you already have a convex polygon why do you need to compute its convex hull? $\endgroup$
    – nicoguaro
    Oct 17, 2023 at 14:31
  • $\begingroup$ Also, since you have the number of vertices and all lie at a distance $r$ from the origin and know the position for the first one, you can determine analytically all the positions and connectivities. $\endgroup$
    – nicoguaro
    Oct 17, 2023 at 14:44
  • $\begingroup$ Maybe I didn't demonstrate my problem quite well. Yes, I can use the halfplanes of each side to express all the points that are in the interior and on the boundary of this polygon. I am just wondering whether there is a simpler way to formulate it. Sorry for not state my problem clearly. $\endgroup$
    – tyrela
    Oct 17, 2023 at 23:52

1 Answer 1

1
$\begingroup$

If you have a general set of points and want to compute its convex hull, the best option is to use an algorithm that is already implemented and tested in a library. Qhull is probably the best option, they have implementations for Python and Matlab.

Suppose you know that your boundary points are at a distance $r$ from the origin in the plane. In that case, you can filter them according to their distance from $(0, 0)$ and join them according to the angle with the horizontal — that you can compute using the function $\operatorname{atan2}$.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.