3
$\begingroup$

For example:

L1 = ParametricRegion[{2 \[Theta] Cos[\[Theta]], 
   2 \[Theta] Sin[\[Theta]]}, {{\[Theta], 0, 2 Pi}}];

L2 = Line[{{0, 0}, {2*2 Pi, 0}}];

L=Region[RegionUnion[L1, L2]]

How to generate a 2D Region R from the 1D Region Boundary L?

The following code can generate such Region. But is there a simpler and more common way?

Region[ParametricRegion[{2 \[Theta]*t* Cos[\[Theta]], 
   2 \[Theta]*t* Sin[\[Theta]]}, {{\[Theta], 0, 2 \[Pi]}, {t, 0, 1}}]]

How to obtain a 2D Region without knowing the boundary function expression and only knowing the 1D boundary line region?

$\endgroup$

1 Answer 1

5
$\begingroup$
l1 = ParametricPlot[{2 θ Cos[θ], 
    2 θ Sin[θ]}, {θ, 0, 2 Pi}];
l2 = Graphics[Line[{{0, 0}, {2*2 Pi, 0}}]];
Show[l1, l2] // BoundaryDiscretizeGraphics

enter image description here

L1 = ParametricRegion[{2 θ Cos[θ], 
    2 θ Sin[θ]}, {{θ, 0, 2 Pi}}];
L2 = Line[{{0, 0}, {2*2 Pi, 0}}];
Show[Region /@ {L1, L2}] // BoundaryDiscretizeGraphics
L1 = ParametricRegion[{2 θ Cos[θ], 
    2 θ Sin[θ]}, {{θ, 0, 2 Pi}}];

L2 = Line[{{0, 0}, {2*2 Pi, 0}}];

L = Region[RegionUnion[L1, L2]]
Show[L] // BoundaryDiscretizeGraphics
$\endgroup$
2
  • $\begingroup$ Thank you very much!@cvgmt $\endgroup$
    – lotus2019
    Feb 2, 2022 at 9:20
  • $\begingroup$ R = Show[Region /@ {L1, L2}] // BoundaryDiscretizeGraphics $\endgroup$
    – lotus2019
    Feb 2, 2022 at 9:21

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.