2

I created the following image with pstricks:

enter image description here

The fading fillings are generated by:

\psline[linewidth=10cm,linecolor=Black,linestyle=fade,fadepoints=500,fadeto=transparency](5,6)(5,1)
\psline[linewidth=10cm,linecolor=LightSkyBlue,linestyle=fade,fadepoints=500,fadeto=transparency](5,1)(5,6)

Since, the Earth itself is round, I obviously cannot use this drawing if precision is needed. Therefore, I created the next one:

enter image description here

My question is: How can I implement the same fading atmosphere effect in this situation? I'm sorry but at this late stage I cannot switch to TikZ anymore.

Code:

\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
\documentclass[11pt,pstricks]{standalone}
\standaloneconfig{border=1cm}
\usepackage{pstricks,pst-func,pst-math,pst-grad}

\begin{document}
\psset{arrowsize=6pt,linewidth=1pt} 
\begin{pspicture}[showgrid=none](-3,0.25)(13,10)
    \psarc[fillstyle=solid,fillcolor=LightSkyBlue,linestyle=none]{-}(5,0){8}{0}{180}
    \psarc[fillstyle=solid,fillcolor=ForestGreen!50,linestyle=solid]{-}(5,0){5}{0}{180}

    \psline{<->}(5,0)(5,5)
    \rput[l](5.1,2.5){$R_\oplus$}

    \psline{<->}(5,5)(5,8)
    \rput[l](5.1,6.5){$h$}
\end{pspicture}
\end{document}

I did some tries using

\multido{\ny=7.0+0.01,\ni=0.00+0.002}{750}{\psarc[linewidth=0.15mm,linestyle=solid,linecolor=Black,strokeopacity=\ni]{-}(5,0){\ny}{0}{180}}
\multido{\ny=5.0+0.01,\ni=1.00+-0.0025}{400}{\psarc[linewidth=0.15mm,linestyle=solid,linecolor=LightSkyBlue,strokeopacity=\ni]{-}(5,0){\ny}{0}{180}}

but this is really slow and gives a comparable large pdf file. enter image description here

  • It's best practice to include seperate .pdf files in your main document, with precompiled images and the likes. If the file size of the pdf file bothers you, there are alternative formats, I think PDF-A is one of them (don't know about compatibility with pstricks in this context). – 1010011010 Aug 4 '14 at 11:40
3

there are several possibilies to play with the fillstyle ccslope. See documentation for more examples:

\documentclass[11pt,border=12pt]{standalone}
\usepackage[dvipsnames,svgnames,x11names]{pstricks}
\usepackage{pst-slpe}

\begin{document}
\psset{arrowsize=6pt,linewidth=1pt,unit=0.5} 
\begin{pspicture*}(-11,0)(11,11)
\psframe*(-11,0)(11,11)
\pscircle[linestyle=none,fillstyle=ccslope,slopebegin=blue,slopeend=black](0,0){11}
\pscircle[linestyle=none,fillstyle=ccslope,slopebegin=white,slopeend=blue](0,0){10}
  \psarc[fillstyle=solid,fillcolor=ForestGreen!50,linestyle=solid]{-}(0,0){6}{0}{180}
  \psline{<->}(0,6)      \uput[0](0,2.5){$R_\oplus$}
  \psline{<->}(0,6)(0,10)\uput[0](00,8){$h$}
\end{pspicture*}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.