global proc makeRock4() { polySphere; string $lname[] = `lattice -divisions 2 5 2 -objectCentered true`; float $x = rand(1.0, 3.0); float $y = rand(1.0, 3.0); float $z = rand(1.0, 3.0); scale $x $y $z; string $points[] = `filterExpand -selectionMask 46 ($lname[1] + ".pt[0:1][0:4][0:1]")`; for($obj in $points) { $x = rand(-0.6, 0.6); $y = rand(-0.6, 0.6); $z = rand(-0.6, 0.6); select -r $obj; move -r $x $y $z; } }