<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
Herbert:
<div>Thank you for your response. </div>
<div><br>
</div>
<div>I’ll have to study your example in detail. </div>
<div>I’ve become pretty fluent in the language of Latex and Pstricks, and was hoping something could be done </div>
<div>within that. I also was probably not so clear about what I was looking for.</div>
<div><br>
</div>
<div>First, consider the following example of a single (3cm x 3cm) “tile”:</div>
<div><br>
</div>
<div>
<div>% !TEX TS-program = latex</div>
<div>\documentclass{article} </div>
<div><br>
</div>
<div>\usepackage{pstricks}</div>
<div>%\usepackage{subfig}</div>
<div><br>
</div>
<div>\usepackage{colormacros}</div>
<div><br>
</div>
<div>\begin{document}</div>
<div><br>
</div>
<div> \begin{pspicture}[unit=3cm](0,0)(1,1)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>\pspolygon[fillcolor=green, fillstyle=solid]%</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>(0.02,0.02)(0.98,0.02)(0.98,0.98)(0.02,0.98)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>\psline[linecolor=black, linestyle=dashed, linewidth=1.5pt]{<-}%</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>(0.16,0.16)(0.16, 0.84)(0.5,0.84)(0.5,0.16)(0.84,0.16)(0.84,0.84)</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>\end{pspicture}</div>
<div><br>
</div>
<div>\end{document}</div>
</div>
<div><br>
<div>
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;">
<div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;">
<div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div style="margin: 0px; font-size: 12px;"><br>
</div>
</div>
</span></div>
</span></span></div>
</div>
<div>
<div><br>
</div>
<div><b>Question 1: </b> If I want to create a (9cm x 9cm) square which is tiled as a 3x3 array of copies of this tile, </div>
<div>one way is to do so is to write </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>\begin{{pspicture}[unit=3cm](0,0)(3,3) </div>
<div>followed by nine versions of </div>
<div>
<div><span class="Apple-tab-span" style="white-space: pre;"></span>\pspolygon[fillcolor=green, fillstyle=solid]%</div>
<div><span class="Apple-tab-span" style="white-space: pre;"></span>(0.02,0.02)(0.98,0.02)(0.98,0.98)(0.02,0.98)</div>
<div><span class="Apple-tab-span" style="white-space: pre;"></span>\psline[linecolor=black, linestyle=dashed, linewidth=1.5pt]{<-}%</div>
<div><span class="Apple-tab-span" style="white-space: pre;"></span>(0.16,0.16)(0.16, 0.84)(0.5,0.84)(0.5,0.16)(0.84,0.16)(0.84,0.84)</div>
<div>each with the 12 x-coordinates (resp. y-coordnates) replaced whre appropriate with the given value </div>
<div>inceased by 1.0 or 2.0.</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>I would expect that instead this could be accomplished by turning the original specification into a </div>
<div>“template” and using a sequence of nine \rput commands to create the 9x9 array. </div>
<div>Can this be done using the basic commands of pstricks?</div>
<div><br>
</div>
<div><b>Question 2:</b> Suppose instead I have several (say3) other <i>variants</i> of this tile, all in the same formal, and differing </div>
<div>in color (say, red, blue and yellow in place of green as well as the exact nature of the \psline in the original </div>
<div>(ie, differing in the coordinates of the “turning points” of the curve, given by changing the coordinates in the </div>
<div>fourth line of the content above. </div>
<div>Suppose I want to create a 3x3 array using these four variants, arranged according to some pattern—for example,</div>
<div>the variant used depends on the parity of their position witin the array.</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>Again, this can be done by hand, writing out nine variants of the four lines above.</div>
<div>Or, if there is a good answer to question 1, we could write four variants of our oriiginal tile, and use four different </div>
<div>multirput commands to create the array. </div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>But can it be done by creating a singlen template as imagined in question 1, but using parameters for the color and the curve (or the coordinates of the turning points of the curve) and applying
several multirput commands?</div>
<div><br>
</div>
<div><b>Question 3:</b> Suppose I want to fill a 9cm x 9cm square whith a <u style="text-decoration: line-through;">
9x9 array </u> of these various tiles (again with some</div>
<div>principle underlyng the choice of variant in each given spot). Writing out 81 versions of the four lines above, together with rescaling the descriptions, is not only tedious but also forbiddingly error-prone.</div>
<div>Is it possible to insert a sizing parameter in addition to those imagined in Question 2 and then use 4 multirput commands on this?</div>
<div><br>
</div>
<div>I think it could be done with the kind of language in your example, but is it possible to do this pretty much inside</div>
<div>the PsTricks umbrella?</div>
<div><br>
</div>
<div>Any exgra ideas would be very welcome here!</div>
<div><br>
</div>
<div>Thanks</div>
<div><br>
</div>
<div>ZN</div>
<div><br>
</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="auto" style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; border-spacing: 0px; -webkit-text-decorations-in-effect: none;"><span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; orphans: 2; widows: 2; border-spacing: 0px; -webkit-text-decorations-in-effect: none;">
<div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; border-spacing: 0px; -webkit-text-decorations-in-effect: none;">
<div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
<div style="margin: 0px; font-size: 12px;"><font face="Helvetica" style="font-stretch: normal; line-height: normal;">Zbigniew Nitecki</font></div>
<div style="margin: 0px; font-size: 12px;"><font face="Helvetica" style="font-stretch: normal; line-height: normal;">Professor Emeritus</font></div>
<div style="margin: 0px; font-size: 12px;"><font face="Helvetica" style="font-stretch: normal; line-height: normal;">Department of Mathematics</font></div>
<div style="margin: 0px; font-size: 12px;"><font face="Helvetica" style="font-stretch: normal; line-height: normal;">Tufts University</font></div>
<div style="margin: 0px; font-size: 12px;"><font face="Helvetica" style="font-stretch: normal; line-height: normal;">Medford, MA 02155</font></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 14px; font-size: 12px;">
<br>
</div>
<div style="margin: 0px; font-size: 12px;"><font face="Helvetica" style="font-stretch: normal; line-height: normal;">telephones:</font></div>
<div style="margin: 0px; font-size: 12px;"><font face="Helvetica" style="font-stretch: normal; line-height: normal;">Dept.<span class="Apple-converted-tab"> </span>(617)627-3234</font></div>
<div style="margin: 0px; font-size: 12px;"><font face="Helvetica" style="font-stretch: normal; line-height: normal;">Dept. fax<span class="Apple-converted-tab"> </span>(617)627-3966</font></div>
<span class="Apple-style-span" style="font-size: 12px;"><a href="http://www.tufts.edu/~znitecki/">http://www.tufts.edu/~znitecki/</a></span></div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</span></div>
</div>
</div>
<blockquote type="cite">
<div>On Jun 12, 2025, at 05:34, Herbert Voss <Herbert.Voss@fu-berlin.de> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div><br>
<br>
Am 11.06.25 um 22:00 schrieb Nitecki, Zbigniew H.:<br>
<blockquote type="cite">I want to tile a large rectangular area with tiles. All the tiles are<br>
(congruent) squares filled with a specific color and with some curves<br>
drawn on them. They come in more than one variety, but there are<br>
enough of each variety that<br>
I want to create “tile” templates (for thesevarieties, with color and<br>
the specific curve defined by parameters)<br>
and use multirput to do the tiling.<br>
<br>
I’m looking for a way to define a graphical object which is<br>
self-contained, perhaps with a few parameters that<br>
need to be filled in, which can then be treated like other<br>
system-defined objects (e.g. pscircles, pslines)—specifically which<br>
can be rput anywhere in a larger picture, with some internal<br>
coordinates which get treated<br>
as relative coordinates. I thought \newpsobject could work, but that<br>
is only for adding bells and whistles to<br>
already defined objects.<br>
<br>
Any suggestons?<br>
</blockquote>
<br>
Here comes a starter ...<br>
<br>
Herbert<br>
<br>
\documentclass{article}<br>
\usepackage{pstricks,pst-plot}<br>
<br>
\makeatletter<br>
\def\foo{\@ifnextchar[\foo@i{\foo@i[]}}<br>
\def\foo@i[#1]#2#3#4{%<br>
\begingroup<br>
\if$#1$\else\psset{#1}\fi<br>
\psframebox{%<br>
\begin{pspicture}(-2.25,-2.5)(2.25,2.5)<br>
\rput(0,2.25){\textbf{#2}}<br>
\rput(0,0){%<br>
\begin{pspicture*}(-2,-2)(2,2)<br>
\psgrid(0,0)(-2,-2)(2,2)<br>
#3<br>
\end{pspicture*}}%<br>
\rput(0,-2.25){#4}<br>
\end{pspicture}}<br>
\endgroup<br>
}<br>
<br>
\begin{document}<br>
<br>
\foo{Demo 1}%<br>
{\psplot[linewidth=1.5pt,algebraic]{-1.5}{1.5}{x^2}}%<br>
{A quadratic function}<br>
\foo{Demo 2}%<br>
{\psplot[linewidth=1.25pt,linecolor=red,algebraic]{-1.5}{1.5}{x^3}}%<br>
{A cubicic function}<br>
<br>
\foo[unit=1.5]{Demo 3}%<br>
{\psline[linewidth=2pt,linestyle=dashed](-2,-2)(2,2)}%<br>
{A dashed line}<br>
\end{document}<br>
<br>
Caution: This message originated from outside of the Tufts University organization. Please exercise caution when clicking links or opening attachments. When in doubt, email the TTS Service Desk at it@tufts.edu<mailto:it@tufts.edu> or call them directly at 617-627-3376.<br>
<br>
<img alt="Bildschirmfoto 2025-06-12 um 11.32.34.png" src="cid:FF247CB0-3638-47F6-8C3B-BBF9D8C73E5F" width="298">----------- Please Consult the Following Before Posting -----------<br>
TeX FAQ: https://www.tug.org/mactex/faq/index.html<br>
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/TeX/<br>
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx<br>
https://email.esm.psu.edu/pipermail/macosx-tex/<br>
TeX on Mac OS X Website: https://www.tug.org/mactex/index.html<br>
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</body>
</html>