I need to find the shortest distance between the two regions and the two points of the shortest distance, but the following code cannot achieve this requirement:
reg1 = ImplicitRegion[
x^2 + y^2 - 2 z^2 == 0 && x + y + 3 z == 5, {x, y, z}]
reg2 = ImplicitRegion[z == 0, {x, y, z}]
RegionNearest[reg1, reg2]
What can I do to find the shortest distance between two regions?
reg1df = RegionDistance@reg1; NMinimize[ reg1df[{x, y, z}], {x, y, z} \[Element] reg2]
$\endgroup$