Is this a bug in ParametricRegion?

This doesn’t seem to work. Is it a bug or a limitation of ParametricRegion?

Make a spline function that returns a pair of real values for a parameter 0<s<1:

pts = {{0, 0}, {1, 1}, {2, -1}, {3, 0}};
spl = BSplineFunction[pts]

Valid syntax for ParametricRegion is:

ParametricRegion[{Cos[t], Sin[t]}, {{t, 0, 2 Pi}}]

However, these throw an error:

parRegion = ParametricRegion[spl[t], {{t, 0, 1}}]

parRegion = ParametricRegion[Evaluate@spl[t], {{t, 0, 1}}]

And, more bizarrely, this doesn’t throw an error but gives a result that appears to be wrong:

fx[t_] := First[spl[t]]
fy[t_] := Last[spl[t]]
ParametricRegion[{fx[t], fy[t]}, {{t, 0, 1}}]

returns:

ParametricRegion[{{t, t}, 0 <= t <= 1}, {t}]

Have you looked at the plot of spl? Is that what was intended? It looks like the problem is in the spline function.

Hello David,
That is not what I am seeing:

pts = {{0, 0}, {1, 1}, {2, -1}, {3, 0}};
spl = BSplineFunction[pts]
ParametricPlot[spl[t], {t, 0, 1}]

Untitled-5.png

Am I doing something wrong?

The strange result is simply due to evaluation:

In[3]:= First[foo[bar][t]]

Out[3]= t

ParametricRegion isn’t going to be very useful without an explicit symbolic formula. You can get a MeshRegion, however:

DiscretizeGraphics[BSplineCurve[pts]]

Sorry Craig, my mistake. You can get a Region by using:

g = ParametricPlot[spl[t], {t, 0, 1}]
gRegion = DiscretizeGraphics[g]

That works as a region. For example:

ArcLength[gRegion]