Attraction and Repulsion in Dynamical Systems
Attraction and Repulsion in Dynamical Systems
fmn[a_,b_,m_,n_,r_]:=-a+b;fmnxy[a_,b_,m_,n_,x_,y_]:=Module[{r},r=Sqrt[+];fmn[a,b,m,n,r]];
m
r
n
r
2
x
2
y
Manipulate[Module[{p2d,p3d},Switch[preset,1,{m=-1,n=-2,a=1000,b=10000,hRange=200,vRange=30},2,{m=-1,n=-2,a=5000,b=100000,hRange=200,vRange=70},3,{m=-1,n=-4,a=300,b=80000,hRange=100,vRange=25},4,{m=-2,n=-4,a=500,b=2500,hRange=50,vRange=30},5,{m=-3,n=-6,a=500,b=2500,hRange=50,vRange=30},6,{m=-6,n=-12,a=1000,b=10000,hRange=10,vRange=25}];preset=0;If[m≤n,n=m-1];p2d=Plot[fmn[a,b,m,n,r],{r,0.0,2hRange},PlotStyle{Orange,Thick},PlotRange{-vRange,vRange/2},FrameTrue,FrameStyleDirective[GrayLevel[.5]],AxesStyleDirective[GrayLevel[.75]],BackgroundNone,ImageSize{375,280},PlotLabelStyle[TraditionalForm[-a+b],"DisplayFormula",14]];p3d=Plot3D[fmnxy[a,b,m,n,x,y],{x,-hRange,hRange},{y,-hRange,hRange},PlotRange{-vRange,2},ImageSize{375,280},BoxStyleDirective[Dashed,GrayLevel[.8]],PlotLabelStyle[TraditionalForm[-a+b],"DisplayFormula",14],ImagePadding{{10,10},{10,25}}];Switch[ctrl,1,p2d,2,p3d]],{{m,-1,"m"},{-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12},ControlTypeSetter,ControlPlacementTop},{{n,-1,"n"},{-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12},ControlTypeSetter,ControlPlacementTop},{{a,1000,"a"},1,5000,1,Appearance"Labeled",ControlPlacementTop},{{b,10000,"b"},1,100000,1,Appearance"Labeled",ControlPlacementTop},{{preset,0,"presets"},{0"select",1"1: m= -1, n= -2, a=1000, b= 10000",2"2: m= -1, n= -2, a=5000, b=100000",3"3: m= -1, n= -4, a= 300, b= 80000",4"4: m= -2, n= -4, a= 500, b= 2500",5"5: m= -3, n= -6, a= 500, b= 2500",6"6: m= -6, n=-12, a=1000, b= 10000"},ControlTypePopupMenu,ControlPlacementTop},{{ctrl,2,""},{1"2D",2"3D"}},Style["ranges",Bold],{{hRange,200,"horizontal"},10,500,10,Appearance"Labeled",ImageSizeTiny},{{vRange,30,"vertical"},2,100,2,Appearance"Labeled",ImageSizeTiny},SaveDefinitionsTrue,ControlPlacementLeft]
m
r
n
r
m
r
n
r
CAPTION
CAPTION
DETAILS
DETAILS
THIS NOTEBOOK IS THE SOURCE CODE FROM
◼
A full-function Wolfram Mathematica system (Version 6 or higher) is required to edit this notebook.GET WOLFRAM MATHEMATICA »