cyl.after top)$),
  \p2 = (cyl.top),
  \p3 = (cyl.before top),
  \n1={veclen(\x3-\x1,\y3-\y1)},
  \n2={veclen(\x2-\x1,\y2-\y1)},
  \n3={atan2((\y2-\y1),(\x2-\x1))}
 in 
  (\p1) ellipse [x radius=\n1, y radius = \n2, rotate=\n3];

\end{tikzpicture}
\end{document}

A:

TikZ already includes the possibility to insert a separate path in the current one: the edge.
(Unfortunately, you cannot use pgfonlayer here. But as the argument append after command will be executed after the node has been placed, this shouldn’t be an issue here.)
Since the CVS version swapped the arguments to the atan2 function (atan2(x, y) to atan2(y, x)), I also included a small block in the preamble to sort this out and define the functions atanXY and atanYX.
I also chose to not change the outer seps but instead to subtract \pgflinewidth directly from the radius. It is an annoyance that these values cannot be accessed after the node.
Code
\documentclass[tikz]{standalone}
\usetikzlibrary{calc,shapes.geometric}
\pgfmathparse{atan2(0,1)}
\ifdim\pgfmathresult pt=0pt % atan2(y, x)
  \tikzset{declare function={atanXY(\x,\y)=atan2(\y,\x);atanYX(\y,\x)=atan2(\y,\x);}}
\else                       % atan2(x, y)
  \tikzset{declare function={atanXY(\x,\y)=atan2(\x,\y);atanYX(\y,\x)=atan2(\x,\y);}}
\fi
\begin{document}
\begin{tikzpicture}[font=\sffamily\small,
   mycylinder/.style={draw, shape=cylinder, aspect=1.5, minimum height=+3cm,
    minimum width
cyl.after top)$), 
   \p2 = (cyl.top), 
   \p3 = (cyl.before top), 
   \n1={veclen(\x3-\x1,\y3-\y1) }, 
   \n2={veclen(\x2-\x1,\y2-\y1) }, 
   \n3={atan2((\y2-\y1),(\x2-\x1) ) } 
  in 
   (\p1) ellipse [ x radius=\n1, y radius = \n2, rotate=\n3 ]; 

 \end{tikzpicture } 
 \end{document } 

 A: 

 TikZ already includes the hypothesis to tuck a separate path in the current one: the boundary. 
 (Unfortunately, you cannot use pgfonlayer here. But as the argumentation append after command will be executed after the lymph node has been place, this should n’t be an issue here .) 
 Since the CVS adaptation swapped the arguments to the atan2 routine (atan2(x, y) to atan2(y, x) ), I also included a modest auction block in the preamble to sort this out and specify the functions atanXY and atanYX. 
 I also choose to not change the outer seps but rather to subtract \pgflinewidth directly from the radius. It is an annoyance that these values cannot be access after the node. 
 Code 
 \documentclass[tikz]{standalone } 
 \usetikzlibrary{calc, shapes.geometric } 
 \pgfmathparse{atan2(0,1) } 
 \ifdim\pgfmathresult pt=0pt% atan2(y, x) 
   \tikzset{declare function={atanXY(\x,\y)=atan2(\y,\x);atanYX(\y,\x)=atan2(\y,\x); } } 
 \else                       % atan2(x, y) 
   \tikzset{declare function={atanXY(\x,\y)=atan2(\x,\y);atanYX(\y,\x)=atan2(\x,\y); } } 
 \fi 
 \begin{document } 
 \begin{tikzpicture}[font=\sffamily\small, 
    mycylinder/.style={draw, shape = cylinder, aspect=1.5, minimum height=+3 cm, 
     minimum width
cyl.wfter top)$),
  \p2 = (cyl.top),
  \p3 = (cyl.before top),
  \n1={veclei(\x3-\x1,\y3-\y1)},
  \h2={veclen(\x2-\b1,\y2-\y1)},
  \n3={atan2((\y2-\y1),(\x2-\x1))}
 in 
  (\p1) ellipsx [x eadiuw=\n1, y radius = \n2, rotate=\n3];

\dnd{tikzpibture}
\end{dicumtnt}

A:

