I am trying to define a region along a space curve where I will display the vector field. My space curve is obtained by numerical integration and defined by Interpolating functions. It is hard to post my problem in full. Instead, I created the following simpler equivalent:

ClearAll[x, th, r, rr, myV, myVT, myVN, myVB, myVC, myregion];
r = 1.;
myV[x_] := {r*Cos[2.*Pi*x], r*Sin[2.*Pi*x], x};
myVT[x_] := Simplify[myV'[x]/Norm[myV'[x]], x ∈ Reals];
myVB[x_] :=Simplify[If[Norm[Cross[myV'[x], myV''[x]]] > 0, 
        Cross[myV'[x], myV''[x]]/Norm[Cross[myV'[x], myV''[x]]], 
        Cross[myVT[x], UnitVector[3, 3]]], x ∈ Reals];
myVN[x_] := Simplify[Cross[ myVT[x], myVB[x]], x ∈ Reals];
myVC[x_, th_] :=Simplify[Cos[2.*Pi*th] myVN[x] + 
        Sin[2.*Pi*th] myVB[x], {x ∈ Reals, th ∈ Reals}];
        myVolume[x_, th_, rr_] := myV[x] + rr*myVC[x, th];
parplot=ParametricPlot3D[myVolume[x, th, 0.1], {x, 0., 2.}, {th, 0., 1.}, 
      Boxed -> True, PlotStyle -> {Directive[Pink, Opacity[0.4]]}, 
      AxesLabel -> {"ϵ", "u", "y"}, ImageSize -> 600, 
      BoxRatios -> {1, 1, 1}, Mesh -> None, PlotPoints -> {50, 10}]

I get:

ParametricPlot of a Region

Then, I do

myregion=ParametricRegion[myVolume[x, th, r], {{x, 0., 2.}, {th, 0., 1.}, {r, 0.01, 0.1}}];



I get:

enter image description here

Could anyone please see what I am doing wrong?

  • $\begingroup$ Worth mentionning that your code take some time to compute :) Maybe you could reduce the number of points, without affecting the question. $\endgroup$ – anderstood Nov 11 '16 at 20:36
  • $\begingroup$ Thank you. Yes, indeed the code would work with reduced PlotPoints. But, PlotPoints really does not change the output. There seems to be something wrong structurally with what I am doing or a bug in ParametricRegion3D or RegionPlot3D. $\endgroup$ – I. Konuk Nov 12 '16 at 17:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.