Mackay-Icosahedron
This function generates so called Mackay-Icosahedron. In this function it's possible to change distance between atoms (bonding length) number of shells and also composition of two different kinds of atoms
Use following piece of code to visualise the particle:
radius = 1; details = 15;
for i=1:size(X,1)
[X_mesh,Y_mesh,Z_mesh] = ellipsoid(X(i),Y(i),Z(i),radius,radius,radius,details);
s(i) = surface(X_mesh,Y_mesh,Z_mesh);
set(s(i),'EdgeColor','none','Tag',strcat('atom_',int2str(i)));
if(type(i)==1)
set(s(i),'FaceColor','red');
else
set(s(i),'FaceColor','blue');
end
end
axis equal
axis off
light
lighting gouraud
Citar como
Dmitry (2024). Mackay-Icosahedron (https://www.mathworks.com/matlabcentral/fileexchange/27535-mackay-icosahedron), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
- Sciences > Chemistry > Quantum Chemistry >
- Simulink > Block and Blockset Authoring > Author Block Algorithms > Author Blocks Using MATLAB > Author Blocks Using MATLAB Functions > Programming for Code Generation > Function Definition >
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.