Sine map, (Subscript[x, n]) ∈ [0, 1]

Cobweb diagram, map iterates and orbit diagram (interactive)

Clear[x,r]
iter = 500;
x1=0;x2=1;dx=0.0025;
r1=0;r2=1;dr=0.0005;
OrbitD=Rasterize[ListPlot[ParallelTable[Thread[{r,Nest[r Sin[π #]&,Range[x1,x2,dx],iter]}],{r,r1,r2,dr}],
PlotStyle->{{Black,Opacity[0.08],AbsolutePointSize[0.001]},{Black,Opacity[0.08],AbsolutePointSize[0.001]}},
Frame->True,FrameLabel->{r,x},AspectRatio->0.5,PlotRange->{0,1},ImageSize->600,LabelStyle->20]]

Clear[r,x0,x,n]
Manipulate[
CobW=Show[Plot[{Nest[r Sin[π #]&, x,k],r Sin[π x],x},{x,0,1},PlotStyle->{Blue,{Thickness[0.007],Red},Blue},Frame->True,PlotRange->{{0,1},{0,1}},AspectRatio->0.8,FrameLabel->{"(Subscript[x, n])","(Subscript[x, n + 1])"}],Graphics[Flatten[MapIndexed[{Opacity[0.39],Line[{{#,If[#==x0,0,#]},{#,r Sin[π #]}}],Line[{{#,r Sin[π #]},{r Sin[π #],r Sin[π #]}}]}& ,NestWhileList[r Sin[π #]&,x0,#1≠r Sin[π #2]&,2,n]]]],ImageSize->{320,320},LabelStyle->18];
IterP=ListLinePlot[NestList[r Sin[π #]&,x0,n],FrameLabel->{"n","(Subscript[x, n])"},DataRange->{0,n},PlotRange->{0,1},Frame->True,Mesh->All,MeshStyle->{PointSize[Large],Red},PlotStyle->Gray,AspectRatio->0.8,ImageSize->{320,320},LabelStyle->18];
LineP=Plot[2 Sign[ξ-r],{ξ,0,1},ExclusionsStyle->Blue,PlotRange->{0,1},Frame->True,FrameLabel->{"r","x"},AspectRatio->0.5,ImageSize->600,LabelStyle->20,Prolog->Inset[OrbitD]];
Grid[{{CobW,IterP},{LineP,SpanFromLeft}}],
{k,{1,2,3,4,5,6},ControlType->Setter},
{{n,50},1,150,1,ImageSize->Large,Appearance->"Labeled"}, 
{{r,0.9},0,1,ImageSize->Large,Appearance->"Labeled"},  
{{x0,0.15, "(Subscript[x, 0])"},0,1,ImageSize->Large,Appearance->"Labeled"},SaveDefinitions->True]

Creation of this notebook was supported by IT Academy program of Information Technology Foundation for Education (HITSA).