SetDirectory["~/Dropbox/jakies-rzeczy-moje/Biblioteczka/SL2R/"];
hyperbola=x^2+y^2-z^2-1;
plane[ϕ_]:=Cos[ϕ]*y+Sin[ϕ]*z;
identity={1,0,0};

1-hyperbola in (R^2)

ContourPlot[(x^2)-(y^(2 ))==1,{x,-3,3},{y,-3,3},PlotLabel->"(x^2)-(y^2)=1",AxesLabel->{{"x"},{"y"}},BaseStyle->{FontWeight->"Bold",FontSize->14},FrameLabel->{x,y}]

Export["1hyperbola.eps",%]

2-hyperbola in (R^3)

ContourPlot3D[(x^2)+(y^2)-(z^(2 ))==1,{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=1",AxesLabel->{x,y,z},BaseStyle->{FontWeight->"Bold",FontSize->14}]

Export["2hyperbola.eps",%]

ContourPlot3D[-(x^2)-(y^2)+(z^(2 ))==1,{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=-1",AxesLabel->{x,y,z},BaseStyle->{FontWeight->"Bold",FontSize->14}]

Export["alt2hyperbola.eps",%]

identity={1,0,0};

Show[{ContourPlot3D[(x^2)+(y^2)-(z^(2 ))==1,{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=1",AxesLabel->{x,y,z},BaseStyle->{FontWeight->"Bold",FontSize->14},Mesh->None,ContourStyle->Opacity[0.4]],Graphics3D[{PointSize[0.025],Black,Point[identity]}],Graphics3D[Text["(1,0,0)",identity*2]]}]

Export["2hyperbola1.eps",%]

Show[{ContourPlot3D[(x^2)+(y^2)-(z^(2 ))==1,{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=1",AxesLabel->{x,y,z},BaseStyle->{FontWeight->"Bold",FontSize->14},Mesh->None,ContourStyle->Opacity[0.4]],Graphics3D[{PointSize[0.025],Black,Point[identity]}],
ParametricPlot3D[{Sin[t],Cos[t],0.0},{t,-π,π},PlotStyle->Red]}]

Export["2hyperbola1ell.eps",%]

δ=0.24*π;
Show[{ContourPlot3D[(x^2)+(y^2)-(z^(2 ))==1,{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=1",AxesLabel->{x,y,z},BaseStyle->{FontWeight->"Bold",FontSize->14},MeshFunctions->{Function[{x,y,z,f},hyperbola-plane[(π/2)+δ]]},ContourStyle->Opacity[0.4],MeshStyle->{{Thick,Red}},Mesh->{{0}}],
Graphics3D[{PointSize[0.025],Black,Point[identity]}]}]

Export["2hyperbola1ell3.eps",%]

δ=0.247*π;
Show[{ContourPlot3D[(x^2)+(y^2)-(z^(2 ))==1,{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=1",AxesLabel->{x,y,z},BaseStyle->{FontWeight->"Bold",FontSize->14},MeshFunctions->{Function[{x,y,z,f},hyperbola-plane[(π/2)+δ]]},ContourStyle->Opacity[0.4],MeshStyle->{{Thick,Red}},Mesh->{{0}}],
Graphics3D[{PointSize[0.025],Black,Point[identity]}]}]

Export["2hyperbola1ell4.eps",%]

Show[{ContourPlot3D[(x^2)+(y^2)-(z^(2 ))==1,{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=1",AxesLabel->{x,y,z},BaseStyle->{FontWeight->"Bold",FontSize->14},Mesh->None,ContourStyle->Opacity[0.4]],
Graphics3D[{PointSize[0.025],Black,Point[identity]}],
ParametricPlot3D[{1.0,t,t},{t,-3,3},PlotStyle->Red]}]

Export["2hyperbola1par.eps",%]

ϕ=-0.26*π;
Show[{ContourPlot3D[(x^2)+(y^2)-(z^(2 ))==1,{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=1",AxesLabel->{x,y,z},BaseStyle->{FontWeight->"Bold",FontSize->14},Mesh->None,ContourStyle->Opacity[0.4]],
Graphics3D[{PointSize[0.025],Black,Point[identity]}],
ParametricPlot3D[{Sqrt[1.0-(y^2)(1-((Tan[ϕ])^2))],y,-Tan[ϕ]*y},{y,-3,3},PlotStyle->Red]}]

Export["2hyperbola1hyp.eps",%]

ϕ=-0.3*π;
Show[{ContourPlot3D[(x^2)+(y^2)-(z^(2 ))==1,{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=1",AxesLabel->{x,y,z},BaseStyle->{FontWeight->"Bold",FontSize->14},Mesh->None,ContourStyle->Opacity[0.4]],
Graphics3D[{PointSize[0.025],Black,Point[identity]}],
ParametricPlot3D[{Sqrt[1.0-(y^2)(1-((Tan[ϕ])^2))],y,-Tan[ϕ]*y},{y,-3,3},PlotStyle->Red]}]

Export["2hyperbola1hyp2.eps",%]

ϕ=-0.4991*π;
Show[{ContourPlot3D[(x^2)+(y^2)-(z^(2 ))==1,{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=1",AxesLabel->{x,y,z},BaseStyle->{FontWeight->"Bold",FontSize->14},Mesh->None,ContourStyle->Opacity[0.4]],
Graphics3D[{PointSize[0.025],Black,Point[identity]}],
ParametricPlot3D[{Sqrt[1.0-(y^2)(1-((Tan[ϕ])^2))],y,-Tan[ϕ]*y},{y,-3,3},PlotStyle->Red]}]

Export["2hyperbola1hyp3.eps",%]

Show[{ContourPlot3D[{(x^2)+(y^2)-(z^(2 ))==1},{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=1",AxesLabel->{x,y,z},RegionFunction->Function[{x,y,z},x>-1&&x<1],BaseStyle->{FontWeight->"Bold",FontSize->14},Mesh->None,ContourStyle->{Opacity[1.0],Yellow}],Graphics3D[{PointSize[0.025],Black,Point[identity]}],Graphics3D[Text["(1,0,0)",identity*2]]}]

Export["2hyperbolaSummary.eps",%]

Show[{ContourPlot3D[{(x^2)+(y^2)-(z^(2 ))==1},{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=1",AxesLabel->{x,y,z},RegionFunction->Function[{x,y,z},x>-1&&x<1],BaseStyle->{FontWeight->"Bold",FontSize->14},Mesh->None,ContourStyle->{Opacity[1.0],Yellow}],Graphics3D[{PointSize[0.025],Black,Point[identity]}]},
ParametricPlot3D[{1.0,t,t},{t,-3,3},PlotStyle->{Thickness[0.015],Red}],
ParametricPlot3D[{1.0,t,-t},{t,-3,3},PlotStyle->{Thickness[0.015],Red}]]

Export["2hyperbolaSummary1.eps",%]

Show[{ContourPlot3D[{(x^2)+(y^2)-(z^(2 ))==1},{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=1",AxesLabel->{x,y,z},RegionFunction->Function[{x,y,z},x>-1&&x<1],BaseStyle->{FontWeight->"Bold",FontSize->14},Mesh->None,ContourStyle->{Opacity[1.0],Yellow}],Graphics3D[{PointSize[0.025],Black,Point[identity]}]},
ParametricPlot3D[{1.0,t,t},{t,-3,3},PlotStyle->{Thickness[0.015],Red}],
ParametricPlot3D[{1.0,t,-t},{t,-3,3},PlotStyle->{Thickness[0.015],Red}],
ParametricPlot3D[{-1.0,t,t},{t,-3,3},PlotStyle->{Thickness[0.015],Blue}],
ParametricPlot3D[{-1.0,t,-t},{t,-3,3},PlotStyle->{Thickness[0.015],Blue}]]

Export["2hyperbolaSummary2.eps",%]

Show[{ContourPlot3D[{(x^2)+(y^2)-(z^(2 ))==1},{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=1",AxesLabel->{x,y,z},RegionFunction->Function[{x,y,z},x>-1&&x<1],BaseStyle->{FontWeight->"Bold",FontSize->14},Mesh->None,ContourStyle->{Opacity[1.0],Yellow}],Graphics3D[{PointSize[0.025],Black,Point[identity]}]},
ParametricPlot3D[{1.0,t,t},{t,-3,3},PlotStyle->{Thickness[0.015],Red}],
ParametricPlot3D[{1.0,t,-t},{t,-3,3},PlotStyle->{Thickness[0.015],Red}],
ParametricPlot3D[{-1.0,t,t},{t,-3,3},PlotStyle->{Thickness[0.015],Blue}],
ParametricPlot3D[{-1.0,t,-t},{t,-3,3},PlotStyle->{Thickness[0.015],Blue}],ContourPlot3D[{(x^2)+(y^2)-(z^(2 ))==1},{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=1",AxesLabel->{x,y,z},RegionFunction->Function[{x,y,z},Abs[z]>y&&-Abs[z]<y&&x>1.0],BaseStyle->{FontWeight->"Bold",FontSize->14},Mesh->None,ContourStyle->{Opacity[0.6],Green}]]

Export["2hyperbolaSummary3.eps",%]

Show[{ContourPlot3D[{(x^2)+(y^2)-(z^(2 ))==1},{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=1",AxesLabel->{x,y,z},RegionFunction->Function[{x,y,z},x>-1&&x<1],BaseStyle->{FontWeight->"Bold",FontSize->14},Mesh->None,ContourStyle->{Opacity[1.0],Yellow}],
ParametricPlot3D[{1.0,t,t},{t,-3,3},PlotStyle->{Thickness[0.015],Red}],
ParametricPlot3D[{1.0,t,-t},{t,-3,3},PlotStyle->{Thickness[0.015],Red}],
ParametricPlot3D[{-1.0,t,t},{t,-3,3},PlotStyle->{Thickness[0.015],Blue}],
ParametricPlot3D[{-1.0,t,-t},{t,-3,3},PlotStyle->{Thickness[0.015],Blue}],ContourPlot3D[{(x^2)+(y^2)-(z^(2 ))==1},{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=1",AxesLabel->{x,y,z},RegionFunction->Function[{x,y,z},Abs[z]>y&&-Abs[z]<y&&x>1.0],BaseStyle->{FontWeight->"Bold",FontSize->14},Mesh->None,ContourStyle->{Opacity[0.6],Green}],
ContourPlot3D[{(x^2)+(y^2)-(z^(2 ))==1},{x,-3,3},{y,-3,3},{z,-3,3},PlotLabel->"(x^2)+(y^2)-(z^2)=1",AxesLabel->{x,y,z},RegionFunction->Function[{x,y,z},Abs[z]>y&&-Abs[z]<y&&x<-1.0],BaseStyle->{FontWeight->"Bold",FontSize->14},Mesh->None,ContourStyle->{Opacity[0.4],Blue}],
Graphics3D[{PointSize[0.025],Black,Point[identity]}]}]

Export["2hyperbolaSummary4.eps",%]