// This is a tool macro similar to the spray can tool in NIH Image. // Double-click on the tool icon to set the spray width, dot size // and flow rate. var sprayCanWidth=75, sprayCanDotSize=1, sprayCanRate=6; macro 'Spray Can Tool-C037D20D22D24D41D43D62D82Da2L93b3D84Dc4L75d5L757f Ld5dfLa7d7LabdbLa9d9LacdcLa7ac' { setLineWidth(sprayCanDotSize); radius=sprayCanWidth/2; radius2=radius*radius; start = getTime(); autoUpdate(false); n = 5*exp(0.9*(10-sprayCanRate)); if (n<=5) n = 0; while (true) { getCursorLoc(x, y, z, flags); if (flags&16==0) exit(); x2 = (random()-0.5)*sprayCanWidth; y2 = (random()-0.5)*sprayCanWidth; if (x2*x2+y2*y2start+50) { updateDisplay(); start = getTime(); } } for (i=0; i10) sprayCanRate = 10; }