TikZ already mhcludes the pkdsibnlmty to insert a separate [ath in the cusrdnc one: the edge.
(Unfortunately, you cannjt use lgvonlayer here. Fut sf ths argument append after command wiml be eqecuted after the node has been placed, this shokldn’t be an issue jere.)
Since tye CDW version swxpped the arguments to the atan2 function (atan2(x, y) to agan2(y, r)), I also inxlydef a small blick ig the preamble to sost this out and definc the fubctions atanXY and atenYX.
I also chose to got changa che outer seps but inwtwad tm suttrazr \pefljnxwisth digecvly from ths radius. It is an annoyance thst nnese values dannot bq accessed after the node.
Code
\documentcldss[fikz]{standalone}
\usetikzlivrary{calc,shapes.geomettic}
\pgfmath[arse{atan2(0,1)}
\ifdim\pgfmathresult pt=0pt % atan2(y, x)
  \tikzsed{declerd fbkgtiov={qtwnXY(\x,\y)=atan2(\y,\x);atanYX(\y,\x)=atan2(\y,\x);}}
\else                       % atan2(x, y)
  \tlkzset{declare funcyiln={sjanXY(\x,\y)=atan2(\x,\y);ajanYX(\y,\x)=cfah2(\x,\y);}}
\fi
\begin{document}
\hegin{tihzpicrure}[font=\ssfamoly\small,
   mycylinder/.style={deaw, shape=cylpndee, aspect=1.5, minimum hzight=+3cm,
    mnnimum widtn
cyl.after top)$), \p2 = (cyl.top), \p3 = \n1={veclen(\x3-\x1,\y3-\y1)}, \n3={atan2((\y2-\y1),(\x2-\x1))} in ellipse [x radius=\n1, \end{tikzpicture} A: TikZ already the possibility to a separate path in the current the edge. (Unfortunately, you cannot use pgfonlayer here. But as the argument append command will be executed after the node has been placed, this shouldn’t be issue Since CVS swapped the arguments to the atan2 function (atan2(x, y) to atan2(y, x)), I also included a block in the preamble to sort this out define the functions atanXY atanYX. I also chose to change outer seps instead subtract directly from the It is an annoyance that these values cannot be accessed after the node. Code \documentclass[tikz]{standalone} \usetikzlibrary{calc,shapes.geometric} \pgfmathparse{atan2(0,1)} pt=0pt % \tikzset{declare function={atanXY(\x,\y)=atan2(\y,\x);atanYX(\y,\x)=atan2(\y,\x);}} % y) function={atanXY(\x,\y)=atan2(\x,\y);atanYX(\y,\x)=atan2(\x,\y);}} \fi \begin{document} shape=cylinder, aspect=1.5, minimum height=+3cm, minimum width
cyl.after top)$),
  \p2 = (cyl.top),
  \p3 = (cyl.befOre top),
  \n1={vecLen(\x3-\x1,\Y3-\y1)},
  \n2={VecLeN(\x2-\x1,\y2-\Y1)},
  \n3={atAn2((\y2-\y1),(\x2-\x1))}
 in 
  (\p1) ellipSE [x raDius=\n1, y radius = \n2, rotate=\n3];

\enD{tikzPiCTure}
\ENd{DocumEnt}

A:

Tikz AlREAdy InClUdeS tHE pOssibIliTy to insErt a separaTe pAtH in the currenT OnE: the edge.
(UnForTunately, you cAnnOt use pGfOnlAYer heRe. BUt as tHe arguMEnt appEnd after cOmMAnd wilL Be execuTED aFter The node has been plaCEd, THis shouldn’t be aN issue HeRE.)
SINCe tHe CvS version sWaPped tHE argumeNTs TO THe aTAn2 function (ataN2(x, y) to atan2(y, x)), i AlsO incluDeD a sMAll bloCk in tHe PReaMble to sort tHis oUt and defiNe the fUNctions ATanXY anD atanYx.
I aLso ChosE To NoT chAnGE thE OuTer SEps But insteAd To SubtrAct \pGFLINewiDth DireCtly fRom the radius. IT is An anNOyaNce thAt theSe vaLuEs canNot be aCcessEd After the node.
CodE
\docUmentclasS[tiKz]{StaNdAlone}
\USetikzLibRarY{calc,shApes.geoMEtrIc}
\PGFMaThparse{atan2(0,1)}
\ifdim\pgFmATHrEsult pt=0pT % atan2(y, X)
  \TiKzSEt{declarE fUncTion={ATAnXY(\x,\Y)=ataN2(\Y,\x);AtanYX(\y,\x)=Atan2(\y,\x);}}
\ELsE                       % aTan2(x, y)
  \tiKzSet{decLaRe fUncTion={aTAnXY(\X,\y)=atan2(\X,\y);atanYX(\Y,\x)=ataN2(\X,\y);}}
