(MousePad.Jam
) .print

(black) -1 .def
(white) 0 .def
(replace) 1 .def
(screenwidth) 608 .def
(screenheight) 808 .def
(xorigin) 304 .def
(yorigin) 404 .def
(fullscreenwidth) screenwidth screenwidth .mul screenheight screenheight .mul .add 0.5 .exp 1 .add .cvi .def
(converttopoints) 72.0 25400.0 .div .def
(cos30) 30 .cos .def

(clearscreen) 
(
setwhite
.drawscreenarea
setblack
) .cvx .def

(setblack)
(
black .texture
0 0 0 .color
) .cvx .def

(setwhite)
(
white .texture
0 0 255 .color
) .cvx .def

(test)
(
clearscreen
200 200 400 400 .drawboxarea
) .cvx .def

(mousepad)
(
(dotsize) .exch .def
(dotcenters) .exch .def
(linepitch) dotcenters cos30 .mul .def
(linespace) dotsize converttopoints .mul .def
(halfspace) linespace 2 .div .def
(linewidth) linepitch dotsize .sub converttopoints .mul .def
(halfwidth) linewidth 2 .div .def
(linepitch) linespace linewidth .add .def
(offset) linepitch 2 .div .def
.pushdc
xorigin yorigin .translate
clearscreen
90 .rotate
drawscreen
.pushdc
60 .rotate
drawscreen
.popdc
.pushdc
60 .neg .rotate
drawscreen
.popdc
.popdc
) .cvx .def

(drawscreen)
(
(lines) fullscreenwidth linepitch .div .cvi .def
(lines) lines 2 .div .cvi 2 .mul .cvi .def
(lines2) lines 2 .div .cvi .def
(width) fullscreenwidth 2 .div .cvi .def
lines2 1 .add .neg 1 lines2 (drawline) .cvx .for
) .cvx .def

(drawline)
(
(lineno) .exch .def
(xll) width .neg .def
(yll) linepitch lineno .mul halfwidth .sub offset .add .def
(xur) width .def
(yur) linepitch lineno .mul halfwidth .add offset .add .def
xll yll xur yur .drawboxarea
) .cvx .def

replace .paint
(
).print