8
$\begingroup$

Let

bsf = BSplineFunction[{{1, 1}, {-0.5, -0.7}, {-0.4, -1}, {1, 0}}, 
  SplineClosed -> True, SplineDegree -> 3]

enter image description here

Than

ParametricRegion[bsf[t], {{t, 0, 1}}]

not work:
enter image description here

Also not work

BoundaryDiscretizeRegion@
 BSplineCurve[{{0, 0}, {1, 0}, {2, .5}, {1, 1}, {0, 1}}, 
  SplineClosed -> True]

What am I doing wrong?

$\endgroup$
0

2 Answers 2

13
$\begingroup$
  • BSplineCurve+BoundaryDiscretizeGraphics.
BoundaryDiscretizeGraphics@
 BSplineCurve[{{0, 0}, {1, 0}, {2, .5}, {1, 1}, {0, 1}}, 
  SplineClosed -> True]

enter image description here

  • BSplineFunction+Indexed+ ParametricRegion+ BoundaryDiscretizeGraphics
Clear[bsf]; 
bsf = 
 BSplineFunction[{{1, 1}, {-0.5, -0.7}, {-0.4, -1}, {1, 0}}, 
  SplineClosed -> True, SplineDegree -> 3];
ParametricRegion[{Indexed[bsf[t], 1], 
     Indexed[bsf[t], 2]}, {{t, 0, 1}}] // DiscretizeRegion // 
  Show // BoundaryDiscretizeGraphics

Or

bsf = BSplineFunction[{{1, 1}, {-0.5, -0.7}, {-0.4, -1}, {1, 0}}, 
   SplineClosed -> True, SplineDegree -> 3];
ParametricPlot[bsf@t, {t, 0, 1}] // BoundaryDiscretizeGraphics

enter image description here

$\endgroup$
12
$\begingroup$
curve = 
 BSplineCurve[{{0, 0}, {1, 0}, {2, .5}, {1, 1}, {0, 1}}, 
   SplineClosed -> True];

region = DiscretizeGraphics @ Graphics[FilledCurve @ curve]

enter image description here

Head @ region

MeshRegion

$\endgroup$

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.