[Tex/LaTex] How to draw shade ball with two different colors

colortikz-pgf

I use \shade [ball color=black!60!red] (0,0) circle (4pt); command inside tikz image to represent a vertex of a graph. Now I am using some operation where two vertices are merged. So is it possible to have a shaded ball with two sided color?

I have gone through the following link, but it is a a circle type. I need a ball type. So is it possible? Please help.

  \documentclass[10pt]{article}
  \usepackage{pgf,tikz}
  \usepackage{mathrsfs}
   \usetikzlibrary{arrows}
   \pagestyle{empty}
   \begin{document}
  \definecolor{qqqqff}{rgb}{0.,0.,1.}
  \definecolor{ffqqqq}{rgb}{1.,0.,0.}
  \begin{figure}
   \centering
   \begin{tikzpicture}[ultra thick,x=1.0cm,y=1.0cm]
   \draw (-1.,3.)-- (-1.,1.);
   \draw (1.,1.)-- (3.,1.);
   \draw (3.,1.)-- (2.,3.);
   \draw (2.,3.)-- (1.,1.);
   \draw (6.,3.)-- (5.,1.);
   \draw (5.,1.)-- (7.,1.);
   \draw (7.,1.)-- (6.,3.);
   \draw (5.99,5.02)-- (5.99,3.02);
   \draw (-1.2,3.5) node[anchor=north west] {$u$};
   \draw (1.84,3.5) node[anchor=north west] {$v$};
   \draw (6,3.5) node[anchor=north west] {$u+v$};
   \begin{scriptsize}
   \shade [ball color=ffqqqq] (-1.,3.) circle (5pt);
   \shade [ball color=ffqqqq] (-1.,1.) circle (5pt);
   \shade [ball color=qqqqff] (1.,1.) circle (5pt);
   \shade [ball color=qqqqff] (3.,1.) circle (5pt);
   \shade [ball color=qqqqff] (2.,3.) circle (5pt);
   \shade [ball color=qqqqff] (6.,3.) circle (5pt);
   \shade [ball color=qqqqff] (5.,1.) circle (5pt);
   \shade [ball color=qqqqff] (7.,1.) circle (5pt);
   \shade [ball color=ffqqqq] (5.99,5.02) circle (5pt);
   \shade [ball color=ffqqqq] (5.99,3.02) circle (5pt);
   \end{scriptsize}
   \end{tikzpicture}
   \caption{I am trying to color the vertex $u+v$ half red - half blue}
   \end{figure}

   \end{document}

Best Answer

Here is an answer with semi-sphaire over your original sphaire: (The idea was from: This answer)

 \documentclass[10pt]{article}
  \usepackage{pgf,tikz}
  \usepackage{mathrsfs}
   \usetikzlibrary{arrows}
   \pagestyle{empty}
   \begin{document}
  \definecolor{qqqqff}{rgb}{0.,0.,1.}
  \definecolor{ffqqqq}{rgb}{1.,0.,0.}
  \begin{figure}
   \centering
   \begin{tikzpicture}[ultra thick,x=1.0cm,y=1.0cm]
   \draw (-1.,3.)-- (-1.,1.);
   \draw (1.,1.)-- (3.,1.);
   \draw (3.,1.)-- (2.,3.);
   \draw (2.,3.)-- (1.,1.);
   \draw (6.,3.)-- (5.,1.);
   \draw (5.,1.)-- (7.,1.);
   \draw (7.,1.)-- (6.,3.);
   \draw (5.99,5.02)-- (5.99,3.02);
   \draw (-1.2,3.5) node[anchor=north west] {$u$};
   \draw (1.84,3.5) node[anchor=north west] {$v$};
   \draw (6,3.5) node[anchor=north west] {$u+v$};
   \begin{scriptsize}
   \shade [ball color=ffqqqq] (-1.,3.) circle (5pt);
   \shade [ball color=ffqqqq] (-1.,1.) circle (5pt);
   \shade [ball color=qqqqff] (1.,1.) circle (5pt);
   \shade [ball color=qqqqff] (3.,1.) circle (5pt);
   \shade [ball color=qqqqff] (2.,3.) circle (5pt);
   \shade [ball color=qqqqff] (6.,3.) circle (5pt);
   \shade [ball color=qqqqff] (5.,1.) circle (5pt);
   \shade [ball color=qqqqff] (7.,1.) circle (5pt);
   \shade [ball color=ffqqqq] (5.99,5.02) circle (5pt);
   \shade[ball color=ffqqqq] (5.82,3)  arc (180:0:5pt);
   \end{scriptsize}
   \end{tikzpicture}
   \caption{I am trying to color the vertex $u+v$ half red - half blue}
   \end{figure}

   \end{document}

Output:

enter image description here