Greetings everyone,

Do any of you have experience with creating ornamented page borders?
I have looked through the mailing list[^1] and through both mom's and
utmac's
documentation but I couldn't find exactly what I have in mind.

I have attached a pdf document, together with its pic(1) source code,
to illustrate exactly what I am going for.

I also tried looking through cstr54 and UTP to maybe figure out how I might
do
that myself with pure troff requests, but I gave up after a while, since I'm
still a bit of a neophyte here . . .

Also, does anyone perhaps have/host a collection of pic decorations one
might
browse and/or add to? I don't even know if using pic for that is standard
o.o

Kind Regards,
Emilia
---
[^1]: https://lists.gnu.org/r/groff/2022-09/msg00088.html

Attachment: orn.pdf
Description: Adobe PDF document

.PS

define orn { [
	# Variables
	sideLength = $1/2;
	cupRad = $1/10;
	petalRad = $1/16.6;
	cornerRad = $1/20;
	splineLength = sideLength/5;
	splineTravel = splineLength * 2;
	rodLength = splineTravel;
	danglyFstRad = sideLength / 10;
	danglySndRad = danglyFstRad/2;
	danglyTrdRad = danglySndRad/2;

	Diamond: [
		NE: line down sideLength right sideLength;
		SE: line down sideLength left sideLength;
		SW: line up sideLength left sideLength;
		NW: line up sideLength right sideLength;
	];

	# Flower in the middle (Cup & Petals)
	Cup: circle rad cupRad at Diamond;
	circle rad petalRad with .s at Cup.n;
	circle rad petalRad with .sw at Cup.ne;
	circle rad petalRad with .w at Cup.e;
	circle rad petalRad with .nw at Cup.se;
	circle rad petalRad with .n at Cup.s;
	circle rad petalRad with .ne at Cup.sw;
	circle rad petalRad with .e at Cup.w;
	circle rad petalRad with .se at Cup.nw;

	# Corner Circles
	N: circle rad cornerRad at Diamond.NE.start;
	E: circle rad cornerRad at Diamond.SE.start;
	W: circle rad cornerRad at Diamond.SW.start;
	S: circle rad cornerRad at Diamond.NW.start;

	# Side splines
	move to N down splineTravel left splineTravel;
	spline left splineLength then down splineLength;
	move to N down splineTravel right splineTravel;
	spline right splineLength then down splineLength;
	move to W up splineTravel right splineTravel;
	spline right splineLength then up splineLength;
	move to W up splineTravel left splineTravel;
	spline left splineLength then up splineLength;

	# Side dangly bits
	Lnw: line up rodLength left rodLength at Diamond.NW.center;
	arc rad danglyFstRad from Lnw.end; arc rad danglySndRad; arc rad danglyTrdRad;
	arc cw rad danglyFstRad from Lnw.end; arc cw rad danglySndRad; arc cw rad danglyTrdRad;
	Lsw: line down rodLength left rodLength at Diamond.SW.center;
	arc cw rad danglyFstRad; arc cw rad danglySndRad; arc cw rad danglyTrdRad;
	arc rad danglyFstRad from Lsw.end; arc rad danglySndRad; arc rad danglyTrdRad;
	Lne: line up rodLength right rodLength at Diamond.NE.center;
	arc cw rad danglyFstRad; arc cw rad danglySndRad; arc cw rad danglyTrdRad;
	arc rad danglyFstRad from Lne.end; arc rad danglySndRad; arc rad danglyTrdRad;
	Lse: line down rodLength right rodLength at Diamond.SE.center;
	arc rad danglyFstRad; arc rad danglySndRad; arc rad danglyTrdRad;
	arc cw rad danglyFstRad from Lse.end; arc cw rad danglySndRad; arc cw rad danglyTrdRad;
] }

size = 0.3
for i = 0 to 21 by 1 do { orn(size); move to last [] down size; }
for i = 0 to 12 by 1 do { orn(size); move to last [] right size; }
for i = 0 to 21 by 1 do { orn(size); move to last [] up size; }
for i = 0 to 12 by 1 do { orn(size); move to last [] left size; }

.PE

Reply via email to