Snap transforms on grouped groups

Lets fiddle with Snap matrices on groups.
Useful Matrix links w3.org svg coords and matrix


var s = Snap("#svgout");

var r0 = s.rect(150,150,100,100,20,20).attr({ fill: "orange", opacity: "0.8", stroke: "black", strokeWidth: "2" });
var c0 = s.circle(225,225,10).attr({ fill: "silver", stroke: "black" });
var g0 = s.group( r0,c0 );
g0.animate({ 'transform' : 'r360,225,225' },4000);
g0.drag();


var r1 = s.rect(100,100,100,100,20,20).attr({ fill: "red", opacity: "0.8", stroke: "black", strokeWidth: "2" });
var c1 = s.circle(175,175,10).attr({ fill: "silver", stroke: "black" });
var g1 = s.group( r1,c1 );
g1.appendTo( g0 );
g1.animate({ 'transform' : 'r360,175,175' },4000);


var r2 = s.rect(50,50,100,100,20,20).attr({ fill: "blue", opacity: "0.8", stroke: "black", strokeWidth: "2" });
var c2 = s.circle(125,125,10).attr({ fill: "silver", stroke: "black" });
var g2 = s.group(r2,c2);

g2.appendTo( g1 );
g2.animate( { 'transform' : 'r360,125,125' },4000);


var r3 = s.rect(0,0,100,100,20,20).attr({ fill: "yellow", opacity: "0.8", stroke: "black", strokeWidth: "2" });
var c3 = s.circle(75,75,10).attr({ fill: "silver", stroke: "black" });
var g3 = s.group(r3,c3);

g3.appendTo( g2 );
g3.animate( { 'transform' : 'r360,75,75' },4000);

var r4 = s.rect(-50,-50,100,100,20,20).attr({ fill: "green", opacity: "0.8", stroke: "black", strokeWidth: "2" });
var c4 = s.circle(25,25,10).attr({ fill: "silver", stroke: "black" });
var g4 = s.group(r4,c4);
g4.appendTo( g3 );
g4.animate( { 'transform' : 'r360,25,25' },4000);
   


        
The actual svg markup looks like this (when you've clicked on run)....