// 2006.11.06 most minimal template // llRezObject("solar_plotter_marker", // llGetPos() + sunV, // <0,0,0>, // ZERO_ROTATION, // PLOTTER_CHANNEL); moveTo(vector p) { while(llGetPos() != p) llSetPos(p); } integer rezSphereSection(vector center,float radius,float thetaStart,float thetaSpan,float omegaStart,float omegaSpan,float brickSize,string brick) { integer brickCount = 0; integer ringCount = (integer)(radius * thetaSpan / brickSize + 0.5); // round upwards float thetaStep = thetaSpan / ringCount; float theta = thetaStart + thetaStep / 2.0; integer i; for(i = 0; i < ringCount; i++) { vector ringCenter = center + <0,0,radius * llSin(theta)>; float ringRadius = radius * llCos(theta); brickCount += rezRingSection(ringCenter,ringRadius,omegaStart,omegaSpan,brickSize,brick); theta += thetaStep; } return brickCount; } integer rezRingSection(vector center,float radius,float omegaStart,float omegaSpan,float brickSize,string brick) { integer brickCount = (integer)(radius * omegaSpan / brickSize + 0.5); // round upwards llSay(0,(string)[brickCount," bricks"]); float omegaStep = omegaSpan / brickCount; float omega = omegaStart + omegaStep / 2.0; integer i; for(i = 0; i < brickCount; i++) { vector brickPos = center + ; moveTo(brickPos); llRezObject(brick,brickPos,<0,0,0>,ZERO_ROTATION,0); omega += omegaStep; } return brickCount; } default { on_rez(integer n) { } state_entry() { } touch_start(integer total_number) { // integer k = rezRingSection(<0,0,0>,5,0,PI,1,"fish"); // llSay(0,(string)["ring took ",k," pieces"]); vector here = llGetPos(); // integer k = rezSphereSection(here,5,0,PI,0,PI/2,1,"blob"); integer k = rezSphereSection(here,25,-PI/2,PI,0,2*PI,3,"blob"); moveTo(here); // back to Origin. llSay(0,(string)["sphere took ",k," pieces"]); } listen(integer channel,string name,key id,string message) { } timer() { } } // end of file