\documentclass{article} \usepackage[a4paper,margin=2cm]{geometry} \usepackage{pst-moire} \begin{document} % la couleur des points du premier calque est choisie avec [linecolor=...] % la couleur des points du second calque est choisie avec [fillcolor=...] % function : variable = t % layer=true : 2 layers displayed , false=> layer 1 only Problem page 100 : "\emph{The Theory of the Moire Phenomenon}" Volume II, by I. Amidror, published by Springer, \textbf{3-18 }\emph{Synthesis of a layer superposition having a predefined fixed locus.} \begin{quote}\itshape ``Design layer transformations $\mathbf{g}_1(x,y)$ and $\mathbf{g}_2(x,y)$ that will produce in the superposition of two initially identical random screens a fixed locus consisting of a star-like curve that surrounds the origin as shown in the figure on the front cover of this book. Hint: In this case, you may consider a top-opened conic surface having star-like level lines, such as $z=r(1+0.5\cos5\theta)$, or, possibly, $z=r/(1+0.5\cos5\theta)$, which gives a slightly different star. You may adjust the orientation of the star by replacing $\cos$ by $\sin$ or by $-\sin$, as seems suitable. In order to have this surface intersect the $x,y$ plane along a star, you need to lower it by some constant $z_0$: $z=r(1+0.5\cos5\theta)-z_0$. But if you wish to obtain a more complex surface that intersects the $x,y$ plane on a family of concentric stars, you may consider a surface such as: $z=\sin(r(1+0.5\cos5\theta))$.'' \end{quote} \begin{pspicture}(-8,-8)(8,8) \psframe*[linecolor=orange](-8,-8)(8,8) % z=5*r*(1-0.5*sin(5*t*Pi/180))-2.5 \psGlassPattern[linecolor=red] \end{pspicture} \begin{pspicture}(-8,-8)(8,8) \psframe*[linecolor=red](-8,-8)(8,8) % in algebraic notation % t in degrees, argument sin and cos in radians % convert *Pi/180 \psGlassPattern[unit=0.75,dotsize=1pt,dotstyle=square,linecolor={[rgb]{0 0 0.5}},algebraic,function=5*r*(1-0.5*cos(7*t*Pi/180))-2.5] \end{pspicture} \begin{pspicture}(-9,-9)(9,9) \psframe*[linecolor=cyan](-9,-9)(9,9) % in algebraic notation % t in degrees, argument sin and cos in radians % convert *Pi/180 \psGlassPattern[unit=1.1,dotsize=1pt,dotstyle=square*,linecolor=black,fillcolor=cyan,algebraic,function=5*r/(1-0.75*sin(5*t*Pi/180))-2.5]% ,layers=false \end{pspicture} \end{document}