Mickey

From openEMS

Jump to: navigation, search

This structure was created by combining several scaled spheres, cylinders, and a polyhedron

% materials
CSX = AddMaterial( CSX, 'Air' );
CSX = SetMaterialProperty( CSX, 'Air', 'Epsilon', 1, 'Mue', 1 );
CSX = AddMetal(CSX,'metal'); %create PEC with propName 'metal'

% face
CSX = AddSphere(CSX,'metal',1,[0 0 0],150, 'Transform',{'Scale', '2,2,1'});

% ears
CSX = AddSphere(CSX,'metal',1,[sqrt(0.7*150^2) sqrt(0.7*150^2) 0],50, 'Transform',{'Scale', '2,2,1'});
CSX = AddSphere(CSX,'metal',1,[-sqrt(0.7*150^2) sqrt(0.7*150^2) 0],50, 'Transform',{'Scale', '2,2,1'});

%nose
CSX = AddBox(CSX,'Air',2,[-20 -40 -160],[20 40 160]);

% eyes
CSX = AddCylinder(CSX, 'Air',2,[-sqrt(0.3*150^2) sqrt(0.3*150^2) -150],[-sqrt(0.3*150^2) sqrt(0.3*150^2) 150],30);
CSX = AddCylinder(CSX, 'Air',2,[sqrt(0.3*150^2) sqrt(0.3*150^2) -150],[sqrt(0.3*150^2) sqrt(0.3*150^2) 150],30);

% hair
points=zeros(3,3);
points(:,1) = [0 290 0];
points(:,2) = [0 330 0];
points(:,3) = [20 360 50];
for i=-3:3
    CSX = AddWire(CSX,'metal',10, points, 5,'Transform',{'Rotate_Z',i*pi/25});
end

% mouth
vertices{1} = [-150 -100 150];
vertices{2} = [0 -150 150];
vertices{3} = [150 -100 150];
vertices{4} = [0 -200 150];
vertices{5} = [-150 -100 -150];
vertices{6} = [0 -150 -150];
vertices{7} = [150 -100 -150];
vertices{8} = [0 -200 -150];

faces{1}=[1 2 3 0];
faces{2}=[4 7 3 0];
faces{3}=[4 5 1 0];
faces{4}=[6 7 3 2];
faces{5}=[1 5 6 2];
faces{6}=[7 6 5 4];

CSX = AddPolyhedron(CSX, 'Air', 0, vertices, faces);

Image:Face.png

Retrieved from "index.php/Mickey"