Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SeedRandom[1]
- region = ConvexHullMesh[RandomReal[{-1, 1}, {50, 2}]]
- sol = Minimize[Indexed[x, 2], x ∈ RegionBoundary@region]
- point = x /. Last@sol
- (* {-0.976044, {x -> {0.579608, -0.976044}}} *)
- (* {0.579608, -0.976044} *)
- (* plot the solution: *)
- Show[region, Epilog -> {Point@x /. Last@sol}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement