(
p1=point();
p2=point pos:[0,0,10];
sp=spring number_of_turns:10;
ctrl = transform_script();
sp.transform.controller=ctrl;
ctrl.addnode "self" sp;
ctrl.addnode "pFrom" p1;
ctrl.addnode "pTo" p2;
/*c=sqrt(a*a+b*b)*/
scr="self.free_spring_height=distance pFrom.pos pTo.pos;\n"
/*lookat*/
scr+="vz0=pFrom.dir; vz=normalize(pTo.pos-pFrom.pos); vc=cross vz vz0; vy=normalize(cross vz vc); vx=normalize(cross vy vz0); matrix3 vx vy vz pFrom.pos";
ctrl.setexpression scr;
)