[pstricks] continues color in a coil

Thomas Söll 1und1 Thomas.Soell at onlinehome.de
Fri Jan 6 09:06:45 CET 2012


Hello,

a few days ago, I asked about a problem by drawing a scheme of a carbon power-station.
Now, here is my (not perfect) solution for anyone you are interested.

Thomas

\documentclass[a4paper,12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{ngerman}
\usepackage{amsmath,amsthm}
\usepackage{amsfonts}
\usepackage[psamsfonts]{amssymb}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{mathpazo}
\usepackage[scaled=.95]{helvet}
\usepackage{courier}
%\linespread{1.05}     % Zeilenabstand um 5% erhöhen
\usepackage{upgreek}
\usepackage{multido}      % From PSTricks
\usepackage[dvips]{graphics}
\usepackage[dvips]{graphicx}
\usepackage[dvips,usenames,dvipsnames]{xcolor} %% Farben sind im Dokument xcolor.pdf definiert
\usepackage{pst-plot}
\usepackage{pst-node}
\usepackage{pst-tree}
\usepackage{pst-eps}
\usepackage[tiling]{pst-fill}
\usepackage{pst-text}
\usepackage{pst-grad}
\usepackage{pst-coil}
\usepackage{pstricks-add}


%---------------- Kontinuierlicher Farbverlauf bei Kurven -------------------------
\makeatletter
\pst at addfams{pst-HSB}
\define at key[psset]{pst-HSB}{HueBegin}{% Between 0 and 1
  \def\PstParametricplotHSB at HueBegin{#1}}
\define at key[psset]{pst-HSB}{HueEnd}{% Between 0 and 1
  \def\PstParametricplotHSB at HueEnd{#1}}
\define at boolkey[psset]{pst-HSB}[Pst@]{HSB}[true]{}
% Default values
\psset[pst-HSB]{HueBegin=0,HueEnd=1,HSB=true}
\psset{dimen=outer}

\def\parametricplotHSB{\pst at object{parametricplotHSB}}
\def\parametricplotHSB at i#1#2#3{{%
  \begin at ClosedObj
  \addto at pscode{%
    /t #1 def
    /dt #2 t sub \psk at plotpoints\space div def
    /t t dt sub def
    /Counter 0 def
    1 setlinejoin
    \psk at plotpoints {
      /t t dt add def
      /Counter Counter 1 add def
      #3
      \pst at number\psyunit mul exch
      \pst at number\psxunit mul exch
      1 Counter eq { moveto currentpoint /OldY ED /OldX ED } % First point
        {\ifPst at HSB % Other points than the first one
          /PointY exch def
          /PointX exch def
          Counter \psk at plotpoints\space div
          \PstParametricplotHSB at HueEnd\space
          \PstParametricplotHSB at HueBegin\space sub mul
          \PstParametricplotHSB at HueBegin\space add
          1 1 sethsbcolor
          OldX OldY PointX PointY lineto lineto
          stroke
          PointX PointY moveto
   /OldX PointX def /OldY PointY def
        \else lineto \fi } ifelse
     } repeat }% fin du code ps
   \end at ClosedObj}%
  \ignorespaces} % fin de la commande PSTricks
\makeatother

%-------------------------------------------------------------------------------

\begin{document}

%\rput[l](-2.12,-0.1){\includegraphics[width=12cm]{Kohlekraftwerk1.eps}}%\\

%\vspace{5.8cm}

\rput(0,0){%
%\psgrid(-3,-3)(10,4)%
\psframe[fillstyle=solid,fillcolor=gray!40, opacity=0.9,linewidth=0.8pt](-1.85,-2.65)(8.8,3.45)%
\psframe[fillstyle=solid,fillcolor=white, opacity=0.9,linewidth=0.8pt](-1.7,-2.5)(8.65,3.3)%
\pspolygon[fillstyle=solid,fillcolor=gray!40, opacity=0.9,linewidth=0.8pt]%
(-1.7,3.15)(-1,2)(-1,-1.7)(1,-1.7)(1,2.5)(-0.25,2.5)(-0.8,3.3)(-1.7,3.3)%
\pspolygon[fillstyle=gradient,linecolor=black,gradmidpoint=0,gradangle=10,gradbegin=orange!80,gradend=white]%
(-1.665,3.3)(-0.88,2)(-0.88,-1.6)(0.9,-1.6)(0.9,2.4)(-0.32,2.4)(-0.93,3.3)(-1.665,3.3)%
\pspolygon[fillstyle=solid,fillcolor=black, opacity=1,linewidth=0.8pt]%
(-1.35,-0.92)(-1.25,-0.85)(-1,-0.85)(-1,-0.95)(-0.88,-0.95)(-0.88,-1.15)(-1,-1.15)(-1,-1.45)(-1.25,-1.45)(-1.35,-1.38)%
%
%--------------- Flammen ------------------------------------------------------------------
%-------------------------------------------------------------------------------------------
\pscustom[fillstyle=solid,fillcolor=yellow!50,linestyle=none]{%
    \pscurve(-0.87,-1)(-0.4,-0.75)(-0.55,-0.4)(-0.4,-0.13)%
    \pscurve(-0.45,-0.33)(-0.2,-0.53)%
    \psline(-0.2,-0.53)(-0.2,-0.97)%
    \pscurve(-0.2,-0.97)(-0.6,-1.05)(-0.87,-1.01)%
}%
\pscustom[fillstyle=solid,fillcolor=yellow!50,linestyle=none]{%
    \pscurve(-0.2,-0.53)(-0.17,-0.35)(0.1,-0.1)%
    \pscurve(0.1,-0.1)(-0.01,-0.4)(0,-0.6)%
    \pscurve(0,-0.6)(0.04,-0.52)(0.16,-0.46)%
    \pscurve(0.16,-0.46)(0.1,-0.6)(0.17,-0.8)(0,-0.98)(-0.2,-0.97)%
    \psline(-0.2,-0.97)(-0.2,-0.53)%
}%
\pscustom[fillstyle=solid,fillcolor=yellow!50,linestyle=none]{%
    \pscurve(0.1,-0.7)(0.2,-0.6)(0.2,-0.36)(0.4,-0.1)%
    \pscurve(0.4,-0.1)(0.31,-0.29)(0.33,-0.4)(0.39,-0.6)(0.3,-0.8)(0.1,-0.86)%
    \psline(0.1,-0.86)(0.1,-0.7)%
}%
%-------------------------------------------------------------------------------------------
%--------------- Kondensator ---------------------------------------------------------------
%-------------------------------------------------------------------------------------------
\pspolygon[fillstyle=gradient,linestyle=none,gradmidpoint=0,gradangle=0,gradbegin=blue,gradend=cyan]%
(4.9,-0.7)(4.85,-0.55)(6.75,-0.55)(6.7,-0.7)%
\pscurve[linewidth=0.8pt](4.9,-0.7)(4.8,-0.2)(4.9,0.3)%
\psline[linewidth=0.8pt](4.9,0.3)(6.7,0.3)%
\pscurve[linewidth=0.8pt](6.7,0.3)(6.8,-0.2)(6.7,-0.7)%
\psline[linewidth=0.8pt](6.7,-0.7)(4.9,-0.7)%
%
%-----------------------------------------------------------------------------------------
\rput[l](-1.47,3.1){\tiny Rauch-}%
\rput[l](-1.2,2.8){\tiny gas-}%
\rput[l](-1.05,2.6){\tiny kanal}%
\rput[l](-1.5,-1.9){\tiny Brenner} \psline[linewidth=0.6pt](-1.2,-1.75)(-1.2,-1.2)%
\rput[l](0,-2){\tiny Brennkammer} \psline[linewidth=0.6pt](0.25,-1.9)(0.25,-1.2)%
\rput[l](2.9,-0.15){\tiny Vor-} \rput[l](2.9,-0.35){\tiny wärm-} \rput[l](2.9,-0.55){\tiny anlage}%
\rput[l](2.9,-1.5){\tiny Pumpe}%
%
%----  Wasserwendel----------------------------------------------------------------------
%-----------------------------------------------------------------------------------------
\psset{coilheight=0.495,coilwidth=1.3cm,coilaspect=52}%
\rput{90}(0,0){\psCoil[doubleline=true,linecolor=black,linewidth=0.07cm]{250}{720}}%
\rput(0.235,0.4){%
\parametricplotHSB[plotpoints=500,linewidth=1.73mm,HueBegin=0.65,HueEnd=0.84]{270}{90}{0.88 t cos mul 0.365 t sin mul}}%
\rput{90}(0,0){\psCoil[doubleline=true,linecolor=black,linewidth=0.07cm]{600}{1200}}
\rput{90}(0,0){\psCoil[doubleline=true,linecolor=magenta,linewidth=0.045cm]{470}{1200}}
\rput{90}(0,0){\psCoil[doubleline=true,linecolor=black,linewidth=0.07cm]{850}{1400}}
\rput{90}(0,0){\psCoil[doubleline=true,linecolor=magenta,linewidth=0.045cm]{850}{1400}}
\rput{90}(0,0){\psCoil[doubleline=true,linecolor=black,linewidth=0.07cm]{1260}{1550}}
\rput{90}(0,0){\psCoil[doubleline=true,linecolor=magenta,linewidth=0.045cm]{1220}{1550}}
%---------------------------------------------------------------------------------------------------------------
\psline[linewidth=1.47mm,linecolor=magenta,linearc=0.15,bordercolor=black,border=1.1pt](0.2,1.943)(4.1,1.943)(4.1,1.6)%
\psline[linewidth=1.47mm,linecolor=magenta,linearc=0.15,bordercolor=black,border=1.1pt](4.85,1.6)(4.85,1.943)(5.8,1.943)(5.8,1.6)%
\psline[linewidth=1.47mm,linecolor=white,linearc=0.15,bordercolor=black,border=1.1pt](5.25,0.285)(5.25,0.9)%
\psline[linewidth=1.47mm,linecolor=white,linearc=0.15,bordercolor=black,border=1.1pt](6.4,0.285)(6.4,0.9)%
\psframe[fillstyle=gradient,linestyle=none,gradmidpoint=0,gradangle=0,gradbegin=white,gradend=magenta!70](5.162,0.27)(5.338,0.92)%
\psframe[fillstyle=gradient,linestyle=none,gradmidpoint=0,gradangle=0,gradbegin=white,gradend=magenta!70](6.312,0.27)(6.488,0.92)%
\psline[arrowinset=0,arrowscale=1.2,arrowlength=0.8,linewidth=0.8pt]{->}(5.25,0.5)(5.25,0.1)%
\psline[arrowinset=0,arrowscale=1.2,arrowlength=0.8,linewidth=0.8pt]{->}(6.4,0.5)(6.4,0.1)%
\pscircle[linewidth=0.8pt,fillstyle=solid,fillcolor=blue!20!green!70](8.3,-0.4){0.17}%
\psline[linewidth=1.3mm,linecolor=blue!20!green!70,linearc=0.15,bordercolor=black,border=1.1pt]%
(8.18,-0.4)(5.1,-0.4)(5.1,-0.1)(9.4,-0.1)(9.4,-1.2)%
\psline[linewidth=1.3mm,linecolor=blue!20!green!70,linearc=0.15,bordercolor=black,border=1.1pt]%
(8.423,-0.4)(9.1,-0.4)(9.1,-1.2)%
%-------------------------------------------------------------------------------------------
%--------------------------- Fluss ----------------------------------------------------------
\psplot[linecolor=blue]{8.9}{9.8}{x 1600 mul sin 0.02 mul 1.05 sub}%
\psplot[linecolor=blue]{8.9}{9.8}{x 1600 mul sin 0.02 mul 1.15 sub}%
\psplot[linecolor=blue]{8.9}{9.8}{x 1600 mul sin 0.02 mul 1.25 sub}%
\psplot[linecolor=blue]{8.9}{9.8}{x 1600 mul sin 0.02 mul 1.35 sub}%
\psplot[linecolor=blue]{8.9}{9.8}{x 1600 mul sin 0.02 mul 1.45 sub}%
\psplot[linecolor=blue]{8.9}{9.8}{x 1600 mul sin 0.02 mul 1.55 sub}%
%-------------------------------------------------------------------------------------------
%-------------------------- Turbine ------------------------------------------------------------
\psframe[fillstyle=gradient,linecolor=black,gradmidpoint=0,gradangle=0,gradbegin=blue!20!green!70,gradend=green!10]%
(3.9,0.9)(6.6,1.6)%
\psline(4.6,0.9)(4.6,1.6)%
\psframe[fillstyle=gradient,linecolor=black,gradmidpoint=0,gradangle=0,gradbegin=blue!20!green!70,gradend=green!10,dimen=inner]%
(3.8,1.05)(3.9,1.45)%
\psframe[fillstyle=solid,linecolor=black,fillcolor=black](3.7,1.2)(3.8,1.3)%
\psframe[fillstyle=gradient,linecolor=black,gradmidpoint=0,gradangle=0,gradbegin=blue!20!green!70,gradend=green!10,dimen=inner]%
(6.6,1.1)(6.7,1.4)%
%-------------------------------------------------------------------------------------------
%------------------------------ Generator --------------------------------------------------
\psframe[fillstyle=gradient,linecolor=black,gradmidpoint=0,gradangle=0,gradbegin=blue!60!green!70,gradend=green!10,dimen=inner]%
(6.95,1.1)(7,1.4)%
\psframe[fillstyle=gradient,linecolor=black,gradmidpoint=0,gradangle=0,gradbegin=blue!60!green!70,gradend=green!10]%
(7,0.9)(8,1.6)%
\psframe[fillstyle=gradient,linecolor=black,gradmidpoint=0,gradangle=0,gradbegin=blue!60!green!70,gradend=green!10,dimen=inner]%
(8,1.05)(8.4,1.45)%
\psframe[fillstyle=solid,linecolor=black,fillcolor=black](8.4,1.2)(8.47,1.3)%
\psframe[fillstyle=solid,linecolor=black,fillcolor=black](6.7,1.2)(7,1.3)%
\psline[linecolor=black,linewidth=0.8pt](7.7,0.9)(7.7,0.8)(8.3,0.8)%
\psline[linecolor=black,linewidth=0.8pt](7.6,0.9)(7.6,0.7)(8.3,0.7)%
\psline[linecolor=black,linewidth=0.8pt](7.5,0.9)(7.5,0.6)(8.3,0.6)%
\rput[l](8.38,0.8){\psplot[linecolor=black,linewidth=0.6pt]{-0.01}{0.16}{x 2500 mul sin 0.02 mul}}
\rput[l](8.38,0.7){\psplot[linecolor=black,linewidth=0.6pt]{-0.01}{0.16}{x 2500 mul sin 0.02 mul}}
\rput[l](8.38,0.6){\psplot[linecolor=black,linewidth=0.6pt]{-0.01}{0.16}{x 2500 mul sin 0.02 mul}}
%-------------------------------------------------------------------------------------------
\pspolygon[fillstyle=solid,fillcolor=black](8.2,-0.4)(8.36,-0.31)(8.36,-0.49)%
\psframe[fillstyle=vlines,hatchangle=90,hatchsep=1.5pt,hatchcolor=red,linewidth=0.8pt](2.2,-0.8)(2.8,-0.2)%
\pscircle[linewidth=0.8pt,fillstyle=solid,fillcolor=blue](3.2,-1.1){0.25}%
\pspolygon[fillstyle=solid,fillcolor=black](3.05,-1.1)(3.3,-0.96)(3.3,-1.24)%
\psline[linewidth=1.47mm,linecolor=blue,linearc=0.15,bordercolor=black,border=1.1pt](0.2,0.035)(2.5,0.035)(2.5,-1.1)(2.99,-1.1)%
\psline[linewidth=1.47mm,linecolor=blue,linearc=0.15,bordercolor=black,border=1.1pt](3.4,-1.1)(5.8,-1.1)(5.8,-0.688)%
\psline[arrowinset=0,arrowscale=1.2,arrowlength=0.8,linewidth=0.8pt]{->}(1.6,0.035)(1.2,0.035)%
\psline[arrowinset=0,arrowscale=1.2,arrowlength=0.8,linewidth=0.8pt]{->}(0.2,0.82)(-0.2,0.85)%
\psline[arrowinset=0,arrowscale=1.2,arrowlength=0.8,linewidth=0.8pt]{->}(1.2,1.943)(1.6,1.943)%
\psline[arrowinset=0,arrowscale=1.2,arrowlength=0.8,linewidth=0.8pt]{->}(5.2,1.943)(5.6,1.943)%
\psline[arrowinset=0,arrowscale=1.2,arrowlength=0.8,linewidth=0.6pt]{->}(7.5,-0.4)(7.1,-0.4)%
\psline[arrowinset=0,arrowscale=1.2,arrowlength=0.8,linewidth=0.6pt]{->}(7.5,-0.1)(7.9,-0.1)%
\rput[l](2.05,2.7){\tiny Frischdampf} \psline[linewidth=0.6pt](2.7,1.95)(2.7,2.55)%
\rput[l](1.5,0.6){\tiny Speise-} \psline[linewidth=0.6pt](1.77,0.035)(1.77,0.22)%
\rput[l](1.5,0.3){\tiny wasser} %
\rput[l](4,2.7){\tiny Turbine} \psline[linewidth=0.6pt](4.5,1.4)(4.5,2.5)%
\rput[l](7.0,2.7){\tiny Generator} \psline[linewidth=0.6pt](7.5,1.4)(7.5,2.5)%
\rput[l](7.3,-0.8){\tiny Kühlwasser} \psline[linewidth=0.6pt](7.7,-0.4)(7.7,-0.6)%
\rput[l](9.1,-1.8){\tiny Fluss}%
}



\end{document} 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20120106/6d17c41e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Wasserkreislauf_im_Kraftwerk.pdf
Type: application/pdf
Size: 50764 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20120106/6d17c41e/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Wasserkreislauf_im_Kraftwerk.tex
Type: application/octet-stream
Size: 12121 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20120106/6d17c41e/attachment-0001.obj>


More information about the PSTricks mailing list