[pstricks] gradients combined?

Pedro Jorge Caridade caridade at qta.qui.uc.pt
Thu Nov 17 16:30:26 CET 2005


I think I have a impossible question for the list, but let's see. 

I have two circles that are filled with a concentric gradient (via
pst-slpe) starting in the origin of them and going to zero. Both are in
the same color, and can be seen as density probabilities. Now I will
start to get them close until part of them overlap. I used clip to get
the intersection of both. I would like now to paint this intersection.
For that, and to give the effect of overlapping, can we calculate the
clip gradient as the sum of the two gradients of the overlapped region
of the circles? For solid colors, I saw something is Herbert's homepage,
but for gradient ... Here are a small example. The clipping color is
only for a small test


\documentclass{article}

\usepackage{pst-all}
\usepackage{pstricks-add,pst-blur,pst-slpe}
\usepackage{pst-slpe}
\begin{document}

\begin{pspicture}(-1.8,-1)(1.8,1)
\cnode[fillstyle=ccslope,slopebegin={[HTML]{015B79}},linestyle=none,%
slopeend={[HTML]{EAFAFF}}](-0.75,0){1.cm}{A}
\cnode[fillstyle=ccslope,slopebegin={[HTML]{015B79}},linestyle=none,%
slopeend={[HTML]{EAFAFF}}](0.75,0){1.cm}{B}
\begin{psclip}{\pscircle[linestyle=none](-0.75,0){1cm}}%
\psset{fillstyle=ccslope,slopecenter=0.1
0.5,slopebegin={[HTML]{6EB0C6}},linestyle=none,%
slopeend={[HTML]{D9F2FB}}}
\pscircle[linestyle=none](0.75,0){1cm}
\end{psclip}
\rput(0.75,-2.0){\LARGE \bf B}
\rput(-0.75,-2.0){\LARGE \bf A}
\end{pspicture}

\end{document}

Cheers
Pedro 





More information about the PSTricks mailing list