Sg2.9
bubbelbubbling an object (new...
Recent RSS
bubbelbubbling an object (new code)
From:  Joel Evey
Date:  30. July 2006, 21:58

not the cleanest, but this allows you to use the bubbelbbubbling code on a pre-made path.


        var size = 50;
        var radius = 100;
        var dichte = 10;



    values = Dialog.prompt("graffmaster:", [
        { value: size, description: "size", width: 20 },
        { value: radius, description: "radius", width: 30 },
        { value: dichte, description: "dichte", width: 20 }
	]);
    if (values != null) {
        size = values[0];
        radius = values[1];
        dichte = values[2];
    }


res = new Path();
var art = activeDocument.getSelectedItems()[0];

		art.curvesToPoints(2, 10000);
		var count = art.curves.length;
        for (var i = 0; i < count; i++) {
            var bezier = art.curves[i];
            var pt = bezier.getPoint(0);
            var n = bezier.getNormal(1);
            if (n.x != 0 || n.y != 0) {
        var degree = Math.random() * 360;
        var rad = radius * Math.random();
        var xPt = pt.x + rad * Math.sin(degree * Math.PI / 180);
        var yPt = pt.y + rad * Math.cos(degree * Math.PI / 180);
        var newSize = size * Math.random() ;
        rect = new Rectangle(0, 0, newSize, newSize);
        rect.center = new Point(xPt, yPt);
        activeDocument.createOval(rect);
            }
        }
	
art.remove();

let me know if you make updates to the code.

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
Convert GPS .csv files to Illustrator paths 28.12.11