I have attempted to draw a sphere between two planes that are defined
as follows.
a:= 2x - 2y + z + 2 = 0 and b:= 4x - 4y + 2z - 4 = 0
I know that the line is perpendicular to the two planes
are l(5+2t,-1-2t,4+t).
The sphere can be described like
(x - 5/3)^2 + (y-5/3)^2 + (z-7/3)^2 = 1^2.
So the image I am trying to create looks somewhat like this
Now is there any way in tikz to approach this in a good way?
I know there is the PsTricks option, but I really need the pdflatex
compability. Now I did give this a shoot, but it did not turn out great.
\documentclass{standalone}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}[scale=0.25]
\tkzInit[xmin=-20,xmax=40,ymin=-20,ymax=20] \tkzClip
\tkzDefPoint(8,-2){E} \tkzDefPoint(-2,2){D}
\tkzDefMidPoint(E,D) \tkzGetPoint{M}
\tkzInterLC[R](E,D)(M,20 cm) \tkzGetPoints{P1}{P}
\tkzDefPoint(17,-0.8){R}
\tkzDefPoint(-20,-15){S1} \tkzDefPoint(-5, 15){S2}
\tkzDefPoint( 12, 20){S3} \tkzDefPoint(-2,-10){S4}
\tkzInterLL(E,D)(S1,S2) \tkzGetPoint{T1}
\tkzDrawPolygon[color=white,fill=blue!30!white,opacity=0.7](S1,S2,S3,S4)
\tkzDrawCircle[color=red!70!black,ball color=red](M,E)
\begin{scope}[shift=(R)]
\tkzDefPoint(-20,-15){S5} \tkzDefPoint(-5, 15){S6}
\tkzDefPoint( 12, 20){S7} \tkzDefPoint(-2,-10){S8}
\end{scope}
\tkzDrawLine[add=10 and 0](P,T1)
\tkzDrawSegment[dashed](T1,E)
\tkzDrawPolygon[color=white,fill=blue!50!white,opacity=0.7](S5,S6,S7,S8)
\tkzDrawLine[add=0 and 10](E,P1)
\tkzDrawPoints[fill=black](P,D,E) \tkzLabelPoints(P,D,E)
\tkzLabelPoint[below left](S3){\Large $\alpha$} \tkzLabelPoint[below left](S7){\Large $\beta$}
\end{tikzpicture}
\end{document}
Which produces
Which is not quite what I want. As well as being a very hacky, and non 3d approach to the problem. Is there any decent way to approach making planes, and spheres in tikz?