blob11 |
The blob in all its glory:
A rippled button.
Click on the snapshot to download the blob's stl file. |
1; # Prevent Octave from thinking that this is a function # though one is defined here function w = f(x2,y2,z2,c,r,e) x = (x2-c(1))/r(1); y = (y2-c(2))/r(2); z = (z2-c(3))/r(3); zp = z - 0.0032*sin(7*atan2(x,y)).*(x.^2+y.^2).^2; k = 2*pi/7; ph = -0.25*k; # function at origin must be <0, and >0 far enough away. w=0 defines the surface w = ((2*zp-2).^4+(0.2*x.*((zp*0.5).^2+1)).^2+(0.2*y.*((zp*0.5).^2+1)).^2); w = w+(1-((2.5*(x-3*sin(0*k+ph))).^2 + (2.5*(y-3*cos(0*k+ph))).^2))./(1+((2.5*(x-3*sin(0*k+ph))).^2 + (2.5*(y-3*cos(0*k+ph))).^2).^2); w = w+(1-((2.5*(x-3*sin(1*k+ph))).^2 + (2.5*(y-3*cos(1*k+ph))).^2))./(1+((2.5*(x-3*sin(1*k+ph))).^2 + (2.5*(y-3*cos(1*k+ph))).^2).^2); w = w+(1-((2.5*(x-3*sin(2*k+ph))).^2 + (2.5*(y-3*cos(2*k+ph))).^2))./(1+((2.5*(x-3*sin(2*k+ph))).^2 + (2.5*(y-3*cos(2*k+ph))).^2).^2); w = w+(1-((2.5*(x-3*sin(3*k+ph))).^2 + (2.5*(y-3*cos(3*k+ph))).^2))./(1+((2.5*(x-3*sin(3*k+ph))).^2 + (2.5*(y-3*cos(3*k+ph))).^2).^2); w = w+(1-((2.5*(x-3*sin(4*k+ph))).^2 + (2.5*(y-3*cos(4*k+ph))).^2))./(1+((2.5*(x-3*sin(4*k+ph))).^2 + (2.5*(y-3*cos(4*k+ph))).^2).^2); w = w+(1-((2.5*(x-3*sin(5*k+ph))).^2 + (2.5*(y-3*cos(5*k+ph))).^2))./(1+((2.5*(x-3*sin(5*k+ph))).^2 + (2.5*(y-3*cos(5*k+ph))).^2).^2); w = w+(1-((2.5*(x-3*sin(6*k+ph))).^2 + (2.5*(y-3*cos(6*k+ph))).^2))./(1+((2.5*(x-3*sin(6*k+ph))).^2 + (2.5*(y-3*cos(6*k+ph))).^2).^2); w = w- 0.75; endfunction;GNU Octave