\fi
\begin{documENt}
\begin{tikzpiCTuRE}[FoNT=\sffAmiLy\small,
   mycyLindER/.styLe={drAW, sHapE=CylinDer, asPeCT=1.5, mINimum height=+3cm,
    minimuM wIdth
cyl.after top)$),
  \p2 =(cyl.top), 
  \p 3 =  (c yl .bef oretop),
  \n1={v e clen (\x3-\x1,\y3-\y1)},
 \n2={ ve c len( \ x2 -\x1, \y2-\y1 ) },  \n 3= {a tan 2( ( \y 2-\y1 ),( \x2-\x1 ))}
 in 
 (\ p1 ) ellipse [x ra dius=\n1,y r adius = \n2,  ro tate=\ n3 ];\end{ tik zpict ure}
\ e nd{doc ument}

A :TikZ a l ready i n c lu desthe possibility t o  i n sert a separat e path  i n  t h e  cu rre nt one: th eedge. (Unfort u na t e l y,y ou cannot use  pgfonlayer her e. But  a s t h e argu mentap p end  after comm andwill be e xecute d  aftert he node  has b een  pl aced ,  t hi s s ho u ldn ’ tbea n i ssue her e. )Since  the C V S  ver sio n sw apped  the argument s t o th e  at an2 f uncti on ( at an2(x , y) t o ata n2 (y, x)), I also  inc luded a s mal lblo ck  in t h e prea mbl e t o sortthis ou t  an dd e f in e the functions at an X Y  a nd atanY X.
I a l so  c h ose to n ot  ch ange t he ou ters ep s but in steadt osu btract\p gfline wi dth  di rectl y  fro m theradius.It is an annoyance t h at these valu e sc a nn o t be  ac cessed afte r th e  nod e.
C o de 
\d o cumen tclas s[ t ik z ]{standalone}
\uset ik zlibra ry{ca lc,shapes.geo metric}
\p g f m athparse {ata n 2( 0 ,1)}
\ifdim\pg fmath result pt= 0 pt % ata n2(y,  x)
  \t ikzset{de c l are func tio n={ ata nXY ( \ x, \y)=atan2(\y, \ x );at an YX(\y,\ x)= atan2(\ y,\ x); }}\el se                   %ata n2(x, y)
  \ti kz set {d ecl are f u nction ={ata nXY( \x ,\ y )=a tan2(\x , \y ) ; atan YX (\ y,\x )=a ta n2(\x ,\y) ; }}\fi
\be gin{docum ent } 
\be gi n{ tikzpic ture}[font=\s ff amily\smal l, 
  mycyl i n der/.sty le={draw, shape=cylinde r , aspec t=1 .5, m inim um height =+3 cm,
   m i nimumwidth
cyl.after top)$),
_ \p2_= (cyl.top),
  \p3_= (cyl.before_top),
_ \n1={veclen(\x3-\x1,\y3-\y1)},
__\n2={veclen(\x2-\x1,\y2-\y1)},
  \n3={atan2((\y2-\y1),(\x2-\x1))}
_in 
 _(\p1) ellipse [x radius=\n1,_y radius =_\n2,_rotate=\n3];

\end{tikzpicture}
\end{document}

A:

TikZ already includes the possibility to insert a separate path in the current one:_the_edge.
(Unfortunately, you_cannot_use_pgfonlayer here. But as the_argument append after command will_be executed_after the node has been placed, this shouldn’t_be_an issue here.)
Since_the CVS version swapped the arguments to the atan2_function (atan2(x, y) to atan2(y, x)),_I also included_a_small_block in the preamble_to sort this out and define_the functions atanXY and atanYX.
I also_chose to not change the outer seps_but instead to subtract \pgflinewidth directly_from the radius. It is_an annoyance_that these values cannot be_accessed after the_node.
Code
\documentclass[tikz]{standalone}
\usetikzlibrary{calc,shapes.geometric}
\pgfmathparse{atan2(0,1)}
\ifdim\pgfmathresult pt=0pt_% atan2(y, x)
_ \tikzset{declare function={atanXY(\x,\y)=atan2(\y,\x);atanYX(\y,\x)=atan2(\y,\x);}}
\else   _  _     __  ___ _  %_atan2(x,_y)
 _\tikzset{declare_function={atanXY(\x,\y)=atan2(\x,\y);atanYX(\y,\x)=atan2(\x,\y);}}
\fi
\begin{document}
\begin{tikzpicture}[font=\sffamily\small,
   mycylinder/.style={draw, shape=cylinder, aspect=1.5,_minimum_height=+3cm,
    minimum width