0
$\begingroup$

I am visualizing 1-dimensional curves that are periodic. Due to periodicity, extending the domain should result in the curve being retraced and therefore remaining unchanged. This doesn't seem to be the case and in fact when the domain is extended the curves begins to look like a surfaces instead. It would be easy to tell is in fact the case if I knew how to subtract one parametric graph from another. Please see the example below.

u[x_, y_] = Sin[x + y];

(* Shorthands for partial derivatives *)
ux[x_, y_] = D[u[x, y], x];
uy[x_, y_] = D[u[x, y], y];
uxx[x_, y_] = D[u[x, y], {x, 2}];
uyy[x_, y_] = D[u[x, y], {y, 2}];
uxy[x_, y_] = D[ux[x, y], y];


(* Invariant differential operators *)

d1[x_, y_] = (uy[x, y]*D[#, x] - ux[x, y]*D[#, y])/Sqrt[
   ux[x, y]^2 + uy[x, y]^2] &;

d2[x_, y_] = (ux[x, y]*D[#, x] + uy[x, y]*D[#, y])/Sqrt[
   ux[x, y]^2 + uy[x, y]^2] &;


(* Differential invariants *)

I01[x_, y_] = Sqrt[ux[x, y]^2 + uy[x, y]^2]

I20[x_, y_] = 
 Simplify[1/
   I01[x, y]*(uxx[x, y]*uy[x, y]^2 - 2 ux[x, y]*uy[x, y]*uxy[x, y] + 
     uyy[x, y]*ux[x, y]^2)]

I11[x_, y_] = Simplify[d1[x, y][I01[x, y]]]

I02[x_, y_] = Simplify[d2[x, y][I01[x, y]]]

I21[x_, y_] = 
 Simplify[d2[x, y][I20[x, y]] + 2 (d1[x, y][I01[x, y]])^2/I01[x, y]]

(* Domain 1 *)
r = 2 Pi;
xlow = 0;
xhigh = r;
ylow = 0;
yhigh = r;

opacityconstant = 1;

p1 = ParametricPlot3D[{I01[x, y], I11[x, y], I02[x, y]}, {x, xlow, 
   xhigh}, {y, ylow, yhigh}, PlotStyle -> {Opacity[opacityconstant]}, 
  Mesh -> None, 
  AxesLabel -> {"\!\(\*SubscriptBox[\(I\), \(01\)]\)", 
    "\!\(\*SubscriptBox[\(I\), \(11\)]\)", 
    "\!\(\*SubscriptBox[\(I\), \(02\)]\)"}, PlotRange -> Full]

p2 = ParametricPlot3D[{I01[x, y], I20[x, y], I02[x, y]}, {x, xlow, 
   xhigh}, {y, ylow, yhigh}, PlotStyle -> {Opacity[opacityconstant]}, 
  Mesh -> None, 
  AxesLabel -> {"\!\(\*SubscriptBox[\(I\), \(01\)]\)", 
    "\!\(\*SubscriptBox[\(I\), \(20\)]\)", 
    "\!\(\*SubscriptBox[\(I\), \(02\)]\)"}, PlotRange -> Full]

p6 = ParametricPlot3D[{I01[x, y], I02[x, y], I21[x, y]}, {x, xlow, 
   xhigh}, {y, ylow, yhigh}, PlotStyle -> {Opacity[opacityconstant]}, 
  Mesh -> None, 
  AxesLabel -> {"\!\(\*SubscriptBox[\(I\), \(01\)]\)", 
    "\!\(\*SubscriptBox[\(I\), \(02\)]\)", 
    "\!\(\*SubscriptBox[\(I\), \(21\)]\)"}, PlotRange -> Automatic]

(* Domain 2 *)
r = 6 Pi;
xlow = 0;
xhigh = r;
ylow = 0;
yhigh = r;

p1 = ParametricPlot3D[{I01[x, y], I11[x, y], I02[x, y]}, {x, xlow, 
   xhigh}, {y, ylow, yhigh}, PlotStyle -> {Opacity[opacityconstant]}, 
  Mesh -> None, 
  AxesLabel -> {"\!\(\*SubscriptBox[\(I\), \(01\)]\)", 
    "\!\(\*SubscriptBox[\(I\), \(11\)]\)", 
    "\!\(\*SubscriptBox[\(I\), \(02\)]\)"}, PlotRange -> Full]

p2 = ParametricPlot3D[{I01[x, y], I20[x, y], I02[x, y]}, {x, xlow, 
   xhigh}, {y, ylow, yhigh}, PlotStyle -> {Opacity[opacityconstant]}, 
  Mesh -> None, 
  AxesLabel -> {"\!\(\*SubscriptBox[\(I\), \(01\)]\)", 
    "\!\(\*SubscriptBox[\(I\), \(20\)]\)", 
    "\!\(\*SubscriptBox[\(I\), \(02\)]\)"}, PlotRange -> Full]

p6 = ParametricPlot3D[{I01[x, y], I02[x, y], I21[x, y]}, {x, xlow, 
   xhigh}, {y, ylow, yhigh}, PlotStyle -> {Opacity[opacityconstant]}, 
  Mesh -> None, 
  AxesLabel -> {"\!\(\*SubscriptBox[\(I\), \(01\)]\)", 
    "\!\(\*SubscriptBox[\(I\), \(02\)]\)", 
    "\!\(\*SubscriptBox[\(I\), \(21\)]\)"}, PlotRange -> Automatic]
$\endgroup$

closed as off-topic by m_goldberg, MarcoB, PlatoManiac, bbgodfrey, user9660 Jun 30 '16 at 5:41

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – MarcoB, PlatoManiac, bbgodfrey
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Your title is too general. Can you write one that more specifically describes your problem? $\endgroup$ – m_goldberg Jun 29 '16 at 19:00
2
$\begingroup$

The problem is plot quality, not the code. The answer is MaxRecursion

ParametricPlot3D[{I01[x, y], I11[x, y], I02[x, y]}, {x, 0, 
  8 \[Pi]}, {y, 0, 8 \[Pi]}, MaxRecursion -> 5]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.