% Plots a micelle phase with the Pm3n symmetry. figure(1);clf; % Micelles sitting on the BCC lattice r = 0.25; N = 15; [X,Y,Z] = ellipsoid(0,0,0,r,r,r,N); hold on % Assymmetric micelles sitting on the faces of the lattic. rxy = 0.25; rz = 0.3; [Xe,Ye, Ze]= ellipsoid(0,0,0,rxy,rxy,rz,N); clear handle1 clear handle2 % Plot the BCC micelles. c1=1; for j=0:1;for k=0:1; for l=0:1 handle1(c1)= surf(X+j,Y+k,Z+l); c1=c1+1; end; end;end handle1(c1)= surf(X+0.5,Y+0.5,Z+0.5); c1=c1+1; % Plot the FCC micelles. c2=1; for j=0:1 handle2(c2)= surf(Xe+j, Ye+0.5, Ze+0.5); c2=c2+1; handle2(c2)= surf(Ze+0.5, Xe+j, Ye+0.5); c2=c2+1; handle2(c2)= surf(Ye+0.5, Ze+0.5,Xe+j); c2=c2+1; end % Set the viewing perspective view(20,20); daspect([1,1,1]) camlight headlight lighting gouraud axis off % Set the colour and edge properties of the BCC micelles. for j=1:length(handle1) set(handle1(j),'FaceColor',[1 0.0 0.0]); set(handle1(j),'EdgeColor','none'); end % Set the colour and edge properteis of the FCC micelles. for j=1:length(handle2) set(handle2(j),'FaceColor',[0 0 1]); set(handle2(j),'EdgeColor','none'); end