Home > matGeom > meshes3d > createRhombododecahedron.m

createRhombododecahedron

PURPOSE ^

CREATERHOMBODODECAHEDRON Create a 3D mesh representing a rhombododecahedron.

SYNOPSIS ^

function varargout = createRhombododecahedron()

DESCRIPTION ^

CREATERHOMBODODECAHEDRON Create a 3D mesh representing a rhombododecahedron.

   [V, E, F] = createRhombododecahedron
   V is a 14-by-3 array with vertex coordinate, 
   E is a 12-by-2 array containing indices of neighbour vertices,
   F is a 8-by-3 array containing vertices array of each face.

   [V, F] = createRhombododecahedron;
   Returns only the vertices and the face vertex indices.

   MESH = createRhombododecahedron;
   Returns the data as a mesh structure, with fields 'vertices', 'edges'
   and 'faces'.

   Example
   [v, e, f] = createRhombododecahedron;
   drawMesh(v, f);


   See also
   meshes3d, drawMesh

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function varargout = createRhombododecahedron()
0002 %CREATERHOMBODODECAHEDRON Create a 3D mesh representing a rhombododecahedron.
0003 %
0004 %   [V, E, F] = createRhombododecahedron
0005 %   V is a 14-by-3 array with vertex coordinate,
0006 %   E is a 12-by-2 array containing indices of neighbour vertices,
0007 %   F is a 8-by-3 array containing vertices array of each face.
0008 %
0009 %   [V, F] = createRhombododecahedron;
0010 %   Returns only the vertices and the face vertex indices.
0011 %
0012 %   MESH = createRhombododecahedron;
0013 %   Returns the data as a mesh structure, with fields 'vertices', 'edges'
0014 %   and 'faces'.
0015 %
0016 %   Example
0017 %   [v, e, f] = createRhombododecahedron;
0018 %   drawMesh(v, f);
0019 %
0020 %
0021 %   See also
0022 %   meshes3d, drawMesh
0023 
0024 %   ---------
0025 %   author : David Legland
0026 %   e-mail: david.legland@inra.fr
0027 %   INRA - TPV URPOI - BIA IMASTE
0028 %   created the 10/02/2005.
0029 %
0030 
0031 %   HISTORY
0032 %   04/01/2007: remove unused variables
0033 
0034 nodes = [0 0 2;...
0035     1 -1 1;1 1 1;-1 1 1;-1 -1 1;...
0036     2 0 0;0 2 0;-2 0 0;0 -2 0;...
0037     1 -1 -1;1 1 -1;-1 1 -1;-1 -1 -1;...
0038     0 0 -2];
0039 
0040 edges = [...
0041     1 2;1 3;1 4;1 5;...
0042     2 6;2 9;3 6;3 7;4 7;4 8;5 8;5 9;...
0043     6 10;6 11;7 11;7 12;8 12;8 13;9 10;9 13; ...
0044     10 14;11 14;12 14;13 14];
0045 
0046 faces = [...
0047     1 2 6 3;...
0048     1 3 7 4;...
0049     1 4 8 5;...
0050     1 5 9 2;...
0051     2 9 10 6;...
0052     3 6 11 7;...
0053     4 7 12 8;...
0054     5 8 13 9;...
0055     6 10 14 11;...
0056     7 11 14 12;...
0057     8 12 14 13;...
0058     9 13 14 10];
0059     
0060 % format output
0061 varargout = formatMeshOutput(nargout, nodes, edges, faces);
0062

Generated on Wed 16-Feb-2022 15:10:47 by m2html © 2003-2019