Blob Farm

blob71

The blob in all its glory:

Twirl with your mouse

Aimed at being a case, maybe some sort of game controller.

Click on the snapshot to download the blob's stl file. ../snapshots/blob71.png
Octave Code:
  # name of the blob
  project = "blob71"; 
   
  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);
   # function at origin must be <0, and >0 far enough away.  w=0 defines the surface
   k2 = 2.5; # for sizing inner swelling
   nb = 3; # number of knobs
   th = atan2(x,y);
   r  = sqrt(x.^2+y.^2);
   w  = ((0.5*sin(nb*th)-0.75).^2 + z.^2 + (r-5).^2).*((x/k2).^2+(y/k2).^2+((z-0.5)/1.3).^4-1)-3.5 ;  
   endfunction;

  # do the scaling
  c_outer = [0,0,0];
  r_outer = [15,15,15]; 

  # this is for distorting the grid before applying the function
  # note that the undistorted grid will be used to make the stl file
  # just set it to x3=x; y3=y; z3=z; if no warping is needed.
  function [x3,y3,z3]= prewarp(x,y,z)
    R =700;  # center of sphere is at (R+X0,0,0) with radius R (passing through (X0,0,0) ) 
    X0 = 0; # this means that parts of the blob near [X0,0,0] will stay near that point.
    # calculate the inverted coordinate of each point in the 3D grid (x3,y3,z3)
    x2 = x-R-X0;  y2=y;   z2 = z; # intermediate values
    r2 = R*R./(x2.^2+y2.^2+z2.^2);
    x3 = x2.*r2+R+X0;  y3 = y2.*r2;  z3 = z2.*r2; 
  endfunction;

  source("../octave/func2stl_v01.m");  # do all the calculations
GNU Octave