(conf)
((JaMConformal.bcd) .loadbcd (JaMConformal) .callinit (parametricmapimpl.bcd).loadbcd
% (sirpresspackage.bcd) .loadbcd (cgPressdeviceImpl.bcd) .loadbcd (jampress.bcd) .loadbcd
(cgoutlinesimpl.bcd) .loadbcd
(bx) 0 .def (by) 0 .def
conformal).cvx .def

(white)
(.white).cvx .def
(black)
(.black).cvx .def
(l15gray)(0 0 .1 .hsicolor).cvx .def


(cbox)
(0 0 .cmoveto 0 100 .clineto 100 100 .clineto 100 0 .clineto 0 0 .clineto drawarea).cvx .def

(cpattern)
(.pushdc 
c1pattern
.popdc).cvx .def

(c1pattern)
(white
 0 0 move 0 .9 line 1 .9 line 1 0 line 0 0 line drawarea
black
0 0  move
0 .9 line
.9 .9 line
.9 .2 line
.4 .2 line
.4 .5 line
.6 .5 line
.6 .6 line
.3 .6 line
.3 .1 line
1.0 .1 line
1.0 .0 line
.2 .0 line
.2 .7 line
.7 .7 line
.7 .4 line
.5 .4 line
.5 .3 line
.8 .3 line
.8 .8 line
.1 .8 line
.1 .0 line
drawarea
).cvx .def

(c2pattern)
(0 0 move
0 .6 line
.3 .9 line
.3 .3 line
1.0 .3 line
.7 0 line
drawarea).cvx .def

(c3pattern)
(0 0 move
0 1 line 
.5 1 line
.5 0 line
drawarea).cvx .def

(c4pattern)
(0 .5 move
.5 1 line
1 .5 line
.5 0 line drawarea).cvx .def

(zsx)(.2 .mul).cvx .def
(zsy)(.1428571 .mul).cvx .def

(c5pattern)
(0 zsx 3.5 zsy move
1.5 zsx 5 zsy line
2.5 zsx 4 zsy line
2 zsx 3.5 zsy line
2.5 zsx 3 zsy line
1.5 zsx 2 zsy line
drawarea
1.5 zsx  7 zsy move
3.5 zsx 7 zsy line
5 zsx 5.5 zsy line
4  zsx 4.5 zsy line
drawarea
1.5  zsx 0 zsy move
4  zsx 2.5 zsy line
5 zsx  1.5 zsy line
3.5 zsx  0 zsy line 
drawarea).cvx .def

(c6pattern)
{(!w) .getarc  !aw .div .def
0 0 move 3 1 line 3 .5 line !w .5 line !w -.5 line 3 -.5 line 3 -1 line 0 0 line drawarea
}.cvx .def


(outbox)
((!w) .getarc 20 .div .def
0 -.5 !lw .5 lbox
0 -.5 !w !lw -.5 .add lbox
0 .5 !lw .sub  !w .5 lbox
!w !lw .sub -.5 !w .5 lbox).cvx .def

(!lw) .1 .def
(lbox)
((ury).exch .def
(urx).exch .def
(lly).exch .def
(llx).exch .def
llx lly move llx ury line urx ury line urx lly line llx lly line drawarea).cvx .def


(reg)
((line)(.lineto).load .def
(move)(.moveto) .load .def
(curve)(.curveto) .load .def).cvx .def

(conformal)
((move){.exch bx .add .exch by .add .cmoveto} .cvx .def
(line){.exch bx .add .exch  by .add .clineto} .cvx .def
(curve){3 {6 -2 .roll  by .add .exch bx .add .exch}.cvx .rept .ccurveto}
(drawstroke) {.cdrawstroke}.cvx .def
(drawarea) {.cdrawarea}.cvx .def .cvx .def).cvx .def

(pattern)
((ba) 0 .def
 12 (10 10 200 100 ba ba 30 .add .danulus cpattern (ba) ba 30 .add .def).cvx .rept).cvx .def
 
 (specialborder)
((thick) .exch .def
 (rad) .exch .def
 (ury).exch .def
 (urx).exch .def
(lly).exch .def
 (llx).exch .def
(vstep) ury lly .sub rad 2 .mul .cvr .sub thick .div .dup (vdist) .exch .def .5 .add .cvi .def
(hstep) urx llx .sub rad 2 .mul .cvr .sub thick .div .dup (hdist) .exch .def .5 .add .cvi .def
reg
.pushdc 
llx thick .add lly rad .add .translate 90 .rotate
vdist vstep .cvr .div thick .mul thick .scale vstep {cpattern 1 0 .translate}.cvx .rept 
.popdc
.pushdc 
urx thick .sub ury rad .sub .translate -90 .rotate
vdist vstep .cvr .div  thick .mul thick .scale vstep {cpattern 1 0 .translate}.cvx .rept 
.popdc
.pushdc 
urx rad .sub lly thick .add .translate  180 .rotate
hdist hstep .cvr .div thick .mul thick .scale hstep {cpattern 1 0 .translate}.cvx .rept 
.popdc
.pushdc 
llx rad .add ury thick .sub .translate 
hdist hstep .cvr .div thick .mul thick .scale hstep {cpattern 1 0 .translate}.cvx .rept 
.popdc
conformal
(astep) rad thick 2. .div .sub 3.1415923 .mul 2. .div thick .div .5 .add .cvi  .def
.pushdc
llx rad .add lly rad .add .translate 
astep 1  rad thick 270 180 .canulus
(bx) 0 .def
astep {cpattern (bx) bx 1 .add .def}.cvx .rept 
.popdc
.pushdc
urx rad .sub lly rad .add .translate 
astep 1 rad thick 360 270 .canulus
(bx) 0 .def
astep {cpattern (bx) bx 1 .add .def}.cvx .rept 
.popdc
.pushdc
urx rad .sub ury rad .sub .translate 
astep 1 rad thick 90 0 .canulus
(bx) 0 .def
astep {cpattern (bx) bx 1 .add .def}.cvx .rept 
.popdc
.pushdc
llx rad .add ury rad .sub .translate 
astep 1 rad thick 180 90 .canulus
(bx) 0 .def
astep {cpattern (bx) bx 1 .add .def}.cvx .rept 
.popdc
).cvx .def


(snake)
(.dup (!aw) .exch .def .dup .cubicscale (bx) 0 .def 4 (.touch).cvx .rept .cubicmapper .getarc !aw .div .cvi(c1pattern (bx) bx 1 .add .def).cvx .rept (bx) 0 .def).cvx .def

(qtest)
(100 100 100 650 500 100 500 650 20 20 .cubicscale .cubicmapper
.getarc 20 .div .cvi (c1pattern (bx) bx 1 .add .def).cvx .rept (bx) 0 .def).cvx .def

(tline)
{(bx) 0 .def
(!lw) .exch 2. .div .def
.osize (!ls) .exch .def 
0 !ls {.dup .olink (!ll).exch .def 1 .add 
0 !lw move
!ll !lw line
!ll !lw .neg line
0 !lw .neg line 
0 !lw line drawarea (bx) bx !ll .add .def}.cvx .rept .pop (bx) 0 .def}.cvx .def

 (eline)
 {(!lllw) .exch .def
 1 .sub .touch .newoutline .omoveto {.touch .olineto}.cvx .rept !lllw tline}.cvx .def