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

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

  • 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. – Trong Vuong May 25 at 11:55
  • read the documentation of pst-blut, how the shadow can be modified. – Red-Cloud May 25 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}
  • 1
    +1. Wonderful and so hot. Thank for \psclip ... \endpsclip It solve the "opacity" problem .... – Trong Vuong May 25 at 15:42
  • The grid on folded part is not correct, isn't it? – Surb May 25 at 23:14
  • Yes, in pgf-blur package has blur shadow={shadow opacity=}, unfortunately pstricks hasn't. :-) – Trong Vuong May 26 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. :-) – Gold Digging Programmer May 26 at 7:45

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.