6

    \documentclass[border=.8cm,pstricks]{standalone}
    \usepackage{pst-eucl}

    \def\a{4}
    \begin{document}
    \begin{pspicture}(4,3.5)
    \psset{linejoin=1,PointSymbol=none}
    \pstGeonode[PosAngle={-90,90,90,-90}]%
                (0,0){A}(+0,\a-.6){B}(+\a,\a-.6){C}(\a,0){D}
    \pstMiddleAB[PosAngle=-90]{A}{D}{C_1}
    \pstRotation[RotAngle=-90,PointName=none]{C_1}{B}[B']
    \pstInterLL[PosAngle=0]{C_1}{B'}{C}{D}{K}
    \pspolygon[fillstyle=crosshatch*,%
                fillcolor=cyan!35,%
                hatchcolor=blue!50,%
                hatchangle=0,%
                hatchwidth=.7pt,%
                hatchsep=10.2pt](K)(D)(A)(B)
    \pspolygon[fillstyle=crosshatch*,%
                fillcolor=cyan!20,%
                hatchcolor=blue!50,%
                hatchangle=120,%
                hatchwidth=.7pt,%
                hatchsep=11pt](B)(C_1)(K)
    \pstSegmentMark[Mark=pstslashh]{A}{C_1}
    \pstSegmentMark[Mark=pstslashh]{C_1}{D}
    \psline[linestyle=dashed](B)(C)(K)
    \pstRightAngle[RightAngleSize=.2]{K}{C_1}{B}
    \psdots[dotsize=.1](A)(B)(C)(D)(K)(C_1)
    \end{pspicture}
    \end{document}

enter image description here

Question: Can anyone add " shadow " for my picture?

After see Red Cloud's answer:

    \documentclass[border=.8cm,pstricks]{standalone}
    \usepackage{pst-eucl,pst-blur}

    \def\a{4}
    \begin{document}
    \begin{pspicture}(4,3.5)
    \psset{linejoin=1,PointSymbol=none}
    \pstGeonode[PosAngle={-90,90,90,-90}]%
                (0,0){A}(+0,\a-.6){B}(+\a,\a-.6){C}(\a,0){D}
    \pstMiddleAB[PosAngle=-90]{A}{D}{C_1}
    \pstRotation[RotAngle=-90,PointName=none]{C_1}{B}[B']
    \pstInterLL[PosAngle=0]{C_1}{B'}{C}{D}{K}
    \pspolygon[fillstyle=crosshatch*,fillcolor=cyan!35,%
                hatchcolor=blue!50, hatchangle=0,%
                hatchwidth=.7pt,hatchsep=10.2pt](K)(D)(A)(B)
    \psclip{\psframe[linestyle=none](B)(D)}
    \pspolygon[fillstyle=crosshatch*,fillcolor=cyan!20,%
                hatchcolor=blue!50, hatchangle=120,%
                hatchwidth=.7pt,hatchsep=11pt,
                shadow=true,blur=true,shadowangle=-100,blursteps=80,
                blurbg=black!8,blurradius=2.2pt](B)(C_1)(K)
    \endpsclip
    \pstSegmentMark[Mark=pstslashh]{A}{C_1}
    \pstSegmentMark[Mark=pstslashh]{C_1}{D}
    \psline(A)(B)
    \psline(K)(D)
    \psline[linestyle=dashed](B)(C)(K)
    \pstRightAngle[RightAngleSize=.2]{K}{C_1}{B}
    \psdots[dotsize=.1](A)(B)(C)(D)(K)(C_1)
    \end{pspicture}
    \end{document}

enter image description here

After see @ArtificialOdorlessArmpit's answer:

\documentclass[border=.8cm,pstricks]{standalone}
\usepackage{pst-eucl}

\def\a{4}
\begin{document}
\begin{pspicture}[saveNodeCoors](4,3.5)
\psset{linejoin=1,PointSymbol=none}
\pstGeonode[PosAngle={-90,90,90,-90}]%
(0,0){A}(+0,\a-.6){B}(+\a,\a-.6){C}(\a,0){D}
\pstMiddleAB[PosAngle=-90]{A}{D}{C_1}
\pstRotation[RotAngle=-90,PointName=none]{C_1}{B}[B']
\pstInterLL[PosAngle=0]{C_1}{B'}{C}{D}{K}
\pspolygon[fillstyle=crosshatch*,fillcolor=cyan!35,%
hatchcolor=blue!50, hatchangle=0,%
hatchwidth=.7pt,hatchsep=10.2pt](K)(D)(A)(B)
\psclip{\psframe[linestyle=none](B)(D)}
\psline[linecolor=gray,strokeopacity=.5,linewidth=3.5pt](B|!0 N-B.y .04 sub)(1.99,0|!0 N-C_1.y .03 sub)(K|!0 N-K.y .02 sub)
\endpsclip
\pspolygon[fillstyle=crosshatch*,fillcolor=cyan!20,%
hatchcolor=blue!50, hatchangle=120,%
hatchwidth=.7pt,hatchsep=11pt,](B)(C_1)(K)
\pspolygon(B)(C_1)(K)
\pstSegmentMark[Mark=pstslashh]{A}{C_1}
\pstSegmentMark[Mark=pstslashh]{C_1}{D}
\psline(A)(B)
\psline(K)(D)
\psline[linestyle=dashed](B)(C)(K)
\pstRightAngle[RightAngleSize=.2]{K}{C_1}{B}
\psdots[dotsize=.1](A)(B)(C)(D)(K)(C_1)
\end{pspicture}
\end{document}

enter image description here

3
  • Just to make @ArtificialOdorlessArmpit's comment clearer: there is no need of adding % to the middle of option key area
    – user156344
    May 25, 2019 at 11:40
  • And it absolutely doesn't hurt!
    – user187802
    May 25, 2019 at 11:42
  • @Red-Cloud Of course :) it is just time-consuming
    – user156344
    May 25, 2019 at 11:54

2 Answers 2

7

package pst-blur and

\pspolygon[fillstyle=crosshatch*,%
  fillcolor=cyan!20,%
  hatchcolor=blue!50,%
  hatchangle=120,%
  hatchwidth=.7pt,%
  hatchsep=11pt,
  blur=true,shadow=true,blurbg=blue!20,shadowangle=-80](K)(B)(C_1)

enter image description here

2
  • 1
    +1, you can see the original image, I see the shadow of your picture is different it. Before I have used " _ shadow=true,shadowcolor=...,shadowsize=...,shadowangle=..._ " but I get the result like your ouput.
    – user173875
    May 25, 2019 at 11:55
  • read the documentation of pst-blut, how the shadow can be modified.
    – user187802
    May 25, 2019 at 12:13
6

A PSTricks solution just for fun purposes.

enter image description here

\documentclass[border=.8cm,pstricks]{standalone}
\usepackage{pst-eucl}

\def\a{4}
\begin{document}
\begin{pspicture}[saveNodeCoors](4,3.5)
\psset{linejoin=1,PointSymbol=none}
\pstGeonode[PosAngle={-90,90,90,-90}]%
            (0,0){A}(+0,\a-.6){B}(+\a,\a-.6){C}(\a,0){D}
\pstMiddleAB[PosAngle=-90]{A}{D}{C_1}
\pstRotation[RotAngle=-90,PointName=none]{C_1}{B}[B']
\pstInterLL[PosAngle=0]{C_1}{B'}{C}{D}{K}
\pspolygon[fillstyle=crosshatch*,fillcolor=cyan!35,%
            hatchcolor=blue!50, hatchangle=0,%
            hatchwidth=.7pt,hatchsep=10.2pt](K)(D)(A)(B)
\psclip{\psframe[linestyle=none](B)(D)}
    \multido{\i=10+10}{11}{%
    \pstVerb{/AA {\i\space 1000 div} bind def}%
\psline[linecolor=gray,strokeopacity=\pscalculate{0.2-\i*0.001}](B|!0 N-B.y AA sub)(C_1|!0 N-C_1.y AA sub)(K|!0 N-K.y AA sub)}
\endpsclip
\pspolygon(B)(C_1)(K)
\pstSegmentMark[Mark=pstslashh]{A}{C_1}
\pstSegmentMark[Mark=pstslashh]{C_1}{D}
\psline(A)(B)
\psline(K)(D)
\psline[linestyle=dashed](B)(C)(K)
\pstRightAngle[RightAngleSize=.2]{K}{C_1}{B}
\psdots[dotsize=.1](A)(B)(C)(D)(K)(C_1)
\end{pspicture}
\end{document}

Edit

Responding to your last edit.

\documentclass[border=.8cm,pstricks]{standalone}
\usepackage{pst-eucl}

\def\a{4}
\begin{document}
\begin{pspicture}[saveNodeCoors](4,3.5)
\psset{linejoin=1,PointSymbol=none}
\pstGeonode[PosAngle={-90,90,90,-90}]%
            (0,0){A}(+0,\a-.6){B}(+\a,\a-.6){C}(\a,0){D}
\pstMiddleAB[PosAngle=-90]{A}{D}{C_1}
\pnode(C_1){T}% buffering is necessary. I don't know why.
\pstRotation[RotAngle=-90,PointName=none]{C_1}{B}[B']
\pstInterLL[PosAngle=0]{C_1}{B'}{C}{D}{K}
\pspolygon[fillstyle=crosshatch*,fillcolor=cyan!35,%
            hatchcolor=blue!50, hatchangle=0,%
            hatchwidth=.7pt,hatchsep=10.2pt](K)(D)(A)(B)
\psclip{\psframe[linestyle=none](B)(D)}
    \multido{\i=10+10}{11}{%
    \pstVerb{/AA {\i\space 1000 div} bind def}%
\psline[linecolor=gray,strokeopacity=\pscalculate{0.2-\i*0.001}]%
        (!N-B.x AA sub 0|!0 N-B.y AA sub)% your version
        (!N-T.x AA sub  N-T.y AA sub)% simplified version
        (!N-K.x AA sub N-K.y AA sub)}% simplified version
\endpsclip
\pspolygon(B)(C_1)(K)
\pstSegmentMark[Mark=pstslashh]{A}{C_1}
\pstSegmentMark[Mark=pstslashh]{C_1}{D}
\psline(A)(B)
\psline(K)(D)
\psline[linestyle=dashed](B)(C)(K)
\pstRightAngle[RightAngleSize=.2]{K}{C_1}{B}
\psdots[dotsize=.1](A)(B)(C)(D)(K)(C_1)
\end{pspicture}
\end{document}
4
  • 1
    +1. Wonderful and so hot. Thank for \psclip ... \endpsclip It solve the "opacity" problem ....
    – user173875
    May 25, 2019 at 15:42
  • The grid on folded part is not correct, isn't it?
    – Surb
    May 25, 2019 at 23:14
  • Yes, in pgf-blur package has blur shadow={shadow opacity=}, unfortunately pstricks hasn't. :-)
    – user173875
    May 26, 2019 at 2:44
  • 1
    @Surb: The folded part is not the main problem that the OP wanted to fix. He wants to fix the shadow. :-) May 26, 2019 at 7:45

You must log in to answer this question.