User Tools

Site Tools


gallery:toy

HyperFun Gallery: Toy

VRML 2.0 (0.3 Mb)

my_model(x[3],a[1]){
-- HyperFun model of a toy, student work, MEPhI (Russia)

array p[3], center[3];
center = [0,0,0];
-- scaling up by 8
p[1] = x[1]/8;
p[2] = x[2]/8;
p[3] = x[3]/8;

-- Hull
hull = hfSphere(p,center,0.4);

-- Tail
center = [0,0.18,-0.3];
tail = hfEllipsoid(p,center,0.18,0.15,0.50) \ p[3];

-- Floats
center = [0.2,-0.3,0];
float1 = hfEllipsoid(p,center,0.15,0.15,0.5);
center = [-0.2,-0.3,0];
float2 = hfEllipsoid(p,center,0.15,0.15,0.5);

-- Stabilizer and wings
center = [0,0.2,-0.7];
stab = hfEllCylX(p,center,0.05,0.12) & (p[1]+0.4) & (-p[1]+0.4);
center = [0,0.16,0];
wings = hfEllCylX(p,center,0.05,0.14) & (p[1]+0.7) & (-p[1]+0.7);

-- Propeller
center = [0,0.4,0];
prop1 = hfEllCylZ(p,center,0.08,0.04);
center = [0,0.4,0];
prop2 = hfEllCylX(p,center,0.04,0.08);
center = [0,0,0];
prop = (prop1 | prop2) & hfEllCylY(p,center,0.6,0.7);
axle = hfEllCylY(p,center,0.05,0.05) & (-p[2]+0.5) & p[2];

-- eyes
center = [-0.16,0,0.36];
eye1 = hfSphere(p,center,0.08);
center =[0.16,0,0.36];
eye2 = hfSphere(p,center,0.08);

my_model = hull | tail | float1 | float2 | stab | wings | prop | axle | eye1 | eye2;
}

Back to HyperFun Gallery

gallery/toy.txt ยท Last modified: 2020/12/31 10:49 (external edit)