Surface with Branch Cuts

h[x_,y_,a_,b_]:=Cos[a x]+I Sin[b y];
vfuncs={ArcCos,ArcCosh,ArcCot,ArcCoth,ArcCsc,ArcCsch,ArcSec,ArcSech,ArcSin,ArcSinh,ArcTan,ArcTanh,Log,Sqrt};
DemoStyle3D[color_]:=Sequence[Mesh->None,PlotStyle->{{color,Specularity[White,50]}},BoundaryStyle->{Black},Boxed->False,Axes->False,Background->GrayLevel[.95]];

Manipulate[Module[{a,b,θ,ρ,vpm,ex,xx=Symbol["x"],yy=Symbol["y"]},{a,b}=pt;{θ,ρ}=vp;vpm=3{Cos[θ]Sin[ρ],Sin[θ]Sin[ρ],Cos[ρ]};ex=If[sb,{None,{AbsoluteThickness[2],Lighter[Red,.15]}},None];
Grid[{
{Labeled[Plot3D[g[f[h[x,y,a,b]]],{x,-3,3},{y,-3,3},NormalsFunction->"Average",MaxRecursion->ControlActive[0,mx],Evaluate@DemoStyle3D[RGBColor[.95,.95,.35,ControlActive[1,op]]],ExclusionsStyle->ex,ViewPoint->vpm,ImageSize->{400,250}],TraditionalForm[Text@Style[g[f[h[xx,yy,a,b]]],15]],Top],SpanFromLeft},
{Labeled[Plot3D[Abs[h[x,y,a,b]],{x,-3,3},{y,-3,3},NormalsFunction->"Average",MaxRecursion->ControlActive[1,mx+1],Evaluate@DemoStyle3D[RGBColor[.8,.8,.9,ControlActive[1,op]]],ViewPoint->vpm,ImageSize->{200,150}],TraditionalForm[Text@Style[Abs[h[x,y,a,b]],15]]],Labeled[Plot3D[g[f[xx+I yy]],{x,-3,3},{y,-3,3},NormalsFunction->"Average",MaxRecursion->ControlActive[0,mx],Evaluate@DemoStyle3D[RGBColor[.8,.8,.9,ControlActive[1,op]]],ExclusionsStyle->ex,ViewPoint->vpm,ImageSize->{200,150}],TraditionalForm[Text@Style[ g[f[xx+I yy]],15]]]}
},Background->GrayLevel[.95]]],
{{pt,{1,3},"parameters"},{1,1},{4,4},ImageSize->Small,ControlPlacement->Left},
{{vp,{3.7,0.8},"viewpoint"},{0,0},{2π,π},ImageSize->Small,ControlPlacement->Left},Delimiter,
{{f,Sqrt,Column[{"","multivalued","function",""},Center]},vfuncs,ControlPlacement->Left},
{{g,Im,Column[{"","complex","component",""},Center]},{Re,Im,Abs},ControlType->PopupMenu,ControlPlacement->Left},Delimiter,
{{sb,False,Column[{"","highlight","branch cuts",""},Center]},{True,False},ControlPlacement->Left},
{{op,.9,"opacity"},0.2,1,ControlPlacement->Bottom},
{{mx,0,"max recursion"},0,4,1,ImageSize->Tiny,ControlType->Setter,ControlPlacement->Bottom},
AutorunSequencing->{1,2,3},SaveDefinitions->True,TrackedSymbols:>{pt,vp,f,g,sb,op,mx}]

CAPTION

This Demonstration shows a function composition of multivalued functions with branch cuts.

DETAILS

The first complex function defines the frequency of branch cuts, and is controlled by the 2D slider labeled parameters.

During the plotting we symbolically analyze the functions in order to remove the domain regions where the branch cuts occur.

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Surface with Branch Cuts" from the Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/SurfaceWithBranchCuts/

Contributed by: Yu-Sung Chang

A full-function Wolfram Mathematica system (Version 6 or higher) is required to edit this notebook.
GET WOLFRAM MATHEMATICA »

© Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »