Blob Farm

blob63

The blob in all its glory:

Twirl with your mouse

Another take at a spaceship hull. It is made by combining three ellipsoids and doing a bit of spherical inversion to keep things interesting.

Click on the snapshot to download the blob's stl file. ../snapshots/blob63.png
Octave Code:
  # name of the blob
  project = "blob63";  
   
   # function at origin must be <0, and >0 far enough away.  w=0 defines the surface
function w = f(x2,y2,z2,c,r)  # three lobed toroid with low profile bumps and flat top
   x = (x2-c(1))/r(1);
   y = (y2-c(2))/r(2);
   z = (z2-c(3))/r(3);

    w =  0.255721E0.*((-0.526056E4)+0.561298E-13.*y+0.16161E4.*y.^2+ ...
0.305921E-14.*y.^3+(-0.160852E3).*y.^4+0.511052E1.*y.^6+ ...
0.368851E4.*x+(-0.79617E3).*y.^2.*x+(-0.176117E-14).*y.^3.*x+ ...
0.329613E2.*y.^4.*x+0.106268E4.*x.^2+(-0.138229E-12).*y.*x.^2+( ...
-0.170336E3).*y.^2.*x.^2+(-0.76939E-14).*y.^3.*x.^2+0.1458E2.* ...
y.^4.*x.^2+(-0.145112E4).*x.^3+0.867426E-13.*y.*x.^3+0.614442E2.* ...
  y.^2.*x.^3+0.192309E-14.*y.^3.*x.^3+0.515008E3.*x.^4+0.31772E1.* ...
  y.^2.*x.^4+(-0.836529E2).*x.^5+0.586173E1.*x.^6+0.393914E4.*z.^2+( ...
  -0.119903E-13).*y.*z.^2+(-0.71496E3).*y.^2.*z.^2+0.208198E-14.* ...
  y.^3.*z.^2+0.462461E2.*y.^4.*z.^2+(-0.327856E4).*x.*z.^2+( ...
-0.126019E-14).*y.*x.*z.^2+0.140416E3.*y.^2.*x.*z.^2+ ...
0.315048E-15.*y.^3.*x.*z.^2+0.163139E4.*x.^2.*z.^2+0.513302E2.* ...
y.^2.*x.^2.*z.^2+(-0.370421E3).*x.^3.*z.^2+0.387234E2.*x.^4.*z.^2+ ...
  0.106333E4.*z.^4+0.994194E2.*y.^2.*z.^4+(-0.409955E3).*x.*z.^4+ ...
  0.852607E2.*x.^2.*z.^4+0.625681E2.*z.^6);

  endfunction;

  # 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 =425;  # center of sphere is at (R+X0,0,0) with radius R (passing through (X0,0,0) ) 
    X0 = 60; # 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;

  c_outer = [0,0,0];
  r_outer = [50,50,50];

  step = 4;  # grid pitch in mm  start with 4mm to see the shape quickly.  Once you have it just right, change to 2mm for printing

 xmin = 0;  # avoid the origin because the inverse of the gradient is NaN there
 xmax = 250;

 ymin = -210;
 ymax = 210;
 zmin = -100;
 zmax = 100;

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