Input: unit circle

The exercise deals with transformations of the unit circle, $(\cos \theta, \sin \theta)$. We start with the unit circle with Hue coloring over the angular range of $(-\pi, \pi)$ as seen below. The green shading denotes a region of right-handed chirality. (As you travel from $-\pi$ to $\pi$, the interior is on the left.)

unit circle

Transform in 2D

The transformation in two dimensions is $$ \left( \begin{array}{c} \sin \theta\\ \cos \theta \end{array} \right) \Longrightarrow \frac{\sin \theta} {1 + \cos^2 \theta} \left( \begin{array}{c} 1\\ \cos \theta \\ \end{array} \right)$$

The transformation twists the circle into this racetrack figure:


The two lobes separate regions of right-handed chirality (green, left) and left-handed chirality (red, right). The point of the exercise is to show how the unit circle was twisted and mark the chirality of the connected domains.

Transform in 3D

The transformation in three dimensions is $$ \left( \begin{array}{c} \sin \theta\\ \cos \theta \end{array} \right) \Longrightarrow \frac{\sin \theta} {1 + \cos^2 \theta + \cos^4 \theta} \left( \begin{array}{c} 1\\ \cos \theta \\ \cos ^2 \theta \end{array} \right)$$

In Mathematica the transformation is cast as:

fields = Sin[\[Theta]]/(1 + Cos[\[Theta]]^2 + Cos[\[Theta]]^4) {1, Cos[\[Theta]],Cos[\[Theta]]^2};

This code snippet produces the plot, a gently rolling racetrack:

ParametricPlot3D[fields, {\[Theta], -\[Pi], \[Pi]},
  ColorFunction -> (Hue[#4 0.8] &),
  PlotRange -> {1.05 {-1, 1}, 1.05 {-1, 1}},
  SphericalRegion -> True,
  PlotStyle -> Thickness[0.01]]



How do I shade the two interior zones (left in red, right in green) bound by the curve?


This post looked promising, but ultimately, I could not use this to solve the problem.

Shading the surface of the 3D plot


1 Answer 1

f[θ_] := 
  Sin[θ]/(1 + Cos[θ]^2 + Cos[θ]^4) {1, 
    Cos[θ], Cos[θ]^2};
 f[θ]*(1 - s) + 
  f[-θ + π] s, {s, θ} ∈ 
  ImplicitRegion[{0 <= s <= 1, 
    0 <= θ <= π/2 || 
     3 π/2 <=  θ <= 2 π}, {s, θ}], 
 ColorFunction -> (Hue[#4 0.8] &), SphericalRegion -> True]

enter image description here

The method can be illustrate by the follow figure,

  f[θ]*(1 - s) + f[-θ + π] s, {s, 0, 1}, {θ, 
   0, π/2}, MeshFunctions -> {#1 &}, PlotStyle -> None, 
  MeshStyle -> Red], 
 ParametricPlot3D[f[θ], {θ, 0, π/2}, 
  PlotStyle -> Green], 
 ParametricPlot3D[f[-θ + π], {θ, 0, π/2}, 
  PlotStyle -> Cyan]]

enter image description here

we draw the f[θ], {θ, 0, π/2}(green),and reverse part of f[θ] by f[-θ + π], {θ, 0, π/2}( cyan),and then draw the red segment from green to cyan by f[θ]*(1 - s) + f[-θ + π]


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.