User Tools

Site Tools


gallery:infinity

HyperFun Gallery: Infinity

VRML 1.0 (1.5 Mb)

my_model(x[3], a[1]){
-- HyperFun "Infinity" model by Hidekazu Yoshida

array center[3], p[3], vertex[3];
center = [0, 0, 0];

-- scaling up by 10
p[1]=x[1]/10; p[2] = x[2]/10; p[3] = x[3]/10;

-- model inside [-1,1] cube
dX = p[1]^2;
dY = p[2]^2;
dZ = p[3]^2;

-- cylinder with z axis
cylz = hfCylinderZ(p,center,0.548);

-- cylinder with x axis
cylx = hfCylinderX(p,center,0.316);

cyl = cylz | cylx;

spcyl = hfSphere(p,center,0.894) | cyl;

-- cylinder with y axis
hole = hfCylinderY(p,center,0.316);
inside = spcyl \ hole;

-- rounded cube
cube = 0.9-dX*dX-dY*dY-dZ*dZ;

-- blend of rounded cube and inside
blend = hfBlendInt(cube,inside,0.8,0.2,0.3);

my_model = blend;

-- Note that the object goes out of the bounding box
-- in x and y directions
-- and the polygonized surface will be not closed
}

Back to HyperFun Gallery

gallery/infinity.txt · Last modified: 2023/12/19 03:07 by 127.0.0.1