├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── algebra ├── compute_adjacency_matrix.m ├── compute_bc.m ├── compute_bd.m ├── compute_connectivity.m ├── compute_dual_graph.m ├── compute_edge.m ├── compute_face_ring.m ├── compute_halfedge.m ├── compute_vertex_face_ring.m ├── compute_vertex_ring.m ├── face_area.m ├── generalized_laplacian.m ├── laplace_beltrami.m ├── linear_beltrami_solver.m └── vertex_area.m ├── contents.m ├── data ├── bunny.obj ├── bunny.off ├── cube.ply ├── eight.hole.off ├── eight.off ├── eight.open.off ├── face.obj ├── face.off ├── kitten.nf20k.off ├── kitten.nv40k.off ├── knot.obj ├── maxplanck.nf25k.off ├── sphere.off └── torus.off ├── graphics ├── plot_mesh.m └── plot_path.m ├── io ├── read_obj.m ├── read_off.m ├── read_ply.m ├── write_obj.m ├── write_off.m └── write_ply.m ├── misc ├── csc_to_sparse.m ├── csr_to_sparse.m ├── sparse_to_csc.m └── sparse_to_csr.m ├── parameterization ├── disk_harmonic_map.m ├── rect_harmonic_map.m └── spherical_conformal_map.m ├── template.m ├── topology ├── clean_mesh.m ├── compute_greedy_homotopy_basis.m ├── compute_homology_basis.m ├── cut_graph.m ├── dijkstra.m ├── minimum_spanning_tree.m ├── remove_mesh_face.m ├── remove_mesh_vertex.m └── slice_mesh.m └── tutorial ├── tutorial0.m ├── tutorial1.m └── tutorial2.m /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | 46 | [Dd]ebug/ 47 | [Rr]elease/ 48 | x64/ 49 | build/ 50 | [Bb]in/ 51 | [Oo]bj/ 52 | 53 | # MSTest test Results 54 | [Tt]est[Rr]esult*/ 55 | [Bb]uild[Ll]og.* 56 | 57 | *_i.c 58 | *_p.c 59 | *.ilk 60 | *.meta 61 | *.pch 62 | *.pdb 63 | *.pgc 64 | *.pgd 65 | *.rsp 66 | *.sbr 67 | *.tlb 68 | *.tli 69 | *.tlh 70 | *.tmp 71 | *.tmp_proj 72 | *.log 73 | *.vspscc 74 | *.vssscc 75 | .builds 76 | *.pidb 77 | *.log 78 | *.scc 79 | 80 | # Visual C++ cache files 81 | ipch/ 82 | *.aps 83 | *.ncb 84 | *.opensdf 85 | *.sdf 86 | *.cachefile 87 | 88 | # Visual Studio profiler 89 | *.psess 90 | *.vsp 91 | *.vspx 92 | 93 | # Guidance Automation Toolkit 94 | *.gpState 95 | 96 | # ReSharper is a .NET coding add-in 97 | _ReSharper*/ 98 | *.[Rr]e[Ss]harper 99 | 100 | # TeamCity is a build add-in 101 | _TeamCity* 102 | 103 | # DotCover is a Code Coverage Tool 104 | *.dotCover 105 | 106 | # NCrunch 107 | *.ncrunch* 108 | .*crunch*.local.xml 109 | 110 | # Installshield output folder 111 | [Ee]xpress/ 112 | 113 | # DocProject is a documentation generator add-in 114 | DocProject/buildhelp/ 115 | DocProject/Help/*.HxT 116 | DocProject/Help/*.HxC 117 | DocProject/Help/*.hhc 118 | DocProject/Help/*.hhk 119 | DocProject/Help/*.hhp 120 | DocProject/Help/Html2 121 | DocProject/Help/html 122 | 123 | # Click-Once directory 124 | publish/ 125 | 126 | # Publish Web Output 127 | *.Publish.xml 128 | *.pubxml 129 | 130 | # NuGet Packages Directory 131 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 132 | #packages/ 133 | 134 | # Windows Azure Build Output 135 | csx 136 | *.build.csdef 137 | 138 | # Windows Store app package directory 139 | AppPackages/ 140 | 141 | # Others 142 | sql/ 143 | *.Cache 144 | ClientBin/ 145 | [Ss]tyle[Cc]op.* 146 | ~$* 147 | *~ 148 | *.dbmdl 149 | *.[Pp]ublish.xml 150 | *.pfx 151 | *.publishsettings 152 | 153 | # RIA/Silverlight projects 154 | Generated_Code/ 155 | 156 | # Backup & report files from converting an old project file to a newer 157 | # Visual Studio version. Backup files are not needed, because we have git ;-) 158 | _UpgradeReport_Files/ 159 | Backup*/ 160 | UpgradeLog*.XML 161 | UpgradeLog*.htm 162 | 163 | # SQL Server files 164 | App_Data/*.mdf 165 | App_Data/*.ldf 166 | 167 | ############# 168 | ## Windows detritus 169 | ############# 170 | 171 | # Windows image file caches 172 | Thumbs.db 173 | ehthumbs.db 174 | 175 | # Folder config file 176 | Desktop.ini 177 | 178 | # Recycle Bin used on file shares 179 | $RECYCLE.BIN/ 180 | 181 | # Mac crap 182 | .DS_Store 183 | 184 | 185 | ############# 186 | ## Python 187 | ############# 188 | 189 | *.py[co] 190 | 191 | # Packages 192 | *.egg 193 | *.egg-info 194 | dist/ 195 | build/ 196 | eggs/ 197 | parts/ 198 | var/ 199 | sdist/ 200 | develop-eggs/ 201 | .installed.cfg 202 | 203 | # Installer logs 204 | pip-log.txt 205 | 206 | # Unit test / coverage reports 207 | .coverage 208 | .tox 209 | 210 | #Translations 211 | *.mo 212 | 213 | #Mr Developer 214 | .mr.developer.cfg 215 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Geometry Processing Package is available under the MIT license 2 | 3 | Copyright (c) 2014 The Chinese University of Hong Kong 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Geometry Processing Package 2 | =========================== 3 | 4 | ## algebra 5 | 6 | | Function | Description | 7 | | :--------| :---------- | 8 | | compute_adjacency\_matrix.m | - compute adjacency matrix 9 | | compute_bd.m | - find boundary 10 | | compute_connectivity.m | - find connectivity information| 11 | | compute_dual\_graph.m | - compute dual graph of mesh| 12 | | compute_edge.m | - find edges| 13 | | compute_face\_ring.m | - find face ring of all face| 14 | | compute_halfedge.m | - find halfedges| 15 | | compute_vertex\_face\_ring.m| - find face ring of all vertex| 16 | | compute_vertex\_ring.m | - find vertex ring of all/any vertex| 17 | | face_area.m | - compute all face area| 18 | | generalized_laplacian.m | - discretize generalized laplace operator on mesh| 19 | | gradient.m | - discretize gradient operator on mesh| 20 | | laplace_beltrami.m | - discretize Laplace Beltrami on mesh| 21 | | vertex_area.m | - compute vertex area| 22 | 23 | ## graphics 24 | 25 | | Function | Description | 26 | | :------- | :---------- | 27 | | plot_mesh.m | - plot mesh| 28 | | plot_path.m | - plot path on mesh| 29 | 30 | ## io 31 | 32 | | Function | Description | 33 | | :------- | :---------- | 34 | | read_obj.m | - read mesh data from obj file| 35 | | read_off.m | - read mesh data from off file| 36 | | read_ply.m | - read mesh data from ply file| 37 | | write_obj.m | - write mesh data to obj file| 38 | | write_off.m | - write mesh data to off file| 39 | | write_ply.m | - write mesh data to ply file| 40 | 41 | ## misc 42 | 43 | | Function | Description | 44 | | :------- | :---------- | 45 | | sparse_to_csc.m | - convert sparse matrix to csc format| 46 | | sparse_to_csr.m | - convert sparse matrix to csr format| 47 | | csc_to_sparse.m | - convert csc format to sparse matrix| 48 | | csr_to_sparse.m | - convert csr format to sparse matrix| 49 | 50 | ## parameterization 51 | 52 | | Function | Description | 53 | | -------- | ----------- | 54 | | disk_harmonic_map.m | - harmonic map from surface to unit disk| 55 | | rect_harmonic_map.m | - harmonic map from surface to unit square| 56 | | spherical_conformal_map.m | - spherical conformal map from genus zero surface to unit sphere| 57 | 58 | ## topology 59 | 60 | | Function | Description | 61 | | :------- | :---------- | 62 | | clean_mesh.m | - clean mesh by removing unreferenced vertex| 63 | | compute_greedy_homotopy_basis.m | - compute a basis of homotopy group| 64 | | compute_homology_basis.m | - compute a basis of homology group| 65 | | cut_graph.m | - find a cut graph of mesh| 66 | | dijkstra.m | - dijkstra shortest path algorithm| 67 | | minimum_spanning_tree.m | - Prim's minimum spanning tree algorithm| 68 | | slice_mesh.m | - slice mesh open along a collection of edges| 69 | 70 | ## tutorial 71 | 72 | | Function | Description | 73 | | :------- | :---------- | 74 | | tutorial0 | - a quick start tutorial| 75 | | tutorial1 | - a tutorial brings you go through the package| 76 | | tutorial2 | - a tutorial brings you go through the advanced functions of the package| 77 | -------------------------------------------------------------------------------- /algebra/compute_adjacency_matrix.m: -------------------------------------------------------------------------------- 1 | %% compute_adjacency_matrix 2 | % Compute adjacency matrix of triangle mesh, only connectivity needed. 3 | % 4 | % Both undirected and directed adjacency matrix computed, stored with 5 | % sparse matrix. For undirected one (am), am(i,j) has value 2, indicating 6 | % an adjacency between vertex i and vertex j. For directed one (amd), 7 | % amd(i,j) stores a face index, indicating which face the halfedge (i,j) 8 | % lies in. 9 | % 10 | % So am stores the information of edge, while amd stores the information 11 | % of half edge. 12 | % 13 | %% Syntax 14 | % [am,amd] = compute_adjacency_matrix(face); 15 | % 16 | %% Description 17 | % face: double array, nf x 3, connectivity of mesh 18 | % 19 | % am : sparse matrix, nv x nv, undirected adjacency matrix 20 | % amd: sparse matrix, nv x nv, directed adjacency matrix 21 | % 22 | %% Contribution 23 | % Author : Wen Cheng Feng 24 | % Created: 2014/03/03 25 | % Revised: 2014/03/14 by Wen, add doc 26 | % Revised: 2014/03/23 by Wen, remove example 27 | % 28 | % Copyright 2014 Computational Geometry Group 29 | % Department of Mathematics, CUHK 30 | % http://www.math.cuhk.edu.hk/~lmlui 31 | 32 | function [am,amd] = compute_adjacency_matrix(face) 33 | nf = size(face,1); 34 | I = reshape(face',nf*3,1); 35 | J = reshape(face(:,[2 3 1])',nf*3,1); 36 | V = reshape(repmat(1:nf,[3,1]),nf*3,1); 37 | amd = sparse(I,J,V); 38 | % V(:) = 1; 39 | % am = sparse([I;J],[J;I],[V;V]); 40 | am = spones(amd); 41 | am = am+am'; 42 | -------------------------------------------------------------------------------- /algebra/compute_bc.m: -------------------------------------------------------------------------------- 1 | %% compute bc 2 | % Compute Beltrami coefficients mu of mapping from uv to vertex, where vertex 3 | % can be 2D or 3D. 4 | % 5 | % mu from 2D to 2D is defined by the Beltrami equation: 6 | % 7 | % \[ \frac{\partial{f}}{\partial{\bar{z}}} = \mu \frac{\partial{f}}{\partial{z}} \] 8 | % 9 | % mu from 2D to 3D is defined by: 10 | % 11 | % \[ \mu = \frac{E-G +2iF}{E+G +2\sqrt{EG-F^2}} \] 12 | % 13 | % where \( ds^2=Edx^2+2Fdxdy+Gdy^2 \) is metric. 14 | % 15 | %% Syntax 16 | % mu = compute_bc(face,uv,vertex) 17 | % 18 | %% Description 19 | % face : double array, nf x 3, connectivity of mesh 20 | % uv : double array, nv x 2, uv coordinate of mesh 21 | % vertex: double array, nv x 2 or nv x 3, target surface coordinates 22 | % 23 | % mu: complex array, nf x 1, beltrami coefficient on all faces 24 | % 25 | %% Contribution 26 | % Author : Wen Cheng Feng 27 | % Created: 2014/03/27 28 | % Revised: 2014/03/28 by Wen, add doc 29 | % 30 | % Copyright 2014 Computational Geometry Group 31 | % Department of Mathematics, CUHK 32 | % http://www.math.cuhk.edu.hk/~lmlui 33 | 34 | function mu = compute_bc(face,uv,vertex) 35 | nf = size(face,1); 36 | fa = face_area(face,uv); 37 | Duv = (uv(face(:,[3 1 2]),:) - uv(face(:,[2 3 1]),:)); 38 | Duv(:,1) = Duv(:,1)./[fa;fa;fa]/2; 39 | Duv(:,2) = Duv(:,2)./[fa;fa;fa]/2; 40 | 41 | switch size(vertex,2) 42 | case 2 43 | z = complex(vertex(:,1), vertex(:,2)); 44 | Dcz = sum(reshape((Duv(:,2)-1i*Duv(:,1)).*z(face,:),nf,3),2); 45 | Dzz = sum(reshape((Duv(:,2)+1i*Duv(:,1)).*z(face,:),nf,3),2); 46 | mu = Dcz./Dzz; 47 | case 3 48 | du = zeros(nf,3); 49 | du(:,1) = sum(reshape(Duv(:,2).*vertex(face,1),nf,3),2); 50 | du(:,2) = sum(reshape(Duv(:,2).*vertex(face,2),nf,3),2); 51 | du(:,3) = sum(reshape(Duv(:,2).*vertex(face,3),nf,3),2); 52 | dv = zeros(nf,3); 53 | dv(:,1) = sum(reshape(Duv(:,1).*vertex(face,1),nf,3),2); 54 | dv(:,2) = sum(reshape(Duv(:,1).*vertex(face,2),nf,3),2); 55 | dv(:,3) = sum(reshape(Duv(:,1).*vertex(face,3),nf,3),2); 56 | 57 | E = dot(du,du,2); 58 | G = dot(dv,dv,2); 59 | F = -dot(du,dv,2); 60 | mu = (E-G+2i*F)./(E+G+2*sqrt(E.*G-F.^2)); 61 | otherwise 62 | error('Dimension of target mesh must be 3 or 2.') 63 | end 64 | -------------------------------------------------------------------------------- /algebra/compute_bd.m: -------------------------------------------------------------------------------- 1 | %% compute bd 2 | % Find boundary of mesh, returned bd will be in ccw consecutive order. For 3 | % multiple boundary mesh, return a cell, each cell is a closed boundary. 4 | % For single boundary mesh, return an array. 5 | % 6 | %% Syntax 7 | % bd = compute_bd(face) 8 | % 9 | %% Description 10 | % face: double array, nf x 3, connectivity of mesh 11 | % 12 | % bd: double array, n x 1, consecutive boundary vertex list in ccw order 13 | % cell, n x 1, each cell is one closed boundary 14 | % 15 | %% Contribution 16 | % Author : Wen Cheng Feng 17 | % Created: 2014/03/06 18 | % Revised: 2014/03/14 by Wen, add document 19 | % Revised: 2014/03/23 by Wen, revise doc 20 | % 21 | % Copyright 2014 Computational Geometry Group 22 | % Department of Mathematics, CUHK 23 | % http://www.math.cuhk.edu.hk/~lmlui 24 | 25 | function bd = compute_bd(face) 26 | % amd stores halfedge information, interior edge appear twice in amd, 27 | % while boundary edge appear once in amd. We use this to trace boundary. 28 | % 29 | % currently, there is problem for multiple boundary mesh. Some boundary may 30 | % be missing. 31 | [am,amd] = compute_adjacency_matrix(face); 32 | md = am - (amd>0)*2; 33 | [I,~,~] = find(md == -1); 34 | [~,Ii] = sort(I); 35 | bd = zeros(size(I)); 36 | k = 1; 37 | for i = 1:size(I) 38 | bd(i) = I(k); 39 | k = Ii(k); 40 | end 41 | -------------------------------------------------------------------------------- /algebra/compute_connectivity.m: -------------------------------------------------------------------------------- 1 | %% compute connectivity 2 | % Transform connectivity face to other form to assistant easy access from 3 | % face to vertex, or vise verse. 4 | % 5 | % * From face we can access vertex in each face. 6 | % * From vvif we can access face given two vertex of an edge. 7 | % * From nvif we can access the "next" vertex in a face and one vertex of 8 | % the face, "next" in the sense of ccw order. 9 | % * From pvif we can access the "previous" vertex in a face and one vertex of 10 | % the face, "previous" in the sense of ccw order. 11 | % 12 | % Basically, we implement halfedge structure in sparse matrix form. 13 | % 14 | %% Syntax 15 | % [vvif,nvif,pvif] = compute_connectivity(face) 16 | % 17 | %% Description 18 | % face: double array, nf x 3, connectivity of mesh 19 | % 20 | % vvif: sparse matrix, nv x nv, element (i,j) indicates the face in which 21 | % edge (i,j) lies in 22 | % nvif: sparse matrix, nf x nv, element (i,j) indicates next vertex of 23 | % vertex j in face i 24 | % pvif: sparse matrix, nf x nv, element (i,j) indicates previous vertex of 25 | % vertex j in face i 26 | % 27 | %% Contribution 28 | % Author : Wen Cheng Feng 29 | % Created: 2014/03/06 30 | % Revised: 2014/03/23 by Wen, add doc 31 | % 32 | % Copyright 2014 Computational Geometry Group 33 | % Department of Mathematics, CUHK 34 | % http://www.math.cuhk.edu.hk/~lmlui 35 | 36 | function [vvif,nvif,pvif] = compute_connectivity(face) 37 | fi = face(:,1); 38 | fj = face(:,2); 39 | fk = face(:,3); 40 | ff = (1:size(face,1))'; 41 | vvif = sparse([fi;fj;fk],[fj;fk;fi],[ff;ff;ff]); 42 | nvif = sparse([ff;ff;ff],[fi;fj;fk],[fj;fk;fi]); 43 | pvif = sparse([ff;ff;ff],[fj;fk;fi],[fi;fj;fk]); 44 | -------------------------------------------------------------------------------- /algebra/compute_dual_graph.m: -------------------------------------------------------------------------------- 1 | %% compute dual graph 2 | % Dual graph of a triangle mesh, regarded as graph. 3 | % Each face in original mesh corresponds to a vertex in dual graph, vertex 4 | % position be the centroid of the original face. 5 | % 6 | %% Syntax 7 | % [amf] = compute_dual_graph(face); 8 | % [amf,dual_vertex] = compute_dual_graph(face,vertex); 9 | % 10 | %% Description 11 | % face : double array, nf x 3, connectivity of mesh 12 | % vertex: double array, nv x 3, vertex of mesh 13 | % 14 | % amf: sparse matrix, nf x nf, connectivity of dual graph 15 | % dual_vertex: nf x 3, dual vertex in dual graph, if vertex is not 16 | % supplied, will return [] 17 | % 18 | %% Contribution 19 | % Author : Wen Cheng Feng 20 | % Created: 2014/03/14 21 | % Revised: 2014/03/18 by Wen, add doc 22 | % Revised: 2014/03/23 by Wen, revise doc 23 | % 24 | % Copyright 2014 Computational Geometry Group 25 | % Department of Mathematics, CUHK 26 | % http://www.math.cuhk.edu.hk/~lmlui 27 | 28 | function [amf,dual_vertex] = compute_dual_graph(face,vertex) 29 | [edge,eif] = compute_edge(face); 30 | nf = size(face,1); 31 | % dual_vertex is the center of each triangle 32 | if nargin == 2 33 | dual_vertex = (vertex(face(:,1),:)+vertex(face(:,2),:)+vertex(face(:,3),:))/3; 34 | else 35 | dual_vertex = []; 36 | end 37 | 38 | ind = eif(:,1)>0 & eif(:,2)>0; 39 | eif2 = eif(ind,:); 40 | amf = sparse(eif2(:,1),eif2(:,2),ones(size(eif2,1),1),nf,nf); 41 | amf = amf+amf'; 42 | -------------------------------------------------------------------------------- /algebra/compute_edge.m: -------------------------------------------------------------------------------- 1 | %% compute edge 2 | % Find edge of mesh, undirected. eif indicates the faces in which the edge 3 | % lies in. For boundary edge, there is only one face attached, in such 4 | % case, the other one is indicated with -1. 5 | % 6 | % Use this function to replace edgeAttachments method of 7 | % trianglulation/TriRep class. 8 | % 9 | %% Syntax 10 | % [edge,eif] = compute_edge(face) 11 | % 12 | %% Description 13 | % face: double array, nf x 3, connectivity of mesh 14 | % 15 | % edge: double array, ne x 2, undirected edge 16 | % eif : double array, ne x 2, each row indicates two faces in which the 17 | % edge lies in, -1 indicates a boundary edge 18 | % 19 | %% Contribution 20 | % Author : Wen Cheng Feng 21 | % Created: 2014/03/ 22 | % Revised: 2014/03/18 by Wen, add doc 23 | % Revised: 2014/03/23 by Wen, revise doc 24 | % 25 | % Copyright 2014 Computational Geometry Group 26 | % Department of Mathematics, CUHK 27 | % http://www.math.cuhk.edu.hk/~lmlui 28 | 29 | function [edge,eif] = compute_edge(face) 30 | [am,amd] = compute_adjacency_matrix(face); 31 | [I,J,~] = find(am); 32 | ind = I0),vfr,'UniformOutput',false); 56 | -------------------------------------------------------------------------------- /algebra/compute_vertex_ring.m: -------------------------------------------------------------------------------- 1 | %% compute_vertex_ring 2 | % Compute one-ring neighbor of given vertex or all vertex, with or 3 | % without ccw order. Default is no order. 4 | % 5 | % In some algorithms, ordered one-ring neighbor is necessary. However, 6 | % compute ordered one-ring is significantly slower than unordered one, so 7 | % compute with order only absolutely necessary. 8 | % 9 | %% Syntax 10 | % vr = compute_vertex_ring(face) 11 | % vr = compute_vertex_ring(face,vc) 12 | % vr = compute_vertex_ring(face,vc,ordered) 13 | % 14 | %% Description 15 | % face: double array, nf x 3, connectivity of mesh 16 | % vc : double array, n x 1 or 1 x n, vertex collection, can be empty, 17 | % which equivalent to all vertex. 18 | % ordered: bool, scaler, indicate if ccw order needed. 19 | % 20 | % vr: cell array, nv x 1, each cell is one ring neighbor vertex, which is 21 | % a double array 22 | % 23 | %% Example 24 | % % compute one ring of all vertex, without order 25 | % vr = compute_vertex_ring(face) 26 | % 27 | % % compute one ring of vertex 1:100, without ccw order 28 | % vr = compute_vertex_ring(face,1:100,false) 29 | % 30 | % % compute one ring of vertex 1:100, with ccw order 31 | % vr = compute_vertex_ring(face,1:100,true) 32 | % 33 | % % compute one ring of all vertex, with ccw order (may be slow) 34 | % vr = compute_vertex_ring(face,[],ordered) 35 | % 36 | % % same with last one 37 | % vr = compute_vertex_ring(face,1:nv,ordered) 38 | % 39 | %% Contribution 40 | % Author : Wen Cheng Feng 41 | % Created: 2014/03/06 42 | % Revised: 2014/03/23 by Wen, add doc 43 | % 44 | % Copyright 2014 Computational Geometry Group 45 | % Department of Mathematics, CUHK 46 | % http://www.math.cuhk.edu.hk/~lmlui 47 | 48 | function vr = compute_vertex_ring(face,vertex,vc,ordered) 49 | % number of vertex, assume face are numbered from 1, and in consecutive 50 | % order 51 | nv = max(max(face)); 52 | if ~exist('vc','var') || isempty(vc) 53 | vc = (1:nv)'; 54 | end 55 | if ~exist('ordered','var') 56 | ordered = false; 57 | end 58 | vr = cell(size(vc)); 59 | bd = compute_bd(face); 60 | isbd = false(nv,1); 61 | isbd(bd) = true; 62 | if ~ordered 63 | [am,~] = compute_adjacency_matrix(face); 64 | [I,J,~] = find(am(:,vc)); 65 | vr = cell(size(vc,1),1); 66 | for i = 1:length(J) 67 | vr{J(i)}(end+1) = I(i); 68 | end 69 | end 70 | if ordered 71 | DT = triangulation(face,vertex); 72 | va = vertexAttachments(DT,vc); 73 | for i = 1:size(vc,1) 74 | vai = va{i}; 75 | fai = face(vai,:); 76 | ind = mod(find(fai'==vc(i)),3)-1; 77 | if isempty(ind) 78 | vr{i} = []; 79 | continue; 80 | end 81 | ind1 = ind(1)+2; 82 | ind(ind<=0) = ind(ind<=0)+3; 83 | vri = zeros(1,length(ind)); 84 | for j = 1:length(ind) 85 | vri(j) = fai(j,ind(j)); 86 | end 87 | %if (length(unique(fai))-1)*2 == length(fai(:))-length(ind) 88 | if ~isbd(vc(i)) 89 | vri(end+1) = vri(1); 90 | else 91 | vri = [fai(1,ind1),vri]; 92 | end 93 | vr{i} = vri; 94 | end 95 | end 96 | if ordered && false 97 | [vvif,nvif,pvif] = compute_connectivity(face); 98 | for i = 1:size(vc,1) 99 | fs = vvif(vc(i),:); 100 | v1 = full(find(fs,1,'first')); 101 | if isbd(vc(i)) 102 | while vvif(v1,vc(i)) 103 | f2 = full(vvif(v1,vc(i))); 104 | v1 = full(pvif(f2,v1)); 105 | end 106 | end 107 | vi = v1; 108 | v0 = v1; 109 | while vvif(vc(i),v1) 110 | f1 = full(vvif(vc(i),v1)); 111 | v1 = full(nvif(f1,v1)); 112 | vi = [vi,v1]; 113 | if v0 == v1 114 | break; 115 | end 116 | end 117 | vr{i} = vi; 118 | end 119 | end -------------------------------------------------------------------------------- /algebra/face_area.m: -------------------------------------------------------------------------------- 1 | %% face area 2 | % Compute area of all face 3 | % 4 | %% Syntax 5 | % fa = face_area(face,vertex) 6 | % 7 | %% Description 8 | % face : double array, nf x 3, connectivity of mesh 9 | % vertex: double array, nv x 3, vertex of mesh 10 | % 11 | % fa: double array, nf x 1, area of all faces. 12 | % 13 | %% Contribution 14 | % Author : Wen Cheng Feng 15 | % Created: 2014/03/03 16 | % Revised: 2014/03/23 by Wen, add doc 17 | % 18 | % Copyright 2014 Computational Geometry Group 19 | % Department of Mathematics, CUHK 20 | % http://www.math.cuhk.edu.hk/~lmlui 21 | 22 | function fa = face_area(face,vertex) 23 | fi = face(:,1); 24 | fj = face(:,2); 25 | fk = face(:,3); 26 | vij = vertex(fj,:)-vertex(fi,:); 27 | vjk = vertex(fk,:)-vertex(fj,:); 28 | vki = vertex(fi,:)-vertex(fk,:); 29 | a = sqrt(dot(vij,vij,2)); 30 | b = sqrt(dot(vjk,vjk,2)); 31 | c = sqrt(dot(vki,vki,2)); 32 | s = (a+b+c)/2.0; 33 | fa = sqrt(s.*(s-a).*(s-b).*(s-c)); 34 | -------------------------------------------------------------------------------- /algebra/generalized_laplacian.m: -------------------------------------------------------------------------------- 1 | %% generalized laplacian 2 | % Discretize generalized laplacian operator as a sparse matrix. 3 | % 4 | % Generalized laplacian operator has the form 5 | % 6 | % \[ \nabla (D \cdot \nabla) \] 7 | % 8 | % where \( D = [a,b;b,c] \) and \( \mu = \rho + \imath \tau \) 9 | % 10 | % \( a = \frac{(1-\rho)^2+\tau^2}{1-\rho^2-\tau^2} \), 11 | % \( b = \frac{ -2\tau}{1-\rho^2-\tau^2} \), 12 | % \( c = \frac{(1+\rho)^2+\tau^2}{1-\rho^2-\tau^2} \). 13 | % 14 | % More details on discretization, pleas refer to [1]. 15 | % 16 | % # Lui, L., Lam, K., Yau, S., and Gu, X. Teichmuller Mapping (T-Map) and Its 17 | % Applications to Landmark Matching Registration. SIAM Journal on Imaging 18 | % Sciences 2014 7:1, 391-426 19 | % 20 | %% Syntax 21 | % A = generalized_laplacian(face,uv,mu) 22 | % 23 | %% Description 24 | % face: double array, nf x 3, connectivity of mesh 25 | % uv : double array, nv x 2, uv coordinate of mesh 26 | % mu : complex array, nf x 1, beltrami coefficient on all faces 27 | % 28 | % A: sparse matrix, nv x nv, discretized generalized laplacian operator 29 | % 30 | %% Contribution 31 | % Author : Wen Cheng Feng 32 | % Created: 2014/03/03 33 | % Revised: 2014/03/23 by Wen, add doc 34 | % 35 | % Copyright 2014 Computational Geometry Group 36 | % Department of Mathematics, CUHK 37 | % http://www.math.cuhk.edu.hk/~lmlui 38 | 39 | function A = generalized_laplacian(face,uv,mu) 40 | af = (1-2*real(mu)+abs(mu).^2)./(1.0-abs(mu).^2); 41 | bf = -2*imag(mu)./(1.0-abs(mu).^2); 42 | gf = (1+2*real(mu)+abs(mu).^2)./(1.0-abs(mu).^2); 43 | fa = face_area(face,uv); 44 | 45 | f0 = face(:,1); 46 | f1 = face(:,2); 47 | f2 = face(:,3); 48 | uxv0 = uv(f1,2) - uv(f2,2); 49 | uyv0 = uv(f2,1) - uv(f1,1); 50 | uxv1 = uv(f2,2) - uv(f0,2); 51 | uyv1 = uv(f0,1) - uv(f2,1); 52 | uxv2 = uv(f0,2) - uv(f1,2); 53 | uyv2 = uv(f1,1) - uv(f0,1); 54 | 55 | v00 = (af.*uxv0.*uxv0 + 2*bf.*uxv0.*uyv0 + gf.*uyv0.*uyv0)./fa; 56 | v11 = (af.*uxv1.*uxv1 + 2*bf.*uxv1.*uyv1 + gf.*uyv1.*uyv1)./fa; 57 | v22 = (af.*uxv2.*uxv2 + 2*bf.*uxv2.*uyv2 + gf.*uyv2.*uyv2)./fa; 58 | 59 | v01 = (af.*uxv1.*uxv0 + bf.*uxv1.*uyv0 + bf.*uxv0.*uyv1 + gf.*uyv1.*uyv0)./fa; 60 | v12 = (af.*uxv2.*uxv1 + bf.*uxv2.*uyv1 + bf.*uxv1.*uyv2 + gf.*uyv2.*uyv1)./fa; 61 | v20 = (af.*uxv0.*uxv2 + bf.*uxv0.*uyv2 + bf.*uxv2.*uyv0 + gf.*uyv0.*uyv2)./fa; 62 | 63 | I = [f0;f1;f2;f0;f1;f1;f2;f2;f0]; 64 | J = [f0;f1;f2;f1;f0;f2;f1;f0;f2]; 65 | V = [v00;v11;v22;v01;v01;v12;v12;v20;v20]; 66 | A = sparse(I,J,-V); 67 | -------------------------------------------------------------------------------- /algebra/laplace_beltrami.m: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cfwen/geometry-processing-package/d45cc47b177be7be3c5806cdd03b5566c099a6b0/algebra/laplace_beltrami.m -------------------------------------------------------------------------------- /algebra/linear_beltrami_solver.m: -------------------------------------------------------------------------------- 1 | %% linear beltrami solver 2 | % Solve Beltrami equation from given \(\mu\) and some landmark constraints. 3 | % 4 | % We can solve Beltrami equation \( \frac{\partial{f}}{\partial{\bar{z}}} = \mu 5 | % \frac{\partial{f}}{\partial{z}} \) with given \(\mu\), to get a mapping f. 6 | % Together with compute_bc, which computes mu from f, we can see that f and 7 | % mu can mutually determined, or f can be represented by mu. 8 | % 9 | %% Syntax 10 | % [uv_new,mu_new] = linear_beltrami_solver(face,uv,mu) 11 | % [uv_new,mu_new] = linear_beltrami_solver(face,uv,mu,landmark,target) 12 | % 13 | %% Description 14 | % face: double array, nf x 3, connectivity of mesh 15 | % uv : double array, nv x 2, uv coordinate of mesh 16 | % mu : complex array, nf x 1, beltrami coefficient on all faces 17 | % landmark: double array, n x 1, index landmark points to be fixed 18 | % target : double array, n x 2, target coordinates of landmark points 19 | % 20 | % uv_new: double array, nv x 2, uv coordinate of mesh 21 | % mu_new: complex array, nf x 1, beltrami coefficient of the map uv to 22 | % uv_new, ideally should be identical to mu, but in discrete case, there 23 | % may have slight difference. It can be significant with presence 24 | % of landmark constraints. 25 | % 26 | %% Contribution 27 | % Author : Wen Cheng Feng 28 | % Created: 2013/09/27 29 | % Revised: 2014/03/28 by Wen, add doc 30 | % 31 | % Copyright 2014 Computational Geometry Group 32 | % Department of Mathematics, CUHK 33 | % http://www.math.cuhk.edu.hk/~lmlui 34 | 35 | function [uv_new,mu_new] = linear_beltrami_solver(face,uv,mu,landmark,target) 36 | A = generalized_laplacian(face,uv,mu); 37 | b = -A(:,landmark)*target; 38 | b(landmark,:) = target; 39 | A(landmark,:) = 0; 40 | A(:,landmark) = 0; 41 | A = A + sparse(landmark,landmark,ones(length(landmark),1), size(A,1), size(A,2)); 42 | uv_new = A\b; 43 | mu_new = compute_bc(face,uv,uv_new); 44 | -------------------------------------------------------------------------------- /algebra/vertex_area.m: -------------------------------------------------------------------------------- 1 | %% vertex area 2 | % Compute area around vertex, two variants available: "one_ring" and "mixed", 3 | % see paper [1] for more details. 4 | % 5 | % # Meyer, Mark, et al. "Discrete differential-geometry operators for 6 | % triangulated 2-manifolds." Visualization and mathematics III. Springer 7 | % Berlin Heidelberg, 2003. 35-57. 8 | % 9 | %% Syntax 10 | % va = vertex_area(face,vertex) 11 | % va = vertex_area(face,vertex,type) 12 | % 13 | %% Description 14 | % face : double array, nf x 3, connectivity of mesh 15 | % vertex: double array, nv x 3, vertex of mesh 16 | % type : string, area type, either "one_ring", or "mixed" 17 | % 18 | % va: double array, nv x 1, area of all vertex. 19 | % 20 | %% Example 21 | % va = vertex_area(face,vertex) 22 | % va = vertex_area(face,vertex,'one_ring') % same as last 23 | % va = vertex_area(face,vertex,'mixed') 24 | 25 | %% Contribution 26 | % Author : Wen Cheng Feng 27 | % Created: 2014/03/03 28 | % Revised: 2014/03/28 by Wen, add code and doc 29 | % 30 | % Copyright 2014 Computational Geometry Group 31 | % Department of Mathematics, CUHK 32 | % http://www.math.cuhk.edu.hk/~lmlui 33 | 34 | function va = vertex_area(face,vertex,type) 35 | if ~exist('type','var') 36 | type = 'one_ring'; 37 | end 38 | fa = face_area(face,vertex); 39 | 40 | switch type 41 | case 'one_ring' 42 | [he,heif] = compute_halfedge(face); 43 | va = accumarray(he(:,1),fa(heif)); 44 | case 'mixed' 45 | dvf12 = vertex(face(:,2),:)-vertex(face(:,1),:); 46 | dvf23 = vertex(face(:,3),:)-vertex(face(:,2),:); 47 | dvf31 = vertex(face(:,1),:)-vertex(face(:,3),:); 48 | c1 = vector_cot(dvf12,-dvf31); 49 | c2 = vector_cot(dvf23,-dvf12); 50 | c3 = vector_cot(dvf31,-dvf23); 51 | vaf1 = (dot(dvf12,dvf12,2).*c3+dot(dvf31,dvf31,2).*c2)/8; 52 | vaf2 = (dot(dvf23,dvf23,2).*c1+dot(dvf12,dvf12,2).*c3)/8; 53 | vaf3 = (dot(dvf31,dvf31,2).*c2+dot(dvf23,dvf23,2).*c1)/8; 54 | ind1 = c1<0; 55 | vaf1(ind1) = fa(ind1)/2; 56 | vaf2(ind1) = fa(ind1)/4; 57 | vaf3(ind1) = fa(ind1)/4; 58 | ind2 = c2<0; 59 | vaf1(ind2) = fa(ind2)/4; 60 | vaf2(ind2) = fa(ind2)/2; 61 | vaf3(ind2) = fa(ind2)/4; 62 | ind3 = c3<0; 63 | vaf1(ind3) = fa(ind3)/4; 64 | vaf2(ind3) = fa(ind3)/4; 65 | vaf3(ind3) = fa(ind3)/2; 66 | va = accumarray(face(:),[vaf1;vaf2;vaf3]); 67 | otherwise 68 | error('unknown area type.') 69 | end 70 | 71 | function vc = vector_cot(v1,v2) 72 | % cot of angle between two vectors 73 | cs = dot(v1,v2,2); 74 | d1 = dot(v1,v1,2); 75 | d2 = dot(v2,v2,2); 76 | vc = cs./sqrt(d1.*d2-cs.*cs); 77 | -------------------------------------------------------------------------------- /contents.m: -------------------------------------------------------------------------------- 1 | % Geometric Processing Package 2 | % 3 | % algebra 4 | % compute_adjacency_matrix.m - compute adjacency matrix 5 | % compute_bd.m - find boundary 6 | % compute_connectivity.m - find connectivity information 7 | % compute_dual_graph.m - compute dual graph of mesh 8 | % compute_edge.m - find edges 9 | % compute_face_ring.m - find face ring of all face 10 | % compute_halfedge.m - find halfedges 11 | % compute_vertex_face_ring.m - find face ring of all vertex 12 | % compute_vertex_ring.m - find vertex ring of all/any vertex 13 | % face_area.m - compute all face area 14 | % generalized_laplacian.m - discretize generalized laplace operator on mesh 15 | % gradient.m - discretize gradient operator on mesh 16 | % laplace_beltrami.m - discretize Laplace Beltrami on mesh 17 | % vertex_area.m - compute vertex area 18 | % 19 | % graphics 20 | % plot_mesh.m - plot mesh 21 | % plot_path.m - plot path on mesh 22 | % 23 | % io 24 | % read_obj.m - read mesh data from obj file 25 | % read_off.m - read mesh data from off file 26 | % read_ply.m - read mesh data from ply file 27 | % write_obj.m - write mesh data to obj file 28 | % write_off.m - write mesh data to off file 29 | % write_ply.m - write mesh data to ply file 30 | % 31 | % misc 32 | % sparse_to_csc.m - convert sparse matrix to csc format 33 | % sparse_to_csr.m - convert sparse matrix to csr format 34 | % csc_to_sparse.m - convert csc format to sparse matrix 35 | % csr_to_sparse.m - convert csr format to sparse matrix 36 | % 37 | % parameterization 38 | % disk_harmonic_map.m - harmonic map from surface to unit disk 39 | % rect_harmonic_map.m - harmonic map from surface to unit square 40 | % spherical_conformal_map.m - spherical conformal map from genus zero surface to unit sphere 41 | % 42 | % topology 43 | % clean_mesh.m - clean mesh by removing unreferenced vertex 44 | % compute_greedy_homotopy_basis.m - compute a basis of homotopy group 45 | % compute_homology_basis.m - compute a basis of homology group 46 | % cut_graph.m - find a cut graph of mesh 47 | % dijkstra.m - dijkstra shortest path algorithm 48 | % minimum_spanning_tree.m - Prim's minimum spanning tree algorithm 49 | % slice_mesh.m - slice mesh open along a collection of edges 50 | % 51 | % tutorial 52 | % tutorial0 - a quick start tutorial 53 | % tutorial1 - a tutorial brings you go through the package 54 | % tutorial2 - a tutorial brings you go through the advanced functions of the package 55 | -------------------------------------------------------------------------------- /data/cube.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment generated by geometric processing package 4 | element vertex 8 5 | property float x 6 | property float y 7 | property float z 8 | element face 6 9 | property list uchar int vertex_indices 10 | end_header 11 | 1.632993 0.000000 1.154701 12 | 0.000000 1.632993 1.154701 13 | -1.632993 0.000000 1.154701 14 | 0.000000 -1.632993 1.154701 15 | 1.632993 0.000000 -1.154701 16 | 0.000000 1.632993 -1.154701 17 | -1.632993 0.000000 -1.154701 18 | 0.000000 -1.632993 -1.154701 19 | 4 0 1 2 3 255 0 0 20 | 4 7 4 0 3 77 102 0 21 | 4 4 5 1 0 51 128 26 22 | 4 5 6 2 1 26 153 51 23 | 4 3 2 6 7 0 179 77 24 | 4 6 5 4 7 0 255 0 25 | -------------------------------------------------------------------------------- /data/eight.off: -------------------------------------------------------------------------------- 1 | OFF 2 | 766 1536 0 3 | 0.542192 -0.944823 -0.075465 4 | 0.606486 -0.819004 -0.000797 5 | 0.546440 -0.966452 -0.000179 6 | 0.465913 -0.433589 0.181201 7 | 0.342738 -0.351383 0.200934 8 | 0.417084 -0.463572 0.196818 9 | 0.552547 -0.832303 0.138928 10 | 0.579046 -0.689497 0.137561 11 | 0.525972 -0.693926 0.181574 12 | 0.403466 0.076380 0.106989 13 | 0.422384 -0.079801 0.079005 14 | 0.440357 -0.005179 -0.000015 15 | 0.354053 0.002264 0.154977 16 | 0.385747 -0.134508 0.142234 17 | 0.480475 -0.197653 -0.001448 18 | -0.604058 0.649625 -0.075857 19 | -0.595537 0.511979 -0.002438 20 | -0.622292 0.665115 -0.001671 21 | -0.595054 0.799865 -0.075685 22 | -0.560062 -0.542531 -0.137084 23 | -0.588978 -0.525062 -0.072664 24 | -0.509367 -0.403074 -0.136175 25 | -0.620670 -0.663162 0.001080 26 | -0.593362 -0.508174 0.001736 27 | -0.472720 -0.225020 -0.072557 28 | -0.538969 -0.351425 0.001856 29 | -0.478963 -0.188807 0.001181 30 | -0.404914 0.085698 -0.106857 31 | -0.422385 -0.070537 -0.079131 32 | -0.440357 0.005179 -0.000015 33 | -0.387495 -0.130982 -0.141638 34 | -0.589956 -0.829529 -0.074853 35 | -0.576629 -0.686739 -0.138399 36 | -0.551421 -0.831152 -0.139373 37 | -0.466267 -0.431495 -0.180575 38 | -0.296756 -0.066226 -0.198720 39 | -0.334758 -0.188931 -0.187904 40 | -0.228322 -0.326305 -0.182356 41 | -0.348740 -0.355413 -0.197728 42 | -0.258336 -0.250979 -0.206003 43 | -0.134507 -0.278795 -0.186787 44 | 0.180671 1.201760 0.139822 45 | 0.031210 1.229440 0.139839 46 | 0.039077 1.174200 0.183421 47 | 0.317502 1.136300 0.139806 48 | 0.324867 1.176250 0.075329 49 | 0.432023 1.037550 0.139774 50 | 0.296756 1.084310 0.183433 51 | 0.507620 0.755231 0.182168 52 | 0.470954 0.880249 0.182976 53 | 0.417029 0.845817 0.198353 54 | 0.562679 0.635312 0.138720 55 | 0.559538 0.777664 0.139288 56 | 0.542070 0.944935 0.075377 57 | 0.515268 0.914618 0.139642 58 | 0.594563 0.799590 0.075453 59 | 0.398585 0.992816 0.183340 60 | 0.267014 1.027800 0.199095 61 | 0.233018 0.973770 0.183520 62 | 0.141079 1.023000 0.183505 63 | 0.118985 0.971800 0.139950 64 | 0.355160 0.946007 0.198933 65 | 0.308497 0.902405 0.183310 66 | -0.297885 0.589262 0.077176 67 | -0.342619 0.680261 0.140092 68 | -0.339937 0.593111 0.139759 69 | -0.515476 0.562829 0.180435 70 | -0.579046 0.689497 0.137561 71 | -0.562715 0.546578 0.136319 72 | -0.552547 0.832303 0.138928 73 | -0.497736 0.824140 0.182743 74 | -0.487299 0.966578 0.139675 75 | -0.462885 0.693466 0.197762 76 | -0.435526 0.808673 0.198584 77 | -0.229427 1.123340 0.183436 78 | -0.297292 1.004380 0.198967 79 | -0.195442 1.069330 0.198978 80 | -0.344095 1.047820 0.183435 81 | -0.120614 1.217560 0.139869 82 | -0.098545 1.166320 0.183421 83 | -0.079806 1.105340 0.199000 84 | 0.041439 1.110420 0.199040 85 | -0.165703 1.012830 0.183284 86 | -0.065568 1.043080 0.183343 87 | -0.143757 -1.250880 -0.075421 88 | -0.000018 -1.281150 0.000009 89 | -0.164256 -1.259820 -0.000036 90 | 0.199151 -0.431555 -0.070284 91 | 0.214458 -0.395746 -0.137223 92 | 0.249779 -0.489387 -0.070124 93 | 0.404914 -0.085698 -0.106857 94 | 0.348742 -0.142258 -0.176379 95 | 0.355041 -0.005314 -0.154855 96 | 0.414566 -0.239432 -0.150410 97 | 0.281717 -0.184661 -0.216361 98 | 0.358496 -0.278345 -0.195777 99 | 0.272482 -0.461062 -0.135481 100 | 0.246800 -0.350774 -0.187318 101 | 0.164532 -0.294798 -0.192912 102 | 0.200461 -0.218732 -0.226989 103 | 0.313526 -0.432192 -0.181214 104 | 0.431884 -1.037260 -0.139761 105 | 0.317393 -1.136140 -0.139774 106 | 0.296642 -1.084130 -0.183414 107 | 0.507757 -0.755171 -0.182086 108 | 0.416903 -0.845479 -0.198309 109 | 0.447771 -0.734963 -0.196937 110 | 0.470776 -0.879794 -0.182975 111 | 0.563417 -0.636336 -0.138723 112 | 0.559707 -0.777577 -0.139369 113 | 0.591617 -0.529322 0.071833 114 | 0.622292 -0.665115 -0.001671 115 | 0.595537 -0.511979 -0.002438 116 | 0.595054 -0.799865 -0.075685 117 | 0.591175 -0.830690 0.074401 118 | 0.613209 -0.679498 0.073108 119 | 0.562715 -0.546578 0.136319 120 | 0.120658 1.217620 -0.139852 121 | 0.264119 1.167400 -0.139881 122 | 0.229553 1.123470 -0.183420 123 | 0.344297 1.048000 -0.183423 124 | 0.297566 1.004600 -0.198961 125 | 0.195582 1.069460 -0.198980 126 | 0.551421 0.831152 -0.139373 127 | 0.497078 0.823367 -0.183085 128 | 0.487088 0.966390 -0.139797 129 | 0.589956 0.829529 -0.074853 130 | 0.576629 0.686739 -0.138399 131 | 0.526248 0.973980 -0.075339 132 | 0.447134 1.096280 -0.000083 133 | 0.546138 0.966325 0.000052 134 | 0.425304 1.098900 -0.075475 135 | 0.610987 0.676907 -0.073876 136 | 0.620670 0.663161 0.001080 137 | 0.588978 0.525062 -0.072664 138 | 0.605571 0.818228 0.000436 139 | 0.572025 0.495706 0.075368 140 | 0.538969 0.351425 0.001856 141 | 0.593362 0.508174 0.001736 142 | 0.603054 0.648343 0.075521 143 | 0.120401 -0.334355 0.138067 144 | 0.200457 -0.376029 0.137782 145 | 0.223645 -0.321281 0.185554 146 | -0.161943 -0.401929 -0.075715 147 | -0.067467 -0.379182 -0.002245 148 | -0.136283 -0.406093 -0.003363 149 | -0.015816 -0.356493 -0.072918 150 | 0.077822 -0.380230 0.001124 151 | 0.005383 -0.370389 -0.000677 152 | 0.024895 -0.357082 0.072105 153 | 0.101068 -0.371098 0.073310 154 | 0.170575 -0.404633 0.074753 155 | 0.229102 -0.224883 0.217127 156 | 0.309517 0.536367 0.135417 157 | 0.332545 0.622023 0.136474 158 | 0.297363 0.633107 0.072638 159 | 0.357464 0.519593 0.179275 160 | 0.311394 0.430302 0.180577 161 | 0.268207 0.459005 0.135381 162 | 0.250664 0.356122 0.184172 163 | 0.302233 0.315461 0.205722 164 | 0.348378 0.138895 0.175953 165 | 0.411946 0.231351 0.150755 166 | 0.288481 0.195020 0.212801 167 | 0.358043 0.274572 0.195021 168 | 0.365177 0.403172 0.198628 169 | 0.415132 0.506659 0.195645 170 | 0.456943 0.191290 0.079802 171 | 0.478963 0.188807 0.001181 172 | 0.529944 0.491907 0.138119 173 | 0.472720 0.225020 -0.072557 174 | 0.165858 1.012970 -0.183304 175 | 0.145124 0.960974 -0.139676 176 | 0.065621 1.043150 -0.183361 177 | 0.322466 0.767094 -0.139883 178 | 0.281273 0.846969 -0.139717 179 | 0.325267 0.881419 -0.183269 180 | 0.302069 0.665981 -0.076363 181 | 0.274007 0.574700 -0.002833 182 | 0.286035 0.649145 -0.001857 183 | 0.278488 0.724186 -0.000946 184 | 0.288360 0.744268 -0.075809 185 | 0.255003 0.816119 -0.075414 186 | 0.388939 1.081500 -0.139896 187 | 0.294946 1.193670 -0.075463 188 | 0.435613 0.945323 -0.183366 189 | 0.435369 0.808337 -0.198791 190 | 0.374311 0.789165 -0.183261 191 | 0.523961 0.691620 -0.182329 192 | 0.512830 0.559275 -0.181209 193 | 0.454958 0.574443 -0.197428 194 | 0.560062 0.542531 -0.137084 195 | 0.509367 0.403074 -0.136175 196 | 0.466267 0.431495 -0.180575 197 | 0.444084 0.267102 -0.136798 198 | 0.387495 0.130982 -0.141638 199 | 0.334758 0.188931 -0.187904 200 | 0.131300 0.200931 -0.223422 201 | 0.258336 0.250979 -0.206003 202 | 0.223561 0.136267 -0.224801 203 | 0.228322 0.326305 -0.182356 204 | 0.348740 0.355413 -0.197727 205 | 0.134507 0.278795 -0.186787 206 | 0.296756 0.066226 -0.198720 207 | 0.526603 -0.974233 0.075195 208 | 0.447101 -1.096150 0.000091 209 | 0.487299 -0.966578 0.139675 210 | 0.425259 -1.098790 0.075484 211 | 0.388829 -1.081370 0.139907 212 | 0.264008 -1.167270 0.139910 213 | 0.294843 -1.193530 0.075500 214 | 0.344095 -1.047820 0.183435 215 | 0.497736 -0.824140 0.182743 216 | 0.462885 -0.693467 0.197762 217 | 0.515476 -0.562829 0.180435 218 | 0.509978 -0.407279 0.136273 219 | 0.573657 -0.498984 -0.075651 220 | 0.541187 -0.357666 -0.002437 221 | 0.473892 -0.232939 0.072196 222 | 0.442443 -0.271088 0.137598 223 | 0.326318 -0.179644 0.191813 224 | 0.390074 -0.306717 0.185107 225 | 0.213761 -0.090648 0.233941 226 | 0.107788 -0.102596 0.253172 227 | 0.110847 0.004183 0.258797 228 | 0.293849 -0.052294 0.200511 229 | 0.531685 -0.495288 -0.137860 230 | 0.458981 -0.200239 -0.079591 231 | 0.422385 0.070537 -0.079131 232 | -0.542192 0.944823 -0.075465 233 | -0.606486 0.819004 -0.000797 234 | -0.546440 0.966452 -0.000179 235 | -0.613209 0.679498 0.073108 236 | -0.431884 1.037260 -0.139761 237 | -0.317393 1.136140 -0.139774 238 | -0.296642 1.084130 -0.183414 239 | -0.180618 1.201690 -0.139798 240 | -0.324763 1.176090 -0.075291 241 | -0.449379 1.073910 -0.075312 242 | -0.447101 1.096150 0.000091 243 | -0.526603 0.974233 0.075195 244 | -0.316768 1.196890 0.000117 245 | -0.294843 1.193530 0.075500 246 | -0.164193 1.259740 0.000064 247 | 0.039065 -1.174200 -0.183414 248 | 0.031188 -1.229430 -0.139826 249 | -0.098582 -1.166370 -0.183415 250 | -0.344297 -1.048000 -0.183423 251 | -0.435613 -0.945323 -0.183366 252 | -0.379319 -0.915363 -0.198931 253 | -0.264119 -1.167400 -0.139881 254 | -0.388939 -1.081500 -0.139896 255 | -0.525972 0.693926 0.181574 256 | -0.457622 0.577542 0.196577 257 | -0.417084 0.463572 0.196818 258 | -0.365691 0.492460 0.180958 259 | -0.396334 0.588752 0.181835 260 | -0.507620 -0.755231 0.182168 261 | -0.470954 -0.880249 0.182976 262 | -0.417029 -0.845817 0.198353 263 | -0.603054 -0.648343 0.075521 264 | -0.594563 -0.799590 0.075453 265 | -0.456943 -0.191290 0.079802 266 | -0.403466 -0.076380 0.106989 267 | -0.411946 -0.231351 0.150755 268 | -0.572025 -0.495706 0.075368 269 | -0.562679 -0.635312 0.138720 270 | -0.529944 -0.491907 0.138119 271 | -0.264017 -0.868705 0.139759 272 | -0.227807 -0.851226 0.075389 273 | -0.310248 -0.793559 0.139075 274 | -0.095855 -0.938583 0.075518 275 | -0.198449 -0.929835 0.139976 276 | -0.118985 -0.971800 0.139950 277 | -0.308497 -0.902405 0.183310 278 | -0.233018 -0.973770 0.183520 279 | -0.267014 -1.027800 0.199095 280 | -0.141079 -1.023000 0.183505 281 | -0.116837 -0.334897 -0.137416 282 | -0.195223 -0.374586 -0.137788 283 | -0.267726 -0.514581 -0.077088 284 | -0.196547 -0.449395 -0.003765 285 | -0.243565 -0.506612 -0.003539 286 | -0.127523 -0.387390 0.070867 287 | -0.192218 -0.429091 0.070589 288 | -0.542070 -0.944935 0.075377 289 | -0.515268 -0.914618 0.139642 290 | -0.432023 -1.037550 0.139774 291 | -0.180671 -1.201760 0.139822 292 | -0.031210 -1.229440 0.139839 293 | -0.039077 -1.174200 0.183421 294 | -0.317502 -1.136300 0.139806 295 | -0.296756 -1.084310 0.183433 296 | -0.398585 -0.992816 0.183340 297 | -0.355160 -0.946007 0.198933 298 | -0.414566 0.239432 -0.150410 299 | -0.348742 0.142258 -0.176379 300 | -0.281717 0.184661 -0.216361 301 | -0.200461 0.218732 -0.226989 302 | -0.197125 0.092345 -0.241460 303 | -0.223645 0.321281 0.185554 304 | -0.342738 0.351383 0.200934 305 | -0.229102 0.224883 0.217127 306 | -0.465913 0.433590 0.181201 307 | -0.509978 0.407279 0.136273 308 | -0.591617 0.529322 0.071833 309 | -0.537977 0.381779 0.071221 310 | -0.442443 0.271088 0.137598 311 | -0.385747 0.134508 0.142234 312 | -0.326318 0.179644 0.191813 313 | -0.473892 0.232939 0.072196 314 | -0.458981 0.200239 -0.079591 315 | -0.480475 0.197653 -0.001448 316 | -0.519419 0.347214 -0.075248 317 | -0.563417 0.636336 -0.138723 318 | -0.573657 0.498984 -0.075651 319 | -0.531685 0.495287 -0.137860 320 | -0.515195 0.914267 -0.139684 321 | -0.559707 0.777577 -0.139369 322 | -0.470776 0.879794 -0.182975 323 | -0.507757 0.755171 -0.182086 324 | -0.541187 0.357666 -0.002437 325 | -0.444084 -0.267102 -0.136798 326 | -0.535846 -0.375722 -0.071836 327 | -0.605571 -0.818228 0.000436 328 | -0.546138 -0.966325 0.000052 329 | -0.610987 -0.676907 -0.073876 330 | -0.355041 0.005314 -0.154855 331 | -0.487088 -0.966390 -0.139797 332 | -0.425304 -1.098900 -0.075475 333 | -0.316871 -1.197040 -0.000077 334 | -0.447134 -1.096280 -0.000083 335 | -0.294946 -1.193670 -0.075463 336 | -0.526248 -0.973980 -0.075339 337 | 0.114272 0.106100 -0.248090 338 | 0.104171 0.003115 -0.259602 339 | 0.005320 0.098234 -0.258450 340 | 0.100987 -0.101965 -0.256103 341 | 0.197125 -0.092345 -0.241460 342 | -0.131300 -0.200931 -0.223422 343 | -0.223561 -0.136267 -0.224801 344 | -0.100987 0.101965 -0.256103 345 | -0.104171 -0.003115 -0.259602 346 | 0.000000 0.000000 -0.266768 347 | -0.005320 -0.098234 -0.258450 348 | -0.523961 -0.691620 -0.182329 349 | -0.454958 -0.574443 -0.197428 350 | -0.461592 -0.691921 -0.198326 351 | -0.397276 -0.309643 -0.181887 352 | -0.512830 -0.559275 -0.181209 353 | -0.261215 -0.434702 -0.138690 354 | -0.310082 -0.508425 -0.139544 355 | -0.362148 -0.489174 -0.181712 356 | -0.305212 -0.400666 -0.181290 357 | -0.415727 -0.461270 -0.196772 358 | 0.061437 -0.363530 -0.071812 359 | -0.255003 -0.816119 -0.075414 360 | -0.278488 -0.724186 -0.000946 361 | -0.251391 -0.794031 -0.000270 362 | -0.294914 -0.711597 0.073864 363 | -0.288360 -0.744268 -0.075809 364 | -0.286035 -0.649145 -0.001857 365 | -0.302069 -0.665981 -0.076363 366 | -0.322466 -0.767094 -0.139883 367 | -0.281273 -0.846969 -0.139717 368 | -0.220927 -0.913070 -0.139649 369 | -0.254209 -0.957879 -0.183268 370 | -0.325267 -0.881419 -0.183269 371 | -0.341855 -0.679618 -0.140062 372 | -0.337655 -0.591429 -0.140033 373 | -0.398037 -0.688205 -0.183102 374 | -0.274007 -0.574700 -0.002833 375 | -0.279510 -0.555945 0.071467 376 | 0.449452 1.074120 0.075323 377 | 0.164256 1.259820 -0.000036 378 | 0.316871 1.197040 -0.000077 379 | -0.031188 1.229430 -0.139826 380 | -0.039065 1.174200 -0.183414 381 | 0.098582 1.166370 -0.183415 382 | 0.079846 1.105400 -0.199007 383 | -0.041430 1.110420 -0.199040 384 | -0.173952 1.146180 -0.183417 385 | -0.159768 1.083920 -0.199082 386 | -0.296214 0.712940 -0.073408 387 | -0.271684 0.786213 -0.074689 388 | -0.251567 0.794282 0.000400 389 | -0.263878 0.868495 -0.139768 390 | -0.198321 0.929654 -0.140006 391 | -0.167498 0.903392 -0.075595 392 | -0.310450 0.793734 -0.138945 393 | -0.361220 0.815064 -0.182514 394 | -0.232897 0.973583 -0.183537 395 | -0.308317 0.902104 -0.183321 396 | -0.354954 0.945645 -0.198938 397 | -0.416903 0.845479 -0.198309 398 | -0.447771 0.734963 -0.196937 399 | -0.398393 0.992458 -0.183334 400 | -0.284119 0.559263 -0.070641 401 | -0.288276 0.650916 0.002454 402 | -0.277948 0.577213 0.003537 403 | -0.249330 0.509457 0.004066 404 | -0.303453 0.666979 0.076716 405 | -0.288802 0.744712 0.076051 406 | -0.279441 0.725121 0.001311 407 | -0.266899 1.027610 -0.199094 408 | -0.141040 1.022950 -0.183512 409 | -0.075248 0.929573 -0.000154 410 | -0.145577 0.900051 -0.000228 411 | -0.095791 0.938504 -0.075543 412 | -0.118935 0.971736 -0.139968 413 | -0.031250 0.991469 -0.139853 414 | -0.017565 0.953559 -0.075407 415 | 0.251391 0.794031 -0.000270 416 | 0.271409 0.785899 0.074838 417 | 0.206046 0.853934 0.000096 418 | 0.220927 0.913070 -0.139649 419 | 0.203660 0.876305 -0.075223 420 | 0.137756 0.921022 -0.075205 421 | 0.167634 0.903564 0.075558 422 | 0.075323 0.929666 0.000125 423 | 0.145727 0.900216 0.000187 424 | 0.017554 1.267380 0.075397 425 | 0.000018 1.281150 0.000009 426 | -0.264008 1.167270 0.139910 427 | -0.388829 1.081370 0.139907 428 | 0.173995 1.146240 0.183434 429 | 0.447360 0.734606 0.197168 430 | 0.507318 0.625411 0.181057 431 | 0.474896 0.496715 0.180744 432 | 0.264017 0.868705 0.139759 433 | 0.227807 0.851226 0.075389 434 | 0.310248 0.793559 0.139075 435 | 0.333371 0.709618 0.137880 436 | 0.386781 0.718136 0.181303 437 | 0.294914 0.711597 0.073864 438 | 0.095855 0.938583 0.075518 439 | 0.017600 0.953543 0.075389 440 | 0.198449 0.929835 0.139976 441 | 0.031275 0.991445 0.139839 442 | 0.039123 1.046650 0.183424 443 | -0.058848 0.987582 0.139725 444 | 0.159803 1.083970 0.199088 445 | -0.253913 0.957660 0.183262 446 | -0.324902 0.881196 0.183276 447 | -0.281015 0.846841 0.139764 448 | -0.220668 0.912888 0.139637 449 | -0.120401 0.334355 0.138067 450 | -0.200457 0.376029 0.137782 451 | -0.101068 0.371098 0.073310 452 | -0.061437 0.363530 -0.071812 453 | -0.145501 0.408032 0.002776 454 | -0.077822 0.380230 0.001124 455 | -0.005383 0.370389 -0.000677 456 | -0.170575 0.404633 0.074753 457 | -0.229123 0.454541 0.076089 458 | -0.266904 0.437935 0.137930 459 | -0.135000 0.389009 -0.070914 460 | -0.058695 0.324934 -0.139114 461 | -0.272601 0.517023 0.076990 462 | -0.204125 0.451993 0.003795 463 | -0.199151 0.431555 -0.070284 464 | -0.398789 0.689086 0.182801 465 | -0.374189 0.789220 0.183203 466 | -0.322458 0.767186 0.139982 467 | -0.435571 0.945336 0.183287 468 | -0.379049 0.915208 0.198898 469 | -0.061973 0.947292 0.075251 470 | -0.137599 0.920869 0.075166 471 | -0.144964 0.960828 0.139644 472 | -0.203467 0.876174 0.075212 473 | -0.120658 -1.217620 -0.139852 474 | 0.017521 -1.267370 -0.075379 475 | 0.164193 -1.259740 0.000064 476 | 0.177456 -1.242010 -0.075332 477 | 0.316768 -1.196890 0.000117 478 | 0.324763 -1.176090 -0.075291 479 | -0.173995 -1.146240 0.183434 480 | -0.041439 -1.110420 0.199040 481 | -0.159803 -1.083970 0.199088 482 | -0.039123 -1.046650 0.183424 483 | -0.017554 -1.267380 0.075397 484 | 0.120614 -1.217560 0.139869 485 | 0.143703 -1.250810 0.075445 486 | -0.324867 -1.176250 0.075329 487 | 0.145501 -0.408032 0.002776 488 | 0.135000 -0.389009 -0.070914 489 | 0.058695 -0.324934 -0.139114 490 | 0.204125 -0.451993 0.003795 491 | 0.142243 -0.350267 -0.138632 492 | 0.070467 -0.267636 -0.194957 493 | 0.249330 -0.509457 0.004066 494 | 0.277948 -0.577213 0.003537 495 | 0.297885 -0.589262 0.077176 496 | 0.272601 -0.517023 0.076990 497 | 0.313908 -0.540199 -0.134671 498 | 0.335553 -0.625119 -0.135642 499 | 0.300263 -0.635717 -0.071874 500 | 0.280399 -0.058254 -0.210049 501 | 0.519419 -0.347214 -0.075248 502 | 0.477996 -0.359028 -0.139247 503 | 0.477413 -0.500794 -0.180068 504 | 0.425054 -0.383229 -0.183718 505 | 0.418420 -0.511274 -0.194842 506 | 0.367485 -0.407429 -0.198747 507 | 0.297555 -0.311467 -0.208848 508 | 0.508335 -0.626814 -0.180730 509 | 0.447104 -0.621525 -0.195217 510 | 0.387112 -0.620589 -0.179123 511 | 0.387631 -0.719048 -0.180943 512 | 0.361271 -0.523975 -0.178538 513 | -0.030259 -0.319054 -0.138244 514 | -0.031041 -0.261554 -0.192630 515 | 0.089851 -0.194371 -0.234837 516 | 0.515195 -0.914267 -0.139684 517 | 0.398393 -0.992458 -0.183334 518 | 0.266899 -1.027610 -0.199094 519 | -0.065621 -1.043150 -0.183361 520 | 0.039110 -1.046670 -0.183431 521 | 0.041430 -1.110420 -0.199040 522 | 0.118935 -0.971736 -0.139968 523 | 0.141040 -1.022950 -0.183512 524 | 0.031250 -0.991469 -0.139853 525 | 0.232896 -0.973583 -0.183537 526 | 0.180618 -1.201690 -0.139798 527 | 0.173952 -1.146180 -0.183417 528 | 0.449379 -1.073910 -0.075312 529 | 0.604058 -0.649625 -0.075857 530 | -0.017521 1.267370 -0.075379 531 | 0.143757 1.250880 -0.075421 532 | 0.379319 0.915363 -0.198931 533 | 0.254209 0.957879 -0.183268 534 | 0.475204 0.352556 0.139787 535 | 0.517331 0.341082 0.075226 536 | 0.535846 0.375722 -0.071836 537 | 0.266904 -0.437935 0.137930 538 | 0.314416 -0.511379 0.138820 539 | 0.365691 -0.492460 0.180958 540 | 0.229123 -0.454541 0.076089 541 | 0.121183 -0.272662 0.190664 542 | -0.053227 -0.363041 0.071338 543 | -0.059170 -0.324527 0.139138 544 | 0.010734 -0.259796 0.194322 545 | 0.031356 -0.318275 0.138721 546 | 0.396334 -0.588752 0.181835 547 | 0.398789 -0.689086 0.182801 548 | 0.306747 -0.401587 0.181907 549 | -0.141394 -0.350419 0.138127 550 | -0.211446 -0.395825 0.136452 551 | -0.177332 -0.301930 0.189249 552 | -0.091770 -0.369373 -0.074295 553 | -0.474896 -0.496715 0.180744 554 | -0.475204 -0.352556 0.139787 555 | -0.447360 -0.734606 0.197168 556 | -0.384618 -0.617691 0.179880 557 | -0.332545 -0.622023 0.136474 558 | -0.357464 -0.519593 0.179275 559 | -0.415132 -0.506659 0.195645 560 | -0.348378 -0.138895 0.175953 561 | -0.354053 -0.002264 0.154977 562 | -0.282601 -0.072486 0.208914 563 | -0.288481 -0.195020 0.212801 564 | -0.358043 -0.274572 0.195021 565 | -0.302233 -0.315461 0.205722 566 | -0.365177 -0.403172 0.198628 567 | -0.311394 -0.430302 0.180577 568 | -0.507318 -0.625411 0.181057 569 | -0.268207 -0.459005 0.135381 570 | -0.250664 -0.356122 0.184172 571 | -0.229196 -0.248813 0.216239 572 | -0.144574 -0.206252 0.227252 573 | 0.000000 0.000000 0.266253 574 | 0.011590 0.099046 0.258078 575 | -0.107788 0.102596 0.253172 576 | -0.110847 -0.004183 0.258797 577 | -0.011590 -0.099046 0.258078 578 | -0.120439 -0.108072 0.250093 579 | 0.075942 -0.191311 0.232283 580 | 0.361190 0.815149 0.182604 581 | 0.384618 0.617691 0.179880 582 | -0.024895 0.357082 0.072105 583 | 0.161943 0.401929 -0.075715 584 | 0.067467 0.379182 -0.002245 585 | 0.136283 0.406093 -0.003363 586 | 0.091770 0.369373 -0.074295 587 | 0.053227 0.363041 0.071338 588 | 0.243776 0.486292 0.070730 589 | 0.243565 0.506612 -0.003539 590 | 0.192218 0.429091 0.070589 591 | 0.294990 0.587534 -0.076893 592 | 0.267726 0.514581 -0.077088 593 | 0.337655 0.591429 -0.140033 594 | 0.279510 0.555945 0.071467 595 | 0.211446 0.395825 0.136452 596 | 0.141394 0.350419 0.138127 597 | 0.177332 0.301930 0.189249 598 | 0.211465 0.139536 0.233307 599 | 0.229196 0.248813 0.216239 600 | 0.144574 0.206252 0.227252 601 | 0.282601 0.072486 0.208914 602 | 0.421810 0.376890 0.184300 603 | 0.116837 0.334897 -0.137416 604 | 0.030259 0.319054 -0.138244 605 | 0.015816 0.356493 -0.072918 606 | 0.058914 0.987669 -0.139750 607 | 0.062049 0.947389 -0.075280 608 | -0.039110 1.046670 -0.183431 609 | 0.398037 0.688205 -0.183102 610 | 0.393944 0.586380 -0.182547 611 | 0.341855 0.679618 -0.140062 612 | 0.461592 0.691921 -0.198326 613 | 0.305212 0.400666 -0.181290 614 | 0.310082 0.508425 -0.139544 615 | 0.362148 0.489174 -0.181712 616 | 0.261215 0.434702 -0.138690 617 | 0.415727 0.461270 -0.196773 618 | 0.397276 0.309643 -0.181887 619 | -0.334621 0.710959 -0.137425 620 | -0.335553 0.625119 -0.135642 621 | -0.387112 0.620589 -0.179123 622 | -0.387631 0.719048 -0.180943 623 | -0.164532 0.294798 -0.192912 624 | -0.246800 0.350774 -0.187318 625 | -0.214458 0.395746 -0.137223 626 | -0.358496 0.278345 -0.195777 627 | -0.297555 0.311468 -0.208848 628 | -0.367485 0.407429 -0.198747 629 | -0.313526 0.432192 -0.181214 630 | 0.031041 0.261554 -0.192630 631 | -0.070467 0.267636 -0.194957 632 | -0.089851 0.194371 -0.234837 633 | -0.137756 -0.921022 -0.075205 634 | -0.145727 -0.900216 0.000187 635 | -0.062049 -0.947389 -0.075280 636 | 0.095791 -0.938504 -0.075543 637 | -0.000019 -0.939793 -0.000010 638 | 0.075248 -0.929573 -0.000154 639 | -0.206046 -0.853934 0.000096 640 | -0.271409 -0.785899 0.074838 641 | -0.075323 -0.929666 0.000125 642 | -0.167634 -0.903564 0.075558 643 | -0.017600 -0.953543 0.075389 644 | 0.061973 -0.947292 0.075251 645 | 0.137599 -0.920869 0.075166 646 | 0.203467 -0.876174 0.075212 647 | 0.205908 -0.853826 -0.000104 648 | 0.058848 -0.987582 0.139725 649 | 0.229427 -1.123340 0.183436 650 | 0.324902 -0.881196 0.183276 651 | 0.281015 -0.846841 0.139764 652 | 0.253913 -0.957660 0.183262 653 | 0.220668 -0.912888 0.139637 654 | 0.165703 -1.012830 0.183284 655 | 0.195442 -1.069330 0.198978 656 | 0.297292 -1.004380 0.198967 657 | 0.379049 -0.915208 0.198898 658 | 0.144964 -0.960828 0.139644 659 | 0.065568 -1.043080 0.183343 660 | 0.435571 -0.945336 0.183287 661 | 0.322458 -0.767186 0.139982 662 | 0.288802 -0.744712 0.076051 663 | 0.342619 -0.680261 0.140092 664 | 0.374189 -0.789220 0.183203 665 | 0.435526 -0.808673 0.198584 666 | 0.457622 -0.577542 0.196577 667 | 0.537977 -0.381779 0.071221 668 | -0.205577 -0.027112 0.238522 669 | -0.121183 0.272662 0.190664 670 | -0.075942 0.191311 0.232283 671 | -0.010734 0.259796 0.194322 672 | -0.591175 0.830690 0.074401 673 | -0.425259 1.098790 0.075484 674 | -0.143703 1.250810 0.075445 675 | -0.177456 1.242010 -0.075332 676 | -0.165858 -1.012970 -0.183304 677 | -0.145124 -0.960974 -0.139676 678 | -0.195582 -1.069460 -0.198980 679 | -0.079846 -1.105400 -0.199007 680 | -0.497078 -0.823367 -0.183085 681 | -0.229553 -1.123470 -0.183420 682 | -0.297566 -1.004600 -0.198961 683 | -0.306747 0.401587 0.181907 684 | -0.314416 0.511379 0.138820 685 | -0.559538 -0.777664 0.139288 686 | -0.422384 0.079801 0.079005 687 | -0.517331 -0.341082 0.075226 688 | -0.449452 -1.074120 0.075323 689 | -0.361190 -0.815149 0.182604 690 | -0.386781 -0.718136 0.181303 691 | -0.333371 -0.709618 0.137880 692 | -0.297363 -0.633107 0.072638 693 | -0.309517 -0.536367 0.135417 694 | -0.243776 -0.486292 0.070730 695 | -0.222096 -0.451650 -0.076722 696 | 0.098545 -1.166320 0.183421 697 | -0.508335 0.626814 -0.180730 698 | -0.477413 0.500794 -0.180068 699 | -0.477996 0.359028 -0.139247 700 | -0.280399 0.058254 -0.210049 701 | -0.213761 0.090648 0.233941 702 | -0.293849 0.052294 0.200511 703 | -0.390074 0.306717 0.185107 704 | 0.018517 0.186840 -0.233521 705 | 0.203247 0.023772 -0.237891 706 | -0.114272 -0.106100 -0.248090 707 | -0.203247 -0.023772 -0.237891 708 | -0.203660 -0.876305 -0.075223 709 | -0.393944 -0.586380 -0.182547 710 | -0.374311 -0.789165 -0.183261 711 | -0.294990 -0.587534 -0.076893 712 | 0.177519 1.242090 0.075361 713 | -0.254969 0.816182 0.075505 714 | -0.205908 0.853826 -0.000104 715 | -0.300263 0.635717 -0.071874 716 | -0.313908 0.540199 -0.134671 717 | -0.227690 0.851090 -0.075396 718 | -0.249779 0.489387 -0.070124 719 | 0.000019 0.939793 -0.000010 720 | 0.445403 0.619345 0.195798 721 | -0.031356 0.318275 0.138721 722 | 0.059170 0.324527 0.139138 723 | 0.196547 0.449395 -0.003765 724 | 0.127523 0.387390 0.070867 725 | -0.142243 0.350267 -0.138632 726 | -0.031275 -0.991445 0.139839 727 | -0.177519 -1.242090 0.075361 728 | 0.361220 -0.815064 -0.182514 729 | 0.310450 -0.793734 -0.138945 730 | 0.308317 -0.902104 -0.183321 731 | 0.263878 -0.868495 -0.139768 732 | 0.271684 -0.786213 -0.074689 733 | 0.251567 -0.794282 0.000400 734 | 0.296214 -0.712940 -0.073408 735 | 0.279441 -0.725121 0.001311 736 | 0.334621 -0.710959 -0.137425 737 | 0.339937 -0.593111 0.139759 738 | 0.288276 -0.650916 0.002454 739 | 0.303453 -0.666979 0.076716 740 | 0.227690 -0.851090 -0.075396 741 | 0.167498 -0.903392 -0.075595 742 | 0.198321 -0.929654 -0.140006 743 | 0.284119 -0.559263 -0.070641 744 | -0.018517 -0.186840 -0.233521 745 | 0.354954 -0.945645 -0.198938 746 | -0.058914 -0.987669 -0.139750 747 | 0.159768 -1.083920 -0.199082 748 | -0.090661 -0.269917 0.193665 749 | -0.421810 -0.376890 0.184300 750 | -0.445403 -0.619345 0.195798 751 | -0.211465 -0.139536 0.233307 752 | -0.043333 -0.187710 0.233956 753 | 0.222096 0.451650 -0.076722 754 | 0.090661 0.269917 0.193665 755 | 0.120439 0.108072 0.250093 756 | 0.205577 0.027112 0.238522 757 | 0.195223 0.374586 -0.137788 758 | -0.361271 0.523975 -0.178538 759 | -0.418420 0.511274 -0.194842 760 | -0.447104 0.621525 -0.195217 761 | -0.425054 0.383229 -0.183718 762 | -0.272482 0.461062 -0.135481 763 | 0.017565 -0.953559 -0.075407 764 | 0.254969 -0.816182 0.075505 765 | 0.145577 -0.900051 -0.000228 766 | 0.079806 -1.105340 0.199000 767 | 0.043333 0.187710 0.233956 768 | -0.435369 -0.808337 -0.198791 769 | 3 0 1 2 770 | 3 3 4 5 771 | 3 6 7 8 772 | 3 9 10 11 773 | 3 12 13 10 774 | 3 9 12 10 775 | 3 10 14 11 776 | 3 15 16 17 777 | 3 15 17 18 778 | 3 19 20 21 779 | 3 20 22 23 780 | 3 24 25 26 781 | 3 27 28 29 782 | 3 28 26 29 783 | 3 28 30 24 784 | 3 28 24 26 785 | 3 31 32 33 786 | 3 19 21 34 787 | 3 35 36 30 788 | 3 37 38 39 789 | 3 37 39 40 790 | 3 41 42 43 791 | 3 41 44 45 792 | 3 46 44 47 793 | 3 48 49 50 794 | 3 48 51 52 795 | 3 48 52 49 796 | 3 53 54 55 797 | 3 46 54 53 798 | 3 52 55 54 799 | 3 52 54 49 800 | 3 46 56 54 801 | 3 47 57 56 802 | 3 46 47 56 803 | 3 49 54 56 804 | 3 58 57 59 805 | 3 60 58 59 806 | 3 49 61 50 807 | 3 56 57 61 808 | 3 49 56 61 809 | 3 58 61 57 810 | 3 62 50 61 811 | 3 58 62 61 812 | 3 63 64 65 813 | 3 66 67 68 814 | 3 69 70 71 815 | 3 70 72 73 816 | 3 74 75 76 817 | 3 74 77 75 818 | 3 78 79 42 819 | 3 74 76 79 820 | 3 78 74 79 821 | 3 43 42 79 822 | 3 43 80 81 823 | 3 79 76 80 824 | 3 43 79 80 825 | 3 82 80 76 826 | 3 83 81 80 827 | 3 82 83 80 828 | 3 84 85 86 829 | 3 87 88 89 830 | 3 90 91 92 831 | 3 93 91 90 832 | 3 94 91 95 833 | 3 95 91 93 834 | 3 88 96 89 835 | 3 88 97 96 836 | 3 98 99 97 837 | 3 88 98 97 838 | 3 100 96 97 839 | 3 101 102 103 840 | 3 104 105 106 841 | 3 104 107 105 842 | 3 104 108 109 843 | 3 104 109 107 844 | 3 110 111 112 845 | 3 113 111 1 846 | 3 0 113 1 847 | 3 114 2 1 848 | 3 114 7 6 849 | 3 115 1 111 850 | 3 115 7 114 851 | 3 115 114 1 852 | 3 115 111 110 853 | 3 116 7 115 854 | 3 116 115 110 855 | 3 117 118 119 856 | 3 119 118 120 857 | 3 119 121 122 858 | 3 119 120 121 859 | 3 123 124 125 860 | 3 126 127 123 861 | 3 128 129 130 862 | 3 128 125 131 863 | 3 128 131 129 864 | 3 126 128 130 865 | 3 123 125 128 866 | 3 126 123 128 867 | 3 132 133 134 868 | 3 132 127 126 869 | 3 53 135 130 870 | 3 55 133 135 871 | 3 53 55 135 872 | 3 132 135 133 873 | 3 126 130 135 874 | 3 132 126 135 875 | 3 136 137 138 876 | 3 134 133 138 877 | 3 139 138 133 878 | 3 139 51 136 879 | 3 139 136 138 880 | 3 139 133 55 881 | 3 52 51 139 882 | 3 52 139 55 883 | 3 140 141 142 884 | 3 143 144 145 885 | 3 146 147 148 886 | 3 149 144 148 887 | 3 150 148 147 888 | 3 151 141 150 889 | 3 151 150 147 890 | 3 150 149 148 891 | 3 150 141 140 892 | 3 150 140 149 893 | 3 142 4 152 894 | 3 153 154 155 895 | 3 156 154 153 896 | 3 157 158 159 897 | 3 157 159 160 898 | 3 153 158 157 899 | 3 156 153 157 900 | 3 9 161 12 901 | 3 162 161 9 902 | 3 163 161 164 903 | 3 163 164 160 904 | 3 164 161 162 905 | 3 164 165 160 906 | 3 156 165 166 907 | 3 157 160 165 908 | 3 156 157 165 909 | 3 167 11 168 910 | 3 9 11 167 911 | 3 162 9 167 912 | 3 136 51 169 913 | 3 170 137 168 914 | 3 171 172 173 915 | 3 174 175 176 916 | 3 177 178 179 917 | 3 155 180 179 918 | 3 181 179 180 919 | 3 182 175 181 920 | 3 182 181 180 921 | 3 174 181 175 922 | 3 177 179 181 923 | 3 174 177 181 924 | 3 183 131 125 925 | 3 183 118 184 926 | 3 183 184 131 927 | 3 120 118 183 928 | 3 185 125 124 929 | 3 185 124 186 930 | 3 183 125 185 931 | 3 120 183 185 932 | 3 187 174 176 933 | 3 188 127 189 934 | 3 188 189 190 935 | 3 123 127 188 936 | 3 123 188 124 937 | 3 191 134 192 938 | 3 191 127 132 939 | 3 191 132 134 940 | 3 189 127 191 941 | 3 191 192 193 942 | 3 189 191 193 943 | 3 194 195 196 944 | 3 170 195 194 945 | 3 197 198 199 946 | 3 199 198 196 947 | 3 200 201 198 948 | 3 200 198 202 949 | 3 202 198 197 950 | 3 203 196 195 951 | 3 203 199 196 952 | 3 92 203 195 953 | 3 204 205 2 954 | 3 204 206 207 955 | 3 204 207 205 956 | 3 114 204 2 957 | 3 6 206 204 958 | 3 114 6 204 959 | 3 208 207 206 960 | 3 208 209 210 961 | 3 208 210 207 962 | 3 211 209 208 963 | 3 6 212 206 964 | 3 8 213 212 965 | 3 6 8 212 966 | 3 8 7 214 967 | 3 214 3 5 968 | 3 214 7 116 969 | 3 214 116 3 970 | 3 116 110 215 971 | 3 116 215 3 972 | 3 216 217 112 973 | 3 218 217 14 974 | 3 10 13 218 975 | 3 10 218 14 976 | 3 219 13 220 977 | 3 218 13 219 978 | 3 219 221 215 979 | 3 220 152 221 980 | 3 219 220 221 981 | 3 221 152 4 982 | 3 3 215 221 983 | 3 3 221 4 984 | 3 222 223 152 985 | 3 222 224 223 986 | 3 222 152 220 987 | 3 225 220 13 988 | 3 225 222 220 989 | 3 12 225 13 990 | 3 216 108 226 991 | 3 90 11 227 992 | 3 93 90 227 993 | 3 227 11 14 994 | 3 90 228 11 995 | 3 92 195 228 996 | 3 90 92 228 997 | 3 228 168 11 998 | 3 228 195 170 999 | 3 228 170 168 1000 | 3 229 230 231 1001 | 3 18 17 230 1002 | 3 229 18 230 1003 | 3 68 67 232 1004 | 3 232 230 17 1005 | 3 233 234 235 1006 | 3 236 234 237 1007 | 3 238 231 239 1008 | 3 237 234 238 1009 | 3 237 238 239 1010 | 3 238 229 231 1011 | 3 238 234 233 1012 | 3 238 233 229 1013 | 3 240 239 231 1014 | 3 69 71 240 1015 | 3 237 239 241 1016 | 3 242 243 241 1017 | 3 244 245 246 1018 | 3 247 248 249 1019 | 3 247 250 251 1020 | 3 247 251 248 1021 | 3 252 67 66 1022 | 3 252 72 70 1023 | 3 69 67 252 1024 | 3 69 252 70 1025 | 3 252 253 72 1026 | 3 66 254 253 1027 | 3 252 66 253 1028 | 3 255 253 254 1029 | 3 256 72 253 1030 | 3 255 256 253 1031 | 3 257 258 259 1032 | 3 260 22 261 1033 | 3 260 23 22 1034 | 3 262 29 26 1035 | 3 263 29 262 1036 | 3 264 263 262 1037 | 3 265 25 23 1038 | 3 260 266 265 1039 | 3 260 265 23 1040 | 3 265 266 267 1041 | 3 268 269 270 1042 | 3 271 272 273 1043 | 3 274 272 268 1044 | 3 275 276 277 1045 | 3 273 272 275 1046 | 3 273 275 277 1047 | 3 275 272 274 1048 | 3 278 37 40 1049 | 3 278 279 37 1050 | 3 280 281 282 1051 | 3 283 281 145 1052 | 3 284 282 281 1053 | 3 283 284 281 1054 | 3 285 286 261 1055 | 3 287 286 285 1056 | 3 288 289 290 1057 | 3 287 291 292 1058 | 3 287 293 286 1059 | 3 292 276 293 1060 | 3 287 292 293 1061 | 3 258 286 293 1062 | 3 258 294 259 1063 | 3 293 276 294 1064 | 3 258 293 294 1065 | 3 275 294 276 1066 | 3 274 259 294 1067 | 3 275 274 294 1068 | 3 295 296 27 1069 | 3 297 298 299 1070 | 3 300 301 302 1071 | 3 303 301 254 1072 | 3 66 303 254 1073 | 3 68 304 303 1074 | 3 66 68 303 1075 | 3 305 17 16 1076 | 3 68 305 304 1077 | 3 232 17 305 1078 | 3 68 232 305 1079 | 3 306 304 305 1080 | 3 306 305 16 1081 | 3 307 308 309 1082 | 3 307 304 306 1083 | 3 310 308 307 1084 | 3 310 307 306 1085 | 3 27 29 311 1086 | 3 295 27 311 1087 | 3 311 29 312 1088 | 3 313 311 312 1089 | 3 15 314 315 1090 | 3 15 315 16 1091 | 3 315 314 316 1092 | 3 315 316 313 1093 | 3 229 317 18 1094 | 3 233 317 229 1095 | 3 318 18 317 1096 | 3 318 314 15 1097 | 3 318 15 18 1098 | 3 318 317 319 1099 | 3 320 314 318 1100 | 3 320 318 319 1101 | 3 310 321 312 1102 | 3 306 16 321 1103 | 3 310 306 321 1104 | 3 315 321 16 1105 | 3 313 312 321 1106 | 3 315 313 321 1107 | 3 322 30 36 1108 | 3 24 30 322 1109 | 3 323 23 25 1110 | 3 323 21 20 1111 | 3 323 20 23 1112 | 3 24 323 25 1113 | 3 322 21 323 1114 | 3 24 322 323 1115 | 3 285 324 325 1116 | 3 261 22 324 1117 | 3 285 261 324 1118 | 3 31 325 324 1119 | 3 326 324 22 1120 | 3 326 32 31 1121 | 3 326 31 324 1122 | 3 326 22 20 1123 | 3 19 32 326 1124 | 3 19 326 20 1125 | 3 327 30 28 1126 | 3 27 296 327 1127 | 3 27 327 28 1128 | 3 327 35 30 1129 | 3 251 328 248 1130 | 3 251 329 328 1131 | 3 329 330 331 1132 | 3 332 86 330 1133 | 3 332 250 84 1134 | 3 332 84 86 1135 | 3 332 330 329 1136 | 3 251 250 332 1137 | 3 251 332 329 1138 | 3 333 331 325 1139 | 3 333 328 329 1140 | 3 333 329 331 1141 | 3 31 333 325 1142 | 3 33 328 333 1143 | 3 31 33 333 1144 | 3 334 197 199 1145 | 3 335 336 334 1146 | 3 337 338 99 1147 | 3 337 335 338 1148 | 3 94 99 338 1149 | 3 40 39 339 1150 | 3 339 39 340 1151 | 3 340 39 36 1152 | 3 35 340 36 1153 | 3 341 299 298 1154 | 3 341 342 299 1155 | 3 337 343 335 1156 | 3 336 343 341 1157 | 3 335 343 336 1158 | 3 341 343 342 1159 | 3 344 343 337 1160 | 3 342 343 344 1161 | 3 33 32 345 1162 | 3 345 346 347 1163 | 3 348 39 38 1164 | 3 34 21 348 1165 | 3 34 348 38 1166 | 3 322 348 21 1167 | 3 36 39 348 1168 | 3 322 36 348 1169 | 3 345 32 349 1170 | 3 345 349 346 1171 | 3 349 32 19 1172 | 3 349 19 34 1173 | 3 350 279 143 1174 | 3 350 351 352 1175 | 3 37 279 353 1176 | 3 37 353 38 1177 | 3 353 279 350 1178 | 3 353 350 352 1179 | 3 349 354 346 1180 | 3 34 38 354 1181 | 3 349 34 354 1182 | 3 353 354 38 1183 | 3 352 346 354 1184 | 3 353 352 354 1185 | 3 146 355 147 1186 | 3 356 357 358 1187 | 3 359 358 357 1188 | 3 360 361 357 1189 | 3 356 360 357 1190 | 3 362 361 360 1191 | 3 363 362 360 1192 | 3 356 364 360 1193 | 3 365 366 364 1194 | 3 365 364 356 1195 | 3 367 364 366 1196 | 3 363 360 364 1197 | 3 363 364 367 1198 | 3 363 368 362 1199 | 3 369 368 370 1200 | 3 369 351 280 1201 | 3 362 371 361 1202 | 3 372 361 371 1203 | 3 373 130 129 1204 | 3 45 44 373 1205 | 3 45 373 129 1206 | 3 373 53 130 1207 | 3 373 44 46 1208 | 3 373 46 53 1209 | 3 184 374 375 1210 | 3 45 129 375 1211 | 3 184 375 131 1212 | 3 131 375 129 1213 | 3 236 376 377 1214 | 3 377 376 378 1215 | 3 117 378 376 1216 | 3 119 122 378 1217 | 3 117 119 378 1218 | 3 377 379 380 1219 | 3 378 122 379 1220 | 3 377 378 379 1221 | 3 171 379 122 1222 | 3 173 380 379 1223 | 3 171 173 379 1224 | 3 381 380 382 1225 | 3 235 234 381 1226 | 3 235 381 382 1227 | 3 381 377 380 1228 | 3 381 234 236 1229 | 3 381 236 377 1230 | 3 383 384 385 1231 | 3 386 387 388 1232 | 3 386 389 390 1233 | 3 391 387 392 1234 | 3 391 392 393 1235 | 3 392 387 386 1236 | 3 392 386 390 1237 | 3 320 394 395 1238 | 3 319 393 394 1239 | 3 320 319 394 1240 | 3 392 394 393 1241 | 3 390 395 394 1242 | 3 392 390 394 1243 | 3 319 317 396 1244 | 3 319 396 393 1245 | 3 233 396 317 1246 | 3 233 235 396 1247 | 3 397 398 399 1248 | 3 63 400 399 1249 | 3 401 399 398 1250 | 3 401 64 63 1251 | 3 401 63 399 1252 | 3 401 398 402 1253 | 3 383 385 403 1254 | 3 402 398 403 1255 | 3 396 404 393 1256 | 3 235 404 396 1257 | 3 391 393 404 1258 | 3 235 382 404 1259 | 3 391 404 405 1260 | 3 405 404 382 1261 | 3 388 406 407 1262 | 3 388 387 408 1263 | 3 388 408 406 1264 | 3 409 405 410 1265 | 3 409 387 391 1266 | 3 409 391 405 1267 | 3 409 410 411 1268 | 3 408 387 409 1269 | 3 408 409 411 1270 | 3 182 180 412 1271 | 3 413 414 412 1272 | 3 415 172 171 1273 | 3 415 175 182 1274 | 3 416 412 414 1275 | 3 417 172 416 1276 | 3 417 416 414 1277 | 3 416 182 412 1278 | 3 416 172 415 1279 | 3 416 415 182 1280 | 3 418 419 420 1281 | 3 417 414 420 1282 | 3 421 374 422 1283 | 3 78 42 421 1284 | 3 74 423 77 1285 | 3 424 423 242 1286 | 3 77 423 424 1287 | 3 78 423 74 1288 | 3 47 44 425 1289 | 3 425 43 81 1290 | 3 425 44 41 1291 | 3 425 41 43 1292 | 3 48 50 426 1293 | 3 169 51 427 1294 | 3 169 427 428 1295 | 3 427 51 48 1296 | 3 427 48 426 1297 | 3 429 430 431 1298 | 3 418 420 430 1299 | 3 429 418 430 1300 | 3 430 420 414 1301 | 3 413 431 430 1302 | 3 413 430 414 1303 | 3 432 433 431 1304 | 3 432 431 413 1305 | 3 434 412 180 1306 | 3 155 154 434 1307 | 3 155 434 180 1308 | 3 434 413 412 1309 | 3 434 154 432 1310 | 3 434 432 413 1311 | 3 418 435 419 1312 | 3 435 60 436 1313 | 3 418 437 435 1314 | 3 60 437 58 1315 | 3 435 437 60 1316 | 3 58 437 62 1317 | 3 429 437 418 1318 | 3 62 437 429 1319 | 3 60 59 438 1320 | 3 60 438 436 1321 | 3 439 438 59 1322 | 3 83 439 81 1323 | 3 440 438 439 1324 | 3 83 440 439 1325 | 3 47 441 57 1326 | 3 425 81 441 1327 | 3 47 425 441 1328 | 3 439 441 81 1329 | 3 59 57 441 1330 | 3 439 59 441 1331 | 3 442 76 75 1332 | 3 443 444 442 1333 | 3 443 442 75 1334 | 3 445 442 444 1335 | 3 82 76 442 1336 | 3 445 82 442 1337 | 3 446 447 300 1338 | 3 448 447 446 1339 | 3 449 450 451 1340 | 3 448 452 451 1341 | 3 453 451 450 1342 | 3 453 447 448 1343 | 3 453 448 451 1344 | 3 453 450 454 1345 | 3 455 447 453 1346 | 3 455 453 454 1347 | 3 456 450 449 1348 | 3 457 456 449 1349 | 3 63 458 400 1350 | 3 63 65 458 1351 | 3 456 459 450 1352 | 3 460 400 459 1353 | 3 456 460 459 1354 | 3 458 459 400 1355 | 3 454 450 459 1356 | 3 458 454 459 1357 | 3 461 72 256 1358 | 3 65 64 461 1359 | 3 65 461 256 1360 | 3 461 73 72 1361 | 3 461 64 462 1362 | 3 461 462 73 1363 | 3 463 402 444 1364 | 3 463 64 401 1365 | 3 463 401 402 1366 | 3 463 444 443 1367 | 3 462 64 463 1368 | 3 462 463 443 1369 | 3 464 71 70 1370 | 3 464 70 73 1371 | 3 424 71 464 1372 | 3 77 424 464 1373 | 3 77 465 75 1374 | 3 464 73 465 1375 | 3 77 464 465 1376 | 3 462 465 73 1377 | 3 443 75 465 1378 | 3 462 443 465 1379 | 3 440 466 438 1380 | 3 467 407 466 1381 | 3 440 467 466 1382 | 3 466 407 406 1383 | 3 436 438 466 1384 | 3 436 466 406 1385 | 3 467 468 469 1386 | 3 445 468 82 1387 | 3 469 468 445 1388 | 3 82 468 83 1389 | 3 440 468 467 1390 | 3 83 468 440 1391 | 3 470 246 245 1392 | 3 84 250 470 1393 | 3 471 472 85 1394 | 3 471 245 473 1395 | 3 471 473 472 1396 | 3 84 471 85 1397 | 3 470 245 471 1398 | 3 84 470 471 1399 | 3 207 474 205 1400 | 3 210 474 207 1401 | 3 475 205 474 1402 | 3 210 472 474 1403 | 3 475 474 473 1404 | 3 473 474 472 1405 | 3 292 291 476 1406 | 3 476 290 477 1407 | 3 476 291 288 1408 | 3 476 288 290 1409 | 3 292 478 276 1410 | 3 476 477 478 1411 | 3 292 476 478 1412 | 3 479 478 477 1413 | 3 277 276 478 1414 | 3 479 277 478 1415 | 3 480 86 85 1416 | 3 481 289 480 1417 | 3 482 85 472 1418 | 3 210 209 482 1419 | 3 210 482 472 1420 | 3 482 480 85 1421 | 3 482 209 481 1422 | 3 482 481 480 1423 | 3 288 291 483 1424 | 3 483 331 330 1425 | 3 355 484 147 1426 | 3 151 147 484 1427 | 3 485 484 355 1428 | 3 486 485 355 1429 | 3 485 487 484 1430 | 3 485 87 487 1431 | 3 98 488 489 1432 | 3 486 488 485 1433 | 3 489 488 486 1434 | 3 485 488 87 1435 | 3 88 488 98 1436 | 3 87 488 88 1437 | 3 87 490 487 1438 | 3 89 491 490 1439 | 3 87 89 490 1440 | 3 492 490 491 1441 | 3 493 487 490 1442 | 3 492 493 490 1443 | 3 494 495 496 1444 | 3 494 96 100 1445 | 3 497 91 94 1446 | 3 497 94 338 1447 | 3 92 91 497 1448 | 3 92 497 203 1449 | 3 498 14 217 1450 | 3 498 227 14 1451 | 3 216 498 217 1452 | 3 216 226 498 1453 | 3 93 227 499 1454 | 3 498 499 227 1455 | 3 226 500 499 1456 | 3 226 499 498 1457 | 3 501 502 503 1458 | 3 501 499 500 1459 | 3 501 500 502 1460 | 3 95 501 503 1461 | 3 93 499 501 1462 | 3 95 93 501 1463 | 3 94 504 99 1464 | 3 95 503 504 1465 | 3 94 95 504 1466 | 3 100 504 503 1467 | 3 97 99 504 1468 | 3 100 97 504 1469 | 3 505 108 104 1470 | 3 505 104 106 1471 | 3 226 108 505 1472 | 3 226 505 500 1473 | 3 505 106 506 1474 | 3 507 506 508 1475 | 3 508 506 106 1476 | 3 500 506 502 1477 | 3 505 506 500 1478 | 3 507 502 506 1479 | 3 509 503 502 1480 | 3 507 495 509 1481 | 3 507 509 502 1482 | 3 509 100 503 1483 | 3 509 495 494 1484 | 3 509 494 100 1485 | 3 146 510 355 1486 | 3 278 40 510 1487 | 3 278 510 146 1488 | 3 486 355 510 1489 | 3 511 510 40 1490 | 3 511 40 339 1491 | 3 486 510 511 1492 | 3 489 486 511 1493 | 3 337 99 512 1494 | 3 344 337 512 1495 | 3 98 512 99 1496 | 3 98 489 512 1497 | 3 109 113 513 1498 | 3 109 513 107 1499 | 3 0 513 113 1500 | 3 101 513 0 1501 | 3 107 513 514 1502 | 3 101 514 513 1503 | 3 103 515 514 1504 | 3 101 103 514 1505 | 3 516 517 518 1506 | 3 519 520 521 1507 | 3 522 515 520 1508 | 3 519 522 520 1509 | 3 517 521 520 1510 | 3 523 473 245 1511 | 3 523 102 475 1512 | 3 523 475 473 1513 | 3 523 245 244 1514 | 3 103 102 524 1515 | 3 524 244 518 1516 | 3 524 102 523 1517 | 3 524 523 244 1518 | 3 525 2 205 1519 | 3 475 102 525 1520 | 3 475 525 205 1521 | 3 525 0 2 1522 | 3 525 102 101 1523 | 3 525 101 0 1524 | 3 526 111 113 1525 | 3 109 108 526 1526 | 3 109 526 113 1527 | 3 526 112 111 1528 | 3 526 108 216 1529 | 3 526 216 112 1530 | 3 527 243 422 1531 | 3 117 376 527 1532 | 3 528 422 374 1533 | 3 184 118 528 1534 | 3 184 528 374 1535 | 3 528 527 422 1536 | 3 528 118 117 1537 | 3 528 117 527 1538 | 3 120 529 121 1539 | 3 185 186 529 1540 | 3 120 185 529 1541 | 3 187 529 186 1542 | 3 176 121 529 1543 | 3 187 176 529 1544 | 3 415 530 175 1545 | 3 171 122 530 1546 | 3 415 171 530 1547 | 3 530 122 121 1548 | 3 176 175 530 1549 | 3 176 530 121 1550 | 3 169 428 531 1551 | 3 162 167 531 1552 | 3 532 168 137 1553 | 3 532 531 167 1554 | 3 532 167 168 1555 | 3 136 532 137 1556 | 3 169 531 532 1557 | 3 136 169 532 1558 | 3 533 138 137 1559 | 3 533 192 134 1560 | 3 533 134 138 1561 | 3 170 533 137 1562 | 3 194 192 533 1563 | 3 170 194 533 1564 | 3 534 141 151 1565 | 3 534 535 536 1566 | 3 534 537 535 1567 | 3 151 484 537 1568 | 3 534 151 537 1569 | 3 537 484 487 1570 | 3 493 535 537 1571 | 3 493 537 487 1572 | 3 142 152 538 1573 | 3 140 142 538 1574 | 3 283 145 539 1575 | 3 540 283 539 1576 | 3 539 145 144 1577 | 3 149 539 144 1578 | 3 541 542 538 1579 | 3 540 539 542 1580 | 3 540 542 541 1581 | 3 149 542 539 1582 | 3 140 538 542 1583 | 3 140 542 149 1584 | 3 536 535 543 1585 | 3 544 213 543 1586 | 3 545 5 4 1587 | 3 142 141 545 1588 | 3 142 545 4 1589 | 3 545 536 5 1590 | 3 545 141 534 1591 | 3 545 534 536 1592 | 3 283 546 284 1593 | 3 547 546 548 1594 | 3 284 546 547 1595 | 3 540 546 283 1596 | 3 549 148 144 1597 | 3 143 279 549 1598 | 3 143 549 144 1599 | 3 549 146 148 1600 | 3 549 279 278 1601 | 3 549 278 146 1602 | 3 267 550 551 1603 | 3 264 262 551 1604 | 3 257 259 552 1605 | 3 553 554 555 1606 | 3 553 555 556 1607 | 3 263 557 558 1608 | 3 559 557 560 1609 | 3 558 557 559 1610 | 3 264 557 263 1611 | 3 560 557 561 1612 | 3 560 561 562 1613 | 3 561 557 264 1614 | 3 561 563 562 1615 | 3 555 563 556 1616 | 3 564 562 563 1617 | 3 555 564 563 1618 | 3 565 266 257 1619 | 3 565 257 552 1620 | 3 267 266 565 1621 | 3 267 565 550 1622 | 3 564 566 567 1623 | 3 564 567 562 1624 | 3 547 567 566 1625 | 3 547 548 567 1626 | 3 560 562 568 1627 | 3 567 568 562 1628 | 3 548 568 567 1629 | 3 548 569 568 1630 | 3 224 570 223 1631 | 3 571 572 570 1632 | 3 224 571 570 1633 | 3 573 570 572 1634 | 3 574 223 570 1635 | 3 573 574 570 1636 | 3 573 575 574 1637 | 3 576 152 223 1638 | 3 574 576 223 1639 | 3 538 152 576 1640 | 3 541 538 576 1641 | 3 577 426 50 1642 | 3 577 431 433 1643 | 3 577 433 426 1644 | 3 62 577 50 1645 | 3 429 431 577 1646 | 3 62 429 577 1647 | 3 578 154 156 1648 | 3 578 156 166 1649 | 3 432 154 578 1650 | 3 432 578 433 1651 | 3 448 579 452 1652 | 3 448 446 579 1653 | 3 580 581 582 1654 | 3 583 452 581 1655 | 3 580 583 581 1656 | 3 579 581 452 1657 | 3 584 582 581 1658 | 3 579 584 581 1659 | 3 585 178 586 1660 | 3 587 585 586 1661 | 3 588 586 178 1662 | 3 177 588 178 1663 | 3 588 589 586 1664 | 3 588 590 589 1665 | 3 153 591 158 1666 | 3 155 179 591 1667 | 3 153 155 591 1668 | 3 591 179 178 1669 | 3 585 158 591 1670 | 3 585 591 178 1671 | 3 592 159 158 1672 | 3 592 593 594 1673 | 3 592 594 159 1674 | 3 592 158 585 1675 | 3 587 593 592 1676 | 3 587 592 585 1677 | 3 595 596 597 1678 | 3 163 596 595 1679 | 3 163 160 596 1680 | 3 159 596 160 1681 | 3 594 596 159 1682 | 3 594 597 596 1683 | 3 598 161 163 1684 | 3 598 163 595 1685 | 3 12 161 598 1686 | 3 12 598 225 1687 | 3 599 166 165 1688 | 3 599 531 428 1689 | 3 599 428 166 1690 | 3 164 599 165 1691 | 3 162 531 599 1692 | 3 164 162 599 1693 | 3 600 200 202 1694 | 3 600 202 601 1695 | 3 457 449 601 1696 | 3 602 451 452 1697 | 3 602 601 449 1698 | 3 602 449 451 1699 | 3 583 602 452 1700 | 3 600 601 602 1701 | 3 583 600 602 1702 | 3 603 172 417 1703 | 3 173 172 603 1704 | 3 604 420 419 1705 | 3 411 410 604 1706 | 3 411 604 419 1707 | 3 603 604 410 1708 | 3 417 420 604 1709 | 3 603 417 604 1710 | 3 605 382 380 1711 | 3 605 410 405 1712 | 3 605 405 382 1713 | 3 173 605 380 1714 | 3 603 410 605 1715 | 3 173 603 605 1716 | 3 590 606 607 1717 | 3 606 187 186 1718 | 3 177 608 588 1719 | 3 590 608 606 1720 | 3 588 608 590 1721 | 3 606 608 187 1722 | 3 174 608 177 1723 | 3 187 608 174 1724 | 3 188 190 609 1725 | 3 606 609 607 1726 | 3 607 609 190 1727 | 3 124 609 186 1728 | 3 188 609 124 1729 | 3 606 186 609 1730 | 3 200 610 201 1731 | 3 590 607 611 1732 | 3 590 611 589 1733 | 3 612 611 607 1734 | 3 612 607 190 1735 | 3 613 611 612 1736 | 3 610 613 612 1737 | 3 189 614 190 1738 | 3 193 201 614 1739 | 3 189 193 614 1740 | 3 610 614 201 1741 | 3 612 190 614 1742 | 3 610 612 614 1743 | 3 615 198 201 1744 | 3 193 192 615 1745 | 3 193 615 201 1746 | 3 194 615 192 1747 | 3 196 198 615 1748 | 3 194 196 615 1749 | 3 616 617 618 1750 | 3 616 389 384 1751 | 3 383 617 616 1752 | 3 383 616 384 1753 | 3 616 619 389 1754 | 3 616 618 619 1755 | 3 390 389 619 1756 | 3 390 619 395 1757 | 3 620 298 621 1758 | 3 622 620 621 1759 | 3 297 296 623 1760 | 3 623 296 295 1761 | 3 297 624 298 1762 | 3 623 625 624 1763 | 3 297 623 624 1764 | 3 626 624 625 1765 | 3 621 298 624 1766 | 3 626 621 624 1767 | 3 627 601 202 1768 | 3 627 202 197 1769 | 3 457 601 627 1770 | 3 628 457 627 1771 | 3 341 298 629 1772 | 3 336 341 629 1773 | 3 620 629 298 1774 | 3 620 628 629 1775 | 3 630 631 632 1776 | 3 633 634 635 1777 | 3 630 636 631 1778 | 3 269 631 636 1779 | 3 637 636 358 1780 | 3 637 270 269 1781 | 3 637 269 636 1782 | 3 359 637 358 1783 | 3 632 631 638 1784 | 3 271 634 638 1785 | 3 639 638 631 1786 | 3 639 272 271 1787 | 3 639 271 638 1788 | 3 639 631 269 1789 | 3 268 272 639 1790 | 3 268 639 269 1791 | 3 640 635 634 1792 | 3 640 641 635 1793 | 3 271 640 634 1794 | 3 271 273 640 1795 | 3 642 643 644 1796 | 3 645 642 641 1797 | 3 646 209 211 1798 | 3 481 209 646 1799 | 3 647 648 649 1800 | 3 650 649 648 1801 | 3 651 652 649 1802 | 3 650 651 649 1803 | 3 646 653 652 1804 | 3 211 654 653 1805 | 3 646 211 653 1806 | 3 647 653 654 1807 | 3 649 652 653 1808 | 3 647 649 653 1809 | 3 642 655 643 1810 | 3 650 655 651 1811 | 3 643 655 650 1812 | 3 645 655 642 1813 | 3 651 655 656 1814 | 3 656 479 477 1815 | 3 656 655 645 1816 | 3 656 645 479 1817 | 3 657 206 212 1818 | 3 211 657 654 1819 | 3 208 206 657 1820 | 3 211 208 657 1821 | 3 658 659 648 1822 | 3 658 648 647 1823 | 3 544 660 661 1824 | 3 661 647 654 1825 | 3 661 660 658 1826 | 3 661 658 647 1827 | 3 657 662 654 1828 | 3 212 213 662 1829 | 3 657 212 662 1830 | 3 544 662 213 1831 | 3 661 654 662 1832 | 3 544 661 662 1833 | 3 8 663 213 1834 | 3 214 5 663 1835 | 3 8 214 663 1836 | 3 536 663 5 1837 | 3 543 213 663 1838 | 3 536 543 663 1839 | 3 664 112 217 1840 | 3 664 215 110 1841 | 3 664 110 112 1842 | 3 218 664 217 1843 | 3 219 215 664 1844 | 3 218 219 664 1845 | 3 573 665 575 1846 | 3 300 302 666 1847 | 3 446 300 666 1848 | 3 667 302 572 1849 | 3 571 667 572 1850 | 3 666 302 667 1851 | 3 668 666 667 1852 | 3 669 231 230 1853 | 3 232 67 669 1854 | 3 232 669 230 1855 | 3 669 240 231 1856 | 3 669 67 69 1857 | 3 669 69 240 1858 | 3 670 241 239 1859 | 3 240 71 670 1860 | 3 240 670 239 1861 | 3 424 670 71 1862 | 3 242 241 670 1863 | 3 424 242 670 1864 | 3 671 422 243 1865 | 3 242 423 671 1866 | 3 242 671 243 1867 | 3 671 421 422 1868 | 3 671 423 78 1869 | 3 671 78 421 1870 | 3 236 672 376 1871 | 3 237 241 672 1872 | 3 236 237 672 1873 | 3 672 241 243 1874 | 3 527 376 672 1875 | 3 527 672 243 1876 | 3 673 674 516 1877 | 3 673 675 366 1878 | 3 365 674 673 1879 | 3 365 673 366 1880 | 3 244 676 518 1881 | 3 246 675 676 1882 | 3 244 246 676 1883 | 3 673 676 675 1884 | 3 516 518 676 1885 | 3 673 516 676 1886 | 3 248 328 677 1887 | 3 33 677 328 1888 | 3 345 347 677 1889 | 3 33 345 677 1890 | 3 678 675 246 1891 | 3 470 250 678 1892 | 3 470 678 246 1893 | 3 678 250 247 1894 | 3 678 679 675 1895 | 3 247 249 679 1896 | 3 678 247 679 1897 | 3 367 679 249 1898 | 3 366 675 679 1899 | 3 367 366 679 1900 | 3 680 254 301 1901 | 3 300 447 680 1902 | 3 300 680 301 1903 | 3 680 255 254 1904 | 3 680 447 455 1905 | 3 680 455 255 1906 | 3 255 681 256 1907 | 3 455 454 681 1908 | 3 455 681 255 1909 | 3 458 681 454 1910 | 3 65 256 681 1911 | 3 65 681 458 1912 | 3 682 261 286 1913 | 3 682 266 260 1914 | 3 682 260 261 1915 | 3 682 286 258 1916 | 3 257 266 682 1917 | 3 257 682 258 1918 | 3 263 683 29 1919 | 3 558 308 683 1920 | 3 263 558 683 1921 | 3 683 312 29 1922 | 3 683 308 310 1923 | 3 683 310 312 1924 | 3 684 26 25 1925 | 3 684 551 262 1926 | 3 684 262 26 1927 | 3 265 684 25 1928 | 3 267 551 684 1929 | 3 265 267 684 1930 | 3 685 325 331 1931 | 3 483 291 685 1932 | 3 483 685 331 1933 | 3 685 285 325 1934 | 3 685 291 287 1935 | 3 685 287 285 1936 | 3 686 552 259 1937 | 3 686 270 687 1938 | 3 686 687 552 1939 | 3 274 686 259 1940 | 3 268 270 686 1941 | 3 274 268 686 1942 | 3 688 687 270 1943 | 3 688 554 553 1944 | 3 688 553 687 1945 | 3 688 270 637 1946 | 3 359 554 688 1947 | 3 359 688 637 1948 | 3 689 357 361 1949 | 3 689 554 359 1950 | 3 689 359 357 1951 | 3 689 361 372 1952 | 3 690 372 566 1953 | 3 690 554 689 1954 | 3 690 689 372 1955 | 3 690 566 564 1956 | 3 555 554 690 1957 | 3 555 690 564 1958 | 3 691 371 282 1959 | 3 691 566 372 1960 | 3 691 372 371 1961 | 3 284 691 282 1962 | 3 547 566 691 1963 | 3 284 547 691 1964 | 3 692 145 281 1965 | 3 280 351 692 1966 | 3 280 692 281 1967 | 3 350 692 351 1968 | 3 143 145 692 1969 | 3 350 143 692 1970 | 3 481 693 289 1971 | 3 646 652 693 1972 | 3 481 646 693 1973 | 3 290 289 693 1974 | 3 316 314 694 1975 | 3 316 694 695 1976 | 3 694 314 320 1977 | 3 694 320 395 1978 | 3 295 311 696 1979 | 3 313 696 311 1980 | 3 316 695 696 1981 | 3 316 696 313 1982 | 3 697 296 297 1983 | 3 697 297 299 1984 | 3 327 296 697 1985 | 3 327 697 35 1986 | 3 698 572 302 1987 | 3 698 665 573 1988 | 3 698 573 572 1989 | 3 698 302 309 1990 | 3 699 309 308 1991 | 3 699 665 698 1992 | 3 699 698 309 1993 | 3 558 699 308 1994 | 3 559 665 699 1995 | 3 558 559 699 1996 | 3 307 700 304 1997 | 3 309 302 700 1998 | 3 307 309 700 1999 | 3 700 302 301 2000 | 3 303 304 700 2001 | 3 303 700 301 2002 | 3 334 701 197 2003 | 3 336 629 701 2004 | 3 336 701 334 2005 | 3 628 701 629 2006 | 3 627 197 701 2007 | 3 628 627 701 2008 | 3 335 702 338 2009 | 3 334 199 702 2010 | 3 335 334 702 2011 | 3 203 702 199 2012 | 3 497 338 702 2013 | 3 497 702 203 2014 | 3 703 339 340 2015 | 3 342 344 703 2016 | 3 342 704 299 2017 | 3 703 340 704 2018 | 3 342 703 704 2019 | 3 35 704 340 2020 | 3 697 299 704 2021 | 3 697 704 35 2022 | 3 705 358 636 2023 | 3 630 674 705 2024 | 3 630 705 636 2025 | 3 705 356 358 2026 | 3 705 674 365 2027 | 3 705 365 356 2028 | 3 369 706 351 2029 | 3 370 347 706 2030 | 3 369 370 706 2031 | 3 706 347 346 2032 | 3 352 351 706 2033 | 3 352 706 346 2034 | 3 370 368 707 2035 | 3 707 367 249 2036 | 3 707 368 363 2037 | 3 707 363 367 2038 | 3 708 282 371 2039 | 3 362 368 708 2040 | 3 362 708 371 2041 | 3 708 280 282 2042 | 3 708 368 369 2043 | 3 708 369 280 2044 | 3 709 375 374 2045 | 3 421 42 709 2046 | 3 421 709 374 2047 | 3 41 709 42 2048 | 3 45 375 709 2049 | 3 41 45 709 2050 | 3 710 403 385 2051 | 3 710 444 402 2052 | 3 710 402 403 2053 | 3 469 710 385 2054 | 3 445 444 710 2055 | 3 469 445 710 2056 | 3 384 711 385 2057 | 3 467 711 407 2058 | 3 469 385 711 2059 | 3 467 469 711 2060 | 3 712 398 397 2061 | 3 713 617 712 2062 | 3 713 712 397 2063 | 3 712 403 398 2064 | 3 712 617 383 2065 | 3 712 383 403 2066 | 3 714 407 711 2067 | 3 384 389 714 2068 | 3 384 714 711 2069 | 3 386 714 389 2070 | 3 388 407 714 2071 | 3 386 388 714 2072 | 3 715 399 400 2073 | 3 715 397 399 2074 | 3 460 715 400 2075 | 3 460 622 715 2076 | 3 408 716 406 2077 | 3 411 419 716 2078 | 3 408 411 716 2079 | 3 435 716 419 2080 | 3 436 406 716 2081 | 3 435 436 716 2082 | 3 427 717 428 2083 | 3 428 717 166 2084 | 3 578 166 717 2085 | 3 427 426 717 2086 | 3 433 717 426 2087 | 3 578 717 433 2088 | 3 668 718 666 2089 | 3 719 584 718 2090 | 3 719 718 668 2091 | 3 579 718 584 2092 | 3 446 666 718 2093 | 3 446 718 579 2094 | 3 589 720 586 2095 | 3 587 586 720 2096 | 3 721 720 582 2097 | 3 721 593 587 2098 | 3 721 587 720 2099 | 3 721 582 584 2100 | 3 719 593 721 2101 | 3 719 721 584 2102 | 3 620 722 628 2103 | 3 457 722 456 2104 | 3 628 722 457 2105 | 3 456 722 460 2106 | 3 622 722 620 2107 | 3 460 722 622 2108 | 3 479 723 277 2109 | 3 645 641 723 2110 | 3 645 723 479 2111 | 3 640 723 641 2112 | 3 273 277 723 2113 | 3 273 723 640 2114 | 3 724 330 86 2115 | 3 480 289 724 2116 | 3 480 724 86 2117 | 3 288 724 289 2118 | 3 483 330 724 2119 | 3 288 483 724 2120 | 3 725 106 105 2121 | 3 725 726 508 2122 | 3 725 508 106 2123 | 3 727 725 105 2124 | 3 728 726 725 2125 | 3 727 728 725 2126 | 3 729 644 730 2127 | 3 643 730 644 2128 | 3 731 730 732 2129 | 3 496 495 731 2130 | 3 496 731 732 2131 | 3 731 729 730 2132 | 3 733 508 726 2133 | 3 733 495 507 2134 | 3 733 507 508 2135 | 3 733 726 729 2136 | 3 731 495 733 2137 | 3 731 733 729 2138 | 3 734 543 535 2139 | 3 734 660 544 2140 | 3 734 544 543 2141 | 3 734 535 493 2142 | 3 492 660 734 2143 | 3 492 734 493 2144 | 3 496 732 735 2145 | 3 659 735 732 2146 | 3 736 735 659 2147 | 3 658 660 736 2148 | 3 658 736 659 2149 | 3 736 491 735 2150 | 3 736 660 492 2151 | 3 736 492 491 2152 | 3 729 726 737 2153 | 3 729 737 644 2154 | 3 728 737 726 2155 | 3 728 738 737 2156 | 3 738 633 635 2157 | 3 522 739 727 2158 | 3 728 739 738 2159 | 3 727 739 728 2160 | 3 738 739 633 2161 | 3 519 739 522 2162 | 3 633 739 519 2163 | 3 740 735 491 2164 | 3 89 96 740 2165 | 3 89 740 491 2166 | 3 494 740 96 2167 | 3 496 735 740 2168 | 3 494 496 740 2169 | 3 703 741 339 2170 | 3 344 512 741 2171 | 3 344 741 703 2172 | 3 489 741 512 2173 | 3 511 339 741 2174 | 3 489 511 741 2175 | 3 107 742 105 2176 | 3 514 515 742 2177 | 3 107 514 742 2178 | 3 522 742 515 2179 | 3 727 105 742 2180 | 3 522 727 742 2181 | 3 743 632 521 2182 | 3 743 674 630 2183 | 3 743 630 632 2184 | 3 743 521 517 2185 | 3 516 674 743 2186 | 3 516 743 517 2187 | 3 103 744 515 2188 | 3 524 518 744 2189 | 3 103 524 744 2190 | 3 517 744 518 2191 | 3 520 515 744 2192 | 3 517 520 744 2193 | 3 548 546 745 2194 | 3 548 745 569 2195 | 3 745 546 540 2196 | 3 745 540 541 2197 | 3 746 556 563 2198 | 3 746 551 550 2199 | 3 746 550 556 2200 | 3 561 746 563 2201 | 3 264 551 746 2202 | 3 561 264 746 2203 | 3 565 552 747 2204 | 3 687 747 552 2205 | 3 553 747 687 2206 | 3 565 747 550 2207 | 3 550 747 556 2208 | 3 553 556 747 2209 | 3 748 568 569 2210 | 3 575 665 748 2211 | 3 575 748 569 2212 | 3 559 748 665 2213 | 3 560 568 748 2214 | 3 559 560 748 2215 | 3 574 749 576 2216 | 3 575 569 749 2217 | 3 575 749 574 2218 | 3 745 749 569 2219 | 3 541 576 749 2220 | 3 745 541 749 2221 | 3 750 582 720 2222 | 3 589 611 750 2223 | 3 589 750 720 2224 | 3 613 750 611 2225 | 3 580 582 750 2226 | 3 613 580 750 2227 | 3 594 593 751 2228 | 3 594 751 597 2229 | 3 751 593 719 2230 | 3 751 719 668 2231 | 3 752 595 597 2232 | 3 224 752 571 2233 | 3 222 753 224 2234 | 3 752 753 595 2235 | 3 224 753 752 2236 | 3 225 753 222 2237 | 3 598 595 753 2238 | 3 598 753 225 2239 | 3 200 754 610 2240 | 3 613 754 580 2241 | 3 610 754 613 2242 | 3 580 754 583 2243 | 3 600 754 200 2244 | 3 583 754 600 2245 | 3 755 625 756 2246 | 3 618 617 755 2247 | 3 618 755 756 2248 | 3 755 626 625 2249 | 3 755 617 713 2250 | 3 755 713 626 2251 | 3 695 757 756 2252 | 3 694 757 695 2253 | 3 618 756 757 2254 | 3 694 395 757 2255 | 3 618 757 619 2256 | 3 619 757 395 2257 | 3 758 756 625 2258 | 3 758 696 695 2259 | 3 758 695 756 2260 | 3 623 758 625 2261 | 3 295 696 758 2262 | 3 623 295 758 2263 | 3 715 759 397 2264 | 3 622 621 759 2265 | 3 622 759 715 2266 | 3 626 759 621 2267 | 3 713 397 759 2268 | 3 713 759 626 2269 | 3 760 638 634 2270 | 3 760 521 632 2271 | 3 760 632 638 2272 | 3 633 760 634 2273 | 3 519 521 760 2274 | 3 633 519 760 2275 | 3 761 732 730 2276 | 3 761 648 659 2277 | 3 761 659 732 2278 | 3 643 761 730 2279 | 3 650 648 761 2280 | 3 643 650 761 2281 | 3 737 762 644 2282 | 3 738 762 737 2283 | 3 642 644 762 2284 | 3 738 635 762 2285 | 3 642 762 641 2286 | 3 641 762 635 2287 | 3 290 763 477 2288 | 3 693 652 763 2289 | 3 290 693 763 2290 | 3 651 763 652 2291 | 3 656 477 763 2292 | 3 651 656 763 2293 | 3 571 764 667 2294 | 3 752 597 764 2295 | 3 752 764 571 2296 | 3 751 764 597 2297 | 3 668 667 764 2298 | 3 751 668 764 2299 | 3 248 765 249 2300 | 3 677 347 765 2301 | 3 248 677 765 2302 | 3 370 765 347 2303 | 3 707 249 765 2304 | 3 370 707 765 2305 | 2306 | #cc -------------------------------------------------------------------------------- /data/sphere.off: -------------------------------------------------------------------------------- 1 | OFF 2 | 482 960 0 3 | -0.5773503 -0.5773502 -0.5773503 4 | -0.5773503 0.5773503 -0.5773503 5 | 0.5773504 0.5773503 -0.5773503 6 | 0.5773503 -0.5773504 -0.5773503 7 | 0.5773502 -0.5773503 0.5773503 8 | 0.5773502 0.5773503 0.5773503 9 | -0.5773502 0.5773503 0.5773503 10 | -0.5773503 -0.5773504 0.5773503 11 | 0.9341724 0.3568221 1.336142e-09 12 | 0.9341724 -0.3568221 1.50316e-09 13 | -0.9341724 -0.3568221 -1.50316e-09 14 | -0.9341723 0.3568222 -1.336143e-09 15 | 0.3568221 0 0.9341723 16 | -0.3568221 0 0.9341723 17 | -0.3568221 -1.50316e-09 -0.9341724 18 | 0.356822 -1.711932e-09 -0.9341723 19 | 1.711932e-09 0.9341723 0.3568221 20 | 1.50316e-09 0.9341724 -0.3568221 21 | -2.045968e-09 -0.9341724 -0.3568221 22 | 0 -0.9341723 0.3568221 23 | 0 0.5257311 0.8506508 24 | 0 -0.5257311 0.8506508 25 | 0.8506508 0 0.525731 26 | 0.525731 -0.8506508 0 27 | 0.5257311 0.8506508 0 28 | 0 -0.5257311 -0.8506508 29 | -0.8506508 0 -0.5257311 30 | -0.5257311 -0.8506508 0 31 | -0.8506508 0 0.525731 32 | 0.8506508 0 -0.525731 33 | 0 0.525731 -0.8506508 34 | -0.525731 0.8506508 0 35 | 3.340806e-09 0 1 36 | 0.1746144 0.297555 0.9386004 37 | -0.1746144 0.297555 0.9386004 38 | 0.5000001 0.309017 0.8090171 39 | 0.282532 0.5800869 0.7639861 40 | 0.309017 0.8090171 0.5 41 | 0 0.7547014 0.6560684 42 | -0.3090169 0.8090171 0.5 43 | -0.282532 0.5800869 0.7639861 44 | -0.5 0.309017 0.8090171 45 | -0.1746144 -0.297555 0.9386004 46 | 0.1746144 -0.297555 0.9386004 47 | -0.5000001 -0.309017 0.8090171 48 | -0.282532 -0.5800869 0.7639861 49 | -0.309017 -0.8090171 0.5 50 | 0 -0.7547014 0.6560684 51 | 0.3090169 -0.8090171 0.5 52 | 0.282532 -0.5800869 0.7639861 53 | 0.5 -0.309017 0.8090171 54 | 0.7639861 -0.282532 0.5800869 55 | 0.6560684 0 0.7547014 56 | 0.8090171 -0.5000001 0.3090169 57 | 0.9386004 -0.1746144 0.297555 58 | 1 0 0 59 | 0.9386004 0.1746144 0.297555 60 | 0.8090171 0.5000001 0.309017 61 | 0.7639861 0.282532 0.5800869 62 | 0.5800869 -0.7639861 0.282532 63 | 0.7547014 -0.6560684 0 64 | 0.297555 -0.9386004 0.1746144 65 | -6.890411e-09 -1 0 66 | 0.297555 -0.9386004 -0.1746144 67 | 0.309017 -0.8090171 -0.5000001 68 | 0.5800869 -0.7639861 -0.282532 69 | 0.8090171 -0.5 -0.3090169 70 | 0.309017 0.8090171 -0.5 71 | 0.297555 0.9386004 -0.1746144 72 | 0.5800869 0.7639861 -0.282532 73 | 6.890411e-09 1 0 74 | 0.297555 0.9386004 0.1746144 75 | 0.5800869 0.7639861 0.282532 76 | 0.7547014 0.6560684 0 77 | 0.8090171 0.5 -0.3090169 78 | -0.5000001 -0.309017 -0.8090171 79 | -0.1746144 -0.297555 -0.9386004 80 | -0.282532 -0.5800869 -0.7639861 81 | 0 -6.890411e-09 -1 82 | 0.1746144 -0.297555 -0.9386004 83 | 0.5000001 -0.309017 -0.8090171 84 | 0.282532 -0.5800869 -0.7639861 85 | 0 -0.7547014 -0.6560684 86 | -0.309017 -0.8090171 -0.5 87 | -0.8090171 -0.5000001 -0.309017 88 | -0.9386004 -0.1746144 -0.297555 89 | -0.7639861 -0.282532 -0.5800869 90 | -1 0 -6.890411e-09 91 | -0.9386004 0.1746144 -0.297555 92 | -0.8090171 0.5000001 -0.309017 93 | -0.7639861 0.282532 -0.5800869 94 | -0.5 0.309017 -0.8090171 95 | -0.6560684 0 -0.7547014 96 | -0.297555 -0.9386004 -0.1746144 97 | -0.5800869 -0.7639861 -0.282532 98 | -0.297555 -0.9386004 0.1746144 99 | -0.5800869 -0.7639861 0.282532 100 | -0.8090171 -0.5 0.309017 101 | -0.7547014 -0.6560684 0 102 | -0.6560684 0 0.7547014 103 | -0.7639861 -0.282532 0.5800869 104 | -0.7639861 0.282532 0.5800869 105 | -0.8090171 0.5000001 0.3090169 106 | -0.9386004 0.1746144 0.297555 107 | -0.9386004 -0.1746144 0.297555 108 | 0.6560684 0 -0.7547014 109 | 0.7639861 -0.282532 -0.5800869 110 | 0.5 0.309017 -0.8090171 111 | 0.7639861 0.282532 -0.5800869 112 | 0.9386004 0.1746144 -0.297555 113 | 0.9386004 -0.1746144 -0.297555 114 | -0.309017 0.8090171 -0.5 115 | 0 0.7547014 -0.6560684 116 | -0.282532 0.5800869 -0.7639861 117 | 0.282532 0.5800869 -0.7639861 118 | 0.1746144 0.297555 -0.9386004 119 | -0.1746144 0.297555 -0.9386004 120 | -0.7547014 0.6560684 0 121 | -0.5800869 0.7639861 -0.282532 122 | -0.5800869 0.7639861 0.282532 123 | -0.297555 0.9386004 0.1746144 124 | -0.297555 0.9386004 -0.1746144 125 | 0 0.2928989 0.9561434 126 | -0.09089163 0.1509181 0.984359 127 | 0.09089164 0.1509181 0.9843588 128 | 0.2411115 0.4419141 0.8640471 129 | 0.3419971 0.3061098 0.8884451 130 | 0.3981712 0.4531755 0.7975536 131 | 0.1490151 0.6830255 0.7150319 132 | 0.3022574 0.704281 0.6423619 133 | 0.1551917 0.7951726 0.5861877 134 | -0.1490151 0.6830255 0.7150319 135 | -0.1551917 0.7951726 0.5861877 136 | -0.3022574 0.7042811 0.6423619 137 | -0.2411115 0.4419141 0.8640471 138 | -0.3981712 0.4531755 0.7975536 139 | -0.3419971 0.3061098 0.8884451 140 | 0 -0.2928989 0.9561434 141 | 0.09089164 -0.1509181 0.984359 142 | -0.09089163 -0.1509181 0.9843588 143 | -0.2411115 -0.4419141 0.8640471 144 | -0.3419971 -0.3061098 0.8884451 145 | -0.3981712 -0.4531755 0.7975536 146 | -0.1490151 -0.6830255 0.7150319 147 | -0.3022574 -0.704281 0.6423619 148 | -0.1551917 -0.7951726 0.5861877 149 | 0.1490151 -0.6830255 0.7150319 150 | 0.1551917 -0.7951726 0.5861877 151 | 0.3022574 -0.7042811 0.6423619 152 | 0.2411115 -0.4419141 0.8640471 153 | 0.3981712 -0.4531755 0.7975536 154 | 0.3419971 -0.3061098 0.8884451 155 | 0.7150319 -0.1490151 0.6830255 156 | 0.5861877 -0.1551917 0.7951726 157 | 0.6423619 -0.3022574 0.7042811 158 | 0.8640471 -0.2411115 0.441914 159 | 0.7975535 -0.3981712 0.4531755 160 | 0.8884451 -0.3419971 0.3061098 161 | 0.9561434 0 0.2928989 162 | 0.984359 -0.09089164 0.1509181 163 | 0.9843588 0.09089164 0.1509181 164 | 0.8640471 0.2411115 0.441914 165 | 0.8884451 0.3419971 0.3061098 166 | 0.7975536 0.3981712 0.4531755 167 | 0.7150319 0.1490151 0.6830255 168 | 0.6423619 0.3022574 0.704281 169 | 0.5861877 0.1551917 0.7951726 170 | 0.6830255 -0.7150319 0.1490151 171 | 0.7951726 -0.5861877 0.1551917 172 | 0.704281 -0.6423619 0.3022574 173 | 0.441914 -0.8640471 0.2411115 174 | 0.4531755 -0.7975536 0.3981712 175 | 0.3061098 -0.8884451 0.3419971 176 | 0.2928989 -0.9561434 0 177 | 0.1509181 -0.984359 0.09089164 178 | 0.1509181 -0.9843588 -0.09089164 179 | 0.441914 -0.8640471 -0.2411115 180 | 0.3061098 -0.8884451 -0.3419971 181 | 0.4531755 -0.7975536 -0.3981712 182 | 0.6830255 -0.7150319 -0.1490151 183 | 0.704281 -0.6423619 -0.3022574 184 | 0.7951726 -0.5861877 -0.1551917 185 | 0.4419141 0.8640471 -0.2411115 186 | 0.4531755 0.7975536 -0.3981712 187 | 0.3061098 0.8884451 -0.3419971 188 | 0.2928989 0.9561434 0 189 | 0.1509181 0.984359 -0.09089164 190 | 0.1509181 0.9843588 0.09089164 191 | 0.4419141 0.8640471 0.2411115 192 | 0.3061098 0.8884451 0.3419971 193 | 0.4531755 0.7975536 0.3981712 194 | 0.6830255 0.7150319 0.1490151 195 | 0.704281 0.6423619 0.3022574 196 | 0.7951726 0.5861877 0.1551917 197 | 0.6830255 0.7150319 -0.1490151 198 | 0.7951726 0.5861877 -0.1551917 199 | 0.7042811 0.6423619 -0.3022574 200 | -0.2411115 -0.4419141 -0.8640471 201 | -0.3981712 -0.4531755 -0.7975536 202 | -0.3419971 -0.3061098 -0.8884451 203 | 0 -0.2928989 -0.9561434 204 | -0.09089164 -0.1509181 -0.984359 205 | 0.09089164 -0.1509181 -0.9843588 206 | 0.2411115 -0.4419141 -0.8640471 207 | 0.3419971 -0.3061098 -0.8884451 208 | 0.3981712 -0.4531755 -0.7975536 209 | 0.1490151 -0.6830255 -0.7150319 210 | 0.3022574 -0.704281 -0.6423619 211 | 0.1551917 -0.7951726 -0.5861877 212 | -0.1490151 -0.6830255 -0.7150319 213 | -0.1551917 -0.7951726 -0.5861877 214 | -0.3022574 -0.704281 -0.6423618 215 | -0.8640469 -0.2411115 -0.441914 216 | -0.7975536 -0.3981712 -0.4531755 217 | -0.8884451 -0.3419971 -0.3061098 218 | -0.9561434 0 -0.2928989 219 | -0.984359 -0.09089164 -0.1509181 220 | -0.9843588 0.09089164 -0.1509181 221 | -0.8640469 0.2411115 -0.441914 222 | -0.8884451 0.3419971 -0.3061098 223 | -0.7975536 0.3981712 -0.4531755 224 | -0.7150319 0.1490151 -0.6830255 225 | -0.6423619 0.3022574 -0.704281 226 | -0.5861877 0.1551917 -0.7951726 227 | -0.7150319 -0.1490151 -0.6830255 228 | -0.5861877 -0.1551917 -0.7951726 229 | -0.6423619 -0.3022574 -0.7042811 230 | -0.4419141 -0.8640471 -0.2411115 231 | -0.4531755 -0.7975536 -0.3981712 232 | -0.3061098 -0.8884451 -0.3419971 233 | -0.2928989 -0.9561434 0 234 | -0.1509181 -0.984359 -0.09089164 235 | -0.1509181 -0.9843588 0.09089164 236 | -0.4419141 -0.8640471 0.2411115 237 | -0.3061098 -0.8884451 0.3419971 238 | -0.4531755 -0.7975536 0.3981712 239 | -0.6830255 -0.7150319 0.1490151 240 | -0.704281 -0.6423619 0.3022574 241 | -0.7951726 -0.5861877 0.1551917 242 | -0.6830255 -0.7150319 -0.1490151 243 | -0.7951726 -0.5861877 -0.1551917 244 | -0.704281 -0.6423618 -0.3022574 245 | -0.7150319 -0.1490151 0.6830255 246 | -0.6423619 -0.3022574 0.704281 247 | -0.5861877 -0.1551917 0.7951726 248 | -0.7150319 0.1490151 0.6830255 249 | -0.5861877 0.1551917 0.7951726 250 | -0.6423619 0.3022574 0.7042811 251 | -0.8640469 0.2411115 0.441914 252 | -0.7975535 0.3981712 0.4531755 253 | -0.8884451 0.3419971 0.3061098 254 | -0.9561434 0 0.2928989 255 | -0.984359 0.09089164 0.1509181 256 | -0.9843588 -0.09089164 0.1509181 257 | -0.8640469 -0.2411115 0.441914 258 | -0.8884451 -0.3419971 0.3061098 259 | -0.7975536 -0.3981712 0.4531755 260 | 0.7150319 -0.1490151 -0.6830255 261 | 0.6423619 -0.3022574 -0.704281 262 | 0.5861877 -0.1551917 -0.7951726 263 | 0.7150319 0.1490151 -0.6830255 264 | 0.5861877 0.1551917 -0.7951726 265 | 0.6423619 0.3022574 -0.704281 266 | 0.8640469 0.2411115 -0.441914 267 | 0.7975536 0.3981712 -0.4531755 268 | 0.8884451 0.3419971 -0.3061098 269 | 0.9561434 0 -0.2928989 270 | 0.984359 0.09089164 -0.1509181 271 | 0.9843588 -0.09089164 -0.1509181 272 | 0.8640469 -0.2411115 -0.441914 273 | 0.8884451 -0.3419971 -0.3061098 274 | 0.7975536 -0.3981712 -0.4531755 275 | -0.1490151 0.6830255 -0.7150319 276 | -0.3022574 0.704281 -0.6423619 277 | -0.1551917 0.7951726 -0.5861877 278 | 0.1490151 0.6830255 -0.7150319 279 | 0.1551917 0.7951726 -0.5861877 280 | 0.3022574 0.704281 -0.6423618 281 | 0.2411115 0.4419141 -0.8640471 282 | 0.3981712 0.4531755 -0.7975535 283 | 0.3419971 0.3061098 -0.8884451 284 | 0 0.2928989 -0.9561434 285 | 0.09089164 0.1509181 -0.984359 286 | -0.09089164 0.1509181 -0.9843588 287 | -0.2411115 0.4419141 -0.8640471 288 | -0.3419971 0.3061098 -0.8884451 289 | -0.3981712 0.4531755 -0.7975536 290 | -0.6830255 0.7150319 -0.1490151 291 | -0.704281 0.6423619 -0.3022574 292 | -0.7951726 0.5861877 -0.1551917 293 | -0.6830255 0.7150319 0.1490151 294 | -0.7951726 0.5861877 0.1551917 295 | -0.704281 0.6423619 0.3022574 296 | -0.4419141 0.8640471 0.2411115 297 | -0.4531755 0.7975536 0.3981712 298 | -0.3061098 0.8884451 0.3419971 299 | -0.2928989 0.9561434 0 300 | -0.1509181 0.984359 0.09089164 301 | -0.1509181 0.9843588 -0.09089164 302 | -0.4419141 0.8640471 -0.2411115 303 | -0.3061098 0.8884451 -0.3419971 304 | -0.4531755 0.7975536 -0.3981712 305 | 0.08156676 0.4251445 0.9014427 306 | -0.08156676 0.4251445 0.9014427 307 | -0.2688494 0.1527395 0.9509945 308 | -0.1822805 0 0.9832466 309 | 0.1822805 0 0.9832465 310 | 0.2688494 0.1527395 0.9509946 311 | 0.1319778 0.5571223 0.819876 312 | 0.4352956 0.1563719 0.8866034 313 | 0.547951 0.4513079 0.7043229 314 | 0.4350074 0.587747 0.6821452 315 | 0 0.638689 0.769465 316 | 0.4513079 0.704323 0.5479511 317 | 0.1563719 0.8866034 0.4352956 318 | 0 0.8565964 0.5159872 319 | -0.1319778 0.5571223 0.819876 320 | -0.1563719 0.8866034 0.4352955 321 | -0.4513079 0.704323 0.5479511 322 | -0.4350074 0.587747 0.6821452 323 | -0.547951 0.4513079 0.7043229 324 | -0.4352956 0.1563719 0.8866034 325 | -0.08156676 -0.4251445 0.9014427 326 | 0.08156676 -0.4251445 0.9014427 327 | 0.2688494 -0.1527395 0.9509946 328 | -0.2688494 -0.1527395 0.9509945 329 | -0.1319778 -0.5571223 0.819876 330 | -0.4352956 -0.1563719 0.8866034 331 | -0.547951 -0.4513079 0.7043229 332 | -0.4350074 -0.587747 0.6821452 333 | 0 -0.638689 0.769465 334 | -0.4513079 -0.704323 0.5479511 335 | -0.1563719 -0.8866034 0.4352956 336 | 0 -0.8565963 0.5159872 337 | 0.1319778 -0.5571223 0.819876 338 | 0.1563719 -0.8866034 0.4352956 339 | 0.4513079 -0.704323 0.5479511 340 | 0.4350074 -0.587747 0.6821452 341 | 0.547951 -0.4513079 0.7043229 342 | 0.4352955 -0.1563719 0.8866034 343 | 0.819876 -0.1319778 0.5571222 344 | 0.769465 0 0.638689 345 | 0.5159872 0 0.8565964 346 | 0.6821451 -0.4350075 0.5877469 347 | 0.9014427 -0.08156676 0.4251444 348 | 0.7043229 -0.547951 0.4513079 349 | 0.8866034 -0.4352956 0.1563719 350 | 0.9509945 -0.2688494 0.1527395 351 | 0.9014427 0.08156676 0.4251444 352 | 0.9832466 -0.1822805 0 353 | 0.9832465 0.1822805 0 354 | 0.9509946 0.2688494 0.1527395 355 | 0.819876 0.1319778 0.5571222 356 | 0.8866034 0.4352956 0.1563719 357 | 0.7043229 0.547951 0.4513079 358 | 0.6821452 0.4350075 0.587747 359 | 0.5571222 -0.819876 0.1319778 360 | 0.638689 -0.769465 0 361 | 0.8565963 -0.5159872 0 362 | 0.5877469 -0.6821451 0.4350075 363 | 0.4251444 -0.9014427 0.08156676 364 | 0.1527395 -0.9509945 0.2688494 365 | 0.4251444 -0.9014427 -0.08156676 366 | -4.175899e-09 -0.9832466 0.1822805 367 | -4.175898e-09 -0.9832465 -0.1822805 368 | 0.1527395 -0.9509946 -0.2688494 369 | 0.5571222 -0.819876 -0.1319778 370 | 0.1563719 -0.8866034 -0.4352956 371 | 0.4513079 -0.7043229 -0.547951 372 | 0.587747 -0.6821452 -0.4350074 373 | 0.704323 -0.5479511 -0.4513079 374 | 0.8866034 -0.4352956 -0.1563719 375 | 0.4251445 0.9014427 -0.08156676 376 | 0.5571223 0.819876 -0.1319778 377 | 0.587747 0.6821452 -0.4350074 378 | 0.4513079 0.7043229 -0.547951 379 | 0.1563719 0.8866034 -0.4352956 380 | 0.1527395 0.9509945 -0.2688494 381 | 0.4251445 0.9014427 0.08156676 382 | 4.175899e-09 0.9832466 -0.1822805 383 | 4.175898e-09 0.9832465 0.1822805 384 | 0.1527395 0.9509946 0.2688494 385 | 0.5571223 0.819876 0.1319778 386 | 0.5877469 0.6821451 0.4350074 387 | 0.638689 0.769465 0 388 | 0.8565964 0.5159872 0 389 | 0.8866034 0.4352955 -0.1563719 390 | 0.704323 0.5479511 -0.4513079 391 | -0.08156676 -0.4251445 -0.9014427 392 | -0.1319778 -0.5571223 -0.819876 393 | -0.4350075 -0.5877469 -0.6821451 394 | -0.547951 -0.4513079 -0.7043229 395 | -0.4352956 -0.1563719 -0.8866034 396 | -0.2688494 -0.1527395 -0.9509945 397 | 0.08156676 -0.4251445 -0.9014427 398 | -0.1822805 -4.175899e-09 -0.9832466 399 | 0.1822805 -4.175898e-09 -0.9832465 400 | 0.2688494 -0.1527395 -0.9509946 401 | 0.1319778 -0.5571223 -0.819876 402 | 0.4352956 -0.1563719 -0.8866034 403 | 0.547951 -0.4513079 -0.7043229 404 | 0.4350075 -0.587747 -0.6821452 405 | 0 -0.638689 -0.769465 406 | 0 -0.8565964 -0.5159872 407 | -0.1563719 -0.8866034 -0.4352955 408 | -0.4513079 -0.7043229 -0.547951 409 | -0.9014427 -0.08156676 -0.4251445 410 | -0.819876 -0.1319778 -0.5571223 411 | -0.6821451 -0.4350075 -0.5877469 412 | -0.7043229 -0.547951 -0.4513079 413 | -0.8866034 -0.4352956 -0.1563719 414 | -0.9509945 -0.2688494 -0.1527395 415 | -0.9014427 0.08156676 -0.4251445 416 | -0.9832466 -0.1822805 -4.175899e-09 417 | -0.9832466 0.1822805 -4.175899e-09 418 | -0.9509945 0.2688494 -0.1527395 419 | -0.819876 0.1319778 -0.5571223 420 | -0.8866034 0.4352956 -0.1563719 421 | -0.7043229 0.547951 -0.4513079 422 | -0.6821452 0.4350075 -0.587747 423 | -0.769465 0 -0.638689 424 | -0.547951 0.4513079 -0.7043229 425 | -0.4352956 0.1563719 -0.8866034 426 | -0.5159872 0 -0.8565963 427 | -0.4251445 -0.9014427 -0.08156676 428 | -0.5571223 -0.819876 -0.1319778 429 | -0.5877469 -0.6821451 -0.4350075 430 | -0.1527395 -0.9509946 -0.2688494 431 | -0.4251445 -0.9014427 0.08156676 432 | -0.1527395 -0.9509945 0.2688494 433 | -0.5571223 -0.819876 0.1319778 434 | -0.5877469 -0.6821451 0.4350074 435 | -0.638689 -0.769465 0 436 | -0.7043229 -0.547951 0.4513079 437 | -0.8866034 -0.4352956 0.1563719 438 | -0.8565963 -0.5159872 0 439 | -0.769465 0 0.638689 440 | -0.819876 -0.1319778 0.5571223 441 | -0.6821452 -0.4350075 0.587747 442 | -0.5159872 0 0.8565963 443 | -0.819876 0.1319778 0.5571222 444 | -0.6821451 0.4350075 0.5877469 445 | -0.9014427 0.08156676 0.4251445 446 | -0.7043229 0.547951 0.4513079 447 | -0.8866034 0.4352956 0.1563719 448 | -0.9509945 0.2688494 0.1527395 449 | -0.9014427 -0.08156676 0.4251445 450 | -0.9509945 -0.2688494 0.1527395 451 | 0.769465 0 -0.638689 452 | 0.819876 -0.1319778 -0.5571223 453 | 0.6821452 -0.4350075 -0.587747 454 | 0.5159872 0 -0.8565964 455 | 0.819876 0.1319778 -0.5571222 456 | 0.4352955 0.1563719 -0.8866034 457 | 0.547951 0.4513079 -0.7043229 458 | 0.6821451 0.4350075 -0.5877469 459 | 0.9014427 0.08156676 -0.4251445 460 | 0.9509946 0.2688494 -0.1527395 461 | 0.9014427 -0.08156676 -0.4251445 462 | 0.9509945 -0.2688494 -0.1527395 463 | 0 0.638689 -0.769465 464 | -0.1319778 0.5571223 -0.819876 465 | -0.4350075 0.587747 -0.6821452 466 | -0.4513079 0.7043229 -0.547951 467 | -0.1563719 0.8866034 -0.4352956 468 | 0 0.8565963 -0.5159872 469 | 0.1319778 0.5571222 -0.819876 470 | 0.4350075 0.5877469 -0.6821451 471 | 0.08156676 0.4251445 -0.9014427 472 | 0.2688494 0.1527395 -0.9509946 473 | -0.08156676 0.4251445 -0.9014427 474 | -0.2688494 0.1527395 -0.9509945 475 | -0.638689 0.769465 0 476 | -0.5571223 0.819876 -0.1319778 477 | -0.5877469 0.6821451 -0.4350074 478 | -0.8565963 0.5159872 0 479 | -0.5571222 0.819876 0.1319778 480 | -0.5877469 0.6821451 0.4350075 481 | -0.4251445 0.9014427 0.08156676 482 | -0.1527395 0.9509946 0.2688494 483 | -0.4251445 0.9014427 -0.08156676 484 | -0.1527395 0.9509945 -0.2688494 485 | 3 122 123 124 486 | 3 125 126 127 487 | 3 128 129 130 488 | 3 131 132 133 489 | 3 134 135 136 490 | 3 137 138 139 491 | 3 140 141 142 492 | 3 143 144 145 493 | 3 146 147 148 494 | 3 149 150 151 495 | 3 152 153 154 496 | 3 155 156 157 497 | 3 158 159 160 498 | 3 161 162 163 499 | 3 164 165 166 500 | 3 167 168 169 501 | 3 170 171 172 502 | 3 173 174 175 503 | 3 176 177 178 504 | 3 179 180 181 505 | 3 182 183 184 506 | 3 185 186 187 507 | 3 188 189 190 508 | 3 191 192 193 509 | 3 194 195 196 510 | 3 197 198 199 511 | 3 200 201 202 512 | 3 203 204 205 513 | 3 206 207 208 514 | 3 209 210 211 515 | 3 212 213 214 516 | 3 215 216 217 517 | 3 218 219 220 518 | 3 221 222 223 519 | 3 224 225 226 520 | 3 227 228 229 521 | 3 230 231 232 522 | 3 233 234 235 523 | 3 236 237 238 524 | 3 239 240 241 525 | 3 242 243 244 526 | 3 245 246 247 527 | 3 248 249 250 528 | 3 251 252 253 529 | 3 254 255 256 530 | 3 257 258 259 531 | 3 260 261 262 532 | 3 263 264 265 533 | 3 266 267 268 534 | 3 269 270 271 535 | 3 272 273 274 536 | 3 275 276 277 537 | 3 278 279 280 538 | 3 281 282 283 539 | 3 284 285 286 540 | 3 287 288 289 541 | 3 290 291 292 542 | 3 293 294 295 543 | 3 296 297 298 544 | 3 299 300 301 545 | 3 122 302 303 546 | 3 123 304 305 547 | 3 124 306 307 548 | 3 125 308 302 549 | 3 126 307 309 550 | 3 127 310 311 551 | 3 128 312 308 552 | 3 129 311 313 553 | 3 130 314 315 554 | 3 131 316 312 555 | 3 132 315 317 556 | 3 133 318 319 557 | 3 134 303 316 558 | 3 135 319 320 559 | 3 136 321 304 560 | 3 137 322 323 561 | 3 138 324 306 562 | 3 139 305 325 563 | 3 140 326 322 564 | 3 141 325 327 565 | 3 142 328 329 566 | 3 143 330 326 567 | 3 144 329 331 568 | 3 145 332 333 569 | 3 146 334 330 570 | 3 147 333 335 571 | 3 148 336 337 572 | 3 149 323 334 573 | 3 150 337 338 574 | 3 151 339 324 575 | 3 152 340 341 576 | 3 153 342 339 577 | 3 154 338 343 578 | 3 155 344 340 579 | 3 156 343 345 580 | 3 157 346 347 581 | 3 158 348 344 582 | 3 159 347 349 583 | 3 160 350 351 584 | 3 161 352 348 585 | 3 162 351 353 586 | 3 163 354 355 587 | 3 164 341 352 588 | 3 165 355 310 589 | 3 166 309 342 590 | 3 167 356 357 591 | 3 168 358 346 592 | 3 169 345 359 593 | 3 170 360 356 594 | 3 171 359 336 595 | 3 172 335 361 596 | 3 173 362 360 597 | 3 174 361 363 598 | 3 175 364 365 599 | 3 176 366 362 600 | 3 177 365 367 601 | 3 178 368 369 602 | 3 179 357 366 603 | 3 180 369 370 604 | 3 181 371 358 605 | 3 182 372 373 606 | 3 183 374 375 607 | 3 184 376 377 608 | 3 185 378 372 609 | 3 186 377 379 610 | 3 187 380 381 611 | 3 188 382 378 612 | 3 189 381 314 613 | 3 190 313 383 614 | 3 191 384 382 615 | 3 192 383 354 616 | 3 193 353 385 617 | 3 194 373 384 618 | 3 195 385 386 619 | 3 196 387 374 620 | 3 197 388 389 621 | 3 198 390 391 622 | 3 199 392 393 623 | 3 200 394 388 624 | 3 201 393 395 625 | 3 202 396 397 626 | 3 203 398 394 627 | 3 204 397 399 628 | 3 205 400 401 629 | 3 206 402 398 630 | 3 207 401 368 631 | 3 208 367 403 632 | 3 209 389 402 633 | 3 210 403 404 634 | 3 211 405 390 635 | 3 212 406 407 636 | 3 213 408 409 637 | 3 214 410 411 638 | 3 215 412 406 639 | 3 216 411 413 640 | 3 217 414 415 641 | 3 218 416 412 642 | 3 219 415 417 643 | 3 220 418 419 644 | 3 221 420 416 645 | 3 222 419 421 646 | 3 223 422 423 647 | 3 224 407 420 648 | 3 225 423 392 649 | 3 226 391 408 650 | 3 227 424 425 651 | 3 228 426 405 652 | 3 229 404 427 653 | 3 230 428 424 654 | 3 231 427 364 655 | 3 232 363 429 656 | 3 233 430 428 657 | 3 234 429 332 658 | 3 235 331 431 659 | 3 236 432 430 660 | 3 237 431 433 661 | 3 238 434 435 662 | 3 239 425 432 663 | 3 240 435 410 664 | 3 241 409 426 665 | 3 242 436 437 666 | 3 243 438 328 667 | 3 244 327 439 668 | 3 245 440 436 669 | 3 246 439 321 670 | 3 247 320 441 671 | 3 248 442 440 672 | 3 249 441 443 673 | 3 250 444 445 674 | 3 251 446 442 675 | 3 252 445 414 676 | 3 253 413 447 677 | 3 254 437 446 678 | 3 255 447 434 679 | 3 256 433 438 680 | 3 257 448 449 681 | 3 258 450 400 682 | 3 259 399 451 683 | 3 260 452 448 684 | 3 261 451 453 685 | 3 262 454 455 686 | 3 263 456 452 687 | 3 264 455 387 688 | 3 265 386 457 689 | 3 266 458 456 690 | 3 267 457 350 691 | 3 268 349 459 692 | 3 269 449 458 693 | 3 270 459 371 694 | 3 271 370 450 695 | 3 272 460 461 696 | 3 273 462 463 697 | 3 274 464 465 698 | 3 275 466 460 699 | 3 276 465 376 700 | 3 277 375 467 701 | 3 278 468 466 702 | 3 279 467 454 703 | 3 280 453 469 704 | 3 281 470 468 705 | 3 282 469 396 706 | 3 283 395 471 707 | 3 284 461 470 708 | 3 285 471 422 709 | 3 286 421 462 710 | 3 287 472 473 711 | 3 288 474 418 712 | 3 289 417 475 713 | 3 290 476 472 714 | 3 291 475 444 715 | 3 292 443 477 716 | 3 293 478 476 717 | 3 294 477 318 718 | 3 295 317 479 719 | 3 296 480 478 720 | 3 297 479 380 721 | 3 298 379 481 722 | 3 299 473 480 723 | 3 300 481 464 724 | 3 301 463 474 725 | 3 32 124 123 726 | 3 33 122 124 727 | 3 34 123 122 728 | 3 35 127 126 729 | 3 36 125 127 730 | 3 33 126 125 731 | 3 37 130 129 732 | 3 38 128 130 733 | 3 36 129 128 734 | 3 39 133 132 735 | 3 40 131 133 736 | 3 38 132 131 737 | 3 41 136 135 738 | 3 34 134 136 739 | 3 40 135 134 740 | 3 32 139 138 741 | 3 42 137 139 742 | 3 43 138 137 743 | 3 44 142 141 744 | 3 45 140 142 745 | 3 42 141 140 746 | 3 46 145 144 747 | 3 47 143 145 748 | 3 45 144 143 749 | 3 48 148 147 750 | 3 49 146 148 751 | 3 47 147 146 752 | 3 50 151 150 753 | 3 43 149 151 754 | 3 49 150 149 755 | 3 50 154 153 756 | 3 51 152 154 757 | 3 52 153 152 758 | 3 53 157 156 759 | 3 54 155 157 760 | 3 51 156 155 761 | 3 55 160 159 762 | 3 56 158 160 763 | 3 54 159 158 764 | 3 57 163 162 765 | 3 58 161 163 766 | 3 56 162 161 767 | 3 35 166 165 768 | 3 52 164 166 769 | 3 58 165 164 770 | 3 53 169 168 771 | 3 59 167 169 772 | 3 60 168 167 773 | 3 48 172 171 774 | 3 61 170 172 775 | 3 59 171 170 776 | 3 62 175 174 777 | 3 63 173 175 778 | 3 61 174 173 779 | 3 64 178 177 780 | 3 65 176 178 781 | 3 63 177 176 782 | 3 66 181 180 783 | 3 60 179 181 784 | 3 65 180 179 785 | 3 67 184 183 786 | 3 68 182 184 787 | 3 69 183 182 788 | 3 70 187 186 789 | 3 71 185 187 790 | 3 68 186 185 791 | 3 37 190 189 792 | 3 72 188 190 793 | 3 71 189 188 794 | 3 57 193 192 795 | 3 73 191 193 796 | 3 72 192 191 797 | 3 74 196 195 798 | 3 69 194 196 799 | 3 73 195 194 800 | 3 75 199 198 801 | 3 76 197 199 802 | 3 77 198 197 803 | 3 78 202 201 804 | 3 79 200 202 805 | 3 76 201 200 806 | 3 80 205 204 807 | 3 81 203 205 808 | 3 79 204 203 809 | 3 64 208 207 810 | 3 82 206 208 811 | 3 81 207 206 812 | 3 83 211 210 813 | 3 77 209 211 814 | 3 82 210 209 815 | 3 84 214 213 816 | 3 85 212 214 817 | 3 86 213 212 818 | 3 87 217 216 819 | 3 88 215 217 820 | 3 85 216 215 821 | 3 89 220 219 822 | 3 90 218 220 823 | 3 88 219 218 824 | 3 91 223 222 825 | 3 92 221 223 826 | 3 90 222 221 827 | 3 75 226 225 828 | 3 86 224 226 829 | 3 92 225 224 830 | 3 83 229 228 831 | 3 93 227 229 832 | 3 94 228 227 833 | 3 62 232 231 834 | 3 95 230 232 835 | 3 93 231 230 836 | 3 46 235 234 837 | 3 96 233 235 838 | 3 95 234 233 839 | 3 97 238 237 840 | 3 98 236 238 841 | 3 96 237 236 842 | 3 84 241 240 843 | 3 94 239 241 844 | 3 98 240 239 845 | 3 44 244 243 846 | 3 99 242 244 847 | 3 100 243 242 848 | 3 41 247 246 849 | 3 101 245 247 850 | 3 99 246 245 851 | 3 102 250 249 852 | 3 103 248 250 853 | 3 101 249 248 854 | 3 87 253 252 855 | 3 104 251 253 856 | 3 103 252 251 857 | 3 97 256 255 858 | 3 100 254 256 859 | 3 104 255 254 860 | 3 80 259 258 861 | 3 105 257 259 862 | 3 106 258 257 863 | 3 107 262 261 864 | 3 108 260 262 865 | 3 105 261 260 866 | 3 74 265 264 867 | 3 109 263 265 868 | 3 108 264 263 869 | 3 55 268 267 870 | 3 110 266 268 871 | 3 109 267 266 872 | 3 66 271 270 873 | 3 106 269 271 874 | 3 110 270 269 875 | 3 111 274 273 876 | 3 112 272 274 877 | 3 113 273 272 878 | 3 67 277 276 879 | 3 114 275 277 880 | 3 112 276 275 881 | 3 107 280 279 882 | 3 115 278 280 883 | 3 114 279 278 884 | 3 78 283 282 885 | 3 116 281 283 886 | 3 115 282 281 887 | 3 91 286 285 888 | 3 113 284 286 889 | 3 116 285 284 890 | 3 89 289 288 891 | 3 117 287 289 892 | 3 118 288 287 893 | 3 102 292 291 894 | 3 119 290 292 895 | 3 117 291 290 896 | 3 39 295 294 897 | 3 120 293 295 898 | 3 119 294 293 899 | 3 70 298 297 900 | 3 121 296 298 901 | 3 120 297 296 902 | 3 111 301 300 903 | 3 118 299 301 904 | 3 121 300 299 905 | 3 20 303 302 906 | 3 34 122 303 907 | 3 33 302 122 908 | 3 13 305 304 909 | 3 32 123 305 910 | 3 34 304 123 911 | 3 12 307 306 912 | 3 33 124 307 913 | 3 32 306 124 914 | 3 20 302 308 915 | 3 33 125 302 916 | 3 36 308 125 917 | 3 12 309 307 918 | 3 35 126 309 919 | 3 33 307 126 920 | 3 5 311 310 921 | 3 36 127 311 922 | 3 35 310 127 923 | 3 20 308 312 924 | 3 36 128 308 925 | 3 38 312 128 926 | 3 5 313 311 927 | 3 37 129 313 928 | 3 36 311 129 929 | 3 16 315 314 930 | 3 38 130 315 931 | 3 37 314 130 932 | 3 20 312 316 933 | 3 38 131 312 934 | 3 40 316 131 935 | 3 16 317 315 936 | 3 39 132 317 937 | 3 38 315 132 938 | 3 6 319 318 939 | 3 40 133 319 940 | 3 39 318 133 941 | 3 20 316 303 942 | 3 40 134 316 943 | 3 34 303 134 944 | 3 6 320 319 945 | 3 41 135 320 946 | 3 40 319 135 947 | 3 13 304 321 948 | 3 34 136 304 949 | 3 41 321 136 950 | 3 21 323 322 951 | 3 43 137 323 952 | 3 42 322 137 953 | 3 12 306 324 954 | 3 32 138 306 955 | 3 43 324 138 956 | 3 13 325 305 957 | 3 42 139 325 958 | 3 32 305 139 959 | 3 21 322 326 960 | 3 42 140 322 961 | 3 45 326 140 962 | 3 13 327 325 963 | 3 44 141 327 964 | 3 42 325 141 965 | 3 7 329 328 966 | 3 45 142 329 967 | 3 44 328 142 968 | 3 21 326 330 969 | 3 45 143 326 970 | 3 47 330 143 971 | 3 7 331 329 972 | 3 46 144 331 973 | 3 45 329 144 974 | 3 19 333 332 975 | 3 47 145 333 976 | 3 46 332 145 977 | 3 21 330 334 978 | 3 47 146 330 979 | 3 49 334 146 980 | 3 19 335 333 981 | 3 48 147 335 982 | 3 47 333 147 983 | 3 4 337 336 984 | 3 49 148 337 985 | 3 48 336 148 986 | 3 21 334 323 987 | 3 49 149 334 988 | 3 43 323 149 989 | 3 4 338 337 990 | 3 50 150 338 991 | 3 49 337 150 992 | 3 12 324 339 993 | 3 43 151 324 994 | 3 50 339 151 995 | 3 22 341 340 996 | 3 52 152 341 997 | 3 51 340 152 998 | 3 12 339 342 999 | 3 50 153 339 1000 | 3 52 342 153 1001 | 3 4 343 338 1002 | 3 51 154 343 1003 | 3 50 338 154 1004 | 3 22 340 344 1005 | 3 51 155 340 1006 | 3 54 344 155 1007 | 3 4 345 343 1008 | 3 53 156 345 1009 | 3 51 343 156 1010 | 3 9 347 346 1011 | 3 54 157 347 1012 | 3 53 346 157 1013 | 3 22 344 348 1014 | 3 54 158 344 1015 | 3 56 348 158 1016 | 3 9 349 347 1017 | 3 55 159 349 1018 | 3 54 347 159 1019 | 3 8 351 350 1020 | 3 56 160 351 1021 | 3 55 350 160 1022 | 3 22 348 352 1023 | 3 56 161 348 1024 | 3 58 352 161 1025 | 3 8 353 351 1026 | 3 57 162 353 1027 | 3 56 351 162 1028 | 3 5 355 354 1029 | 3 58 163 355 1030 | 3 57 354 163 1031 | 3 22 352 341 1032 | 3 58 164 352 1033 | 3 52 341 164 1034 | 3 5 310 355 1035 | 3 35 165 310 1036 | 3 58 355 165 1037 | 3 12 342 309 1038 | 3 52 166 342 1039 | 3 35 309 166 1040 | 3 23 357 356 1041 | 3 60 167 357 1042 | 3 59 356 167 1043 | 3 9 346 358 1044 | 3 53 168 346 1045 | 3 60 358 168 1046 | 3 4 359 345 1047 | 3 59 169 359 1048 | 3 53 345 169 1049 | 3 23 356 360 1050 | 3 59 170 356 1051 | 3 61 360 170 1052 | 3 4 336 359 1053 | 3 48 171 336 1054 | 3 59 359 171 1055 | 3 19 361 335 1056 | 3 61 172 361 1057 | 3 48 335 172 1058 | 3 23 360 362 1059 | 3 61 173 360 1060 | 3 63 362 173 1061 | 3 19 363 361 1062 | 3 62 174 363 1063 | 3 61 361 174 1064 | 3 18 365 364 1065 | 3 63 175 365 1066 | 3 62 364 175 1067 | 3 23 362 366 1068 | 3 63 176 362 1069 | 3 65 366 176 1070 | 3 18 367 365 1071 | 3 64 177 367 1072 | 3 63 365 177 1073 | 3 3 369 368 1074 | 3 65 178 369 1075 | 3 64 368 178 1076 | 3 23 366 357 1077 | 3 65 179 366 1078 | 3 60 357 179 1079 | 3 3 370 369 1080 | 3 66 180 370 1081 | 3 65 369 180 1082 | 3 9 358 371 1083 | 3 60 181 358 1084 | 3 66 371 181 1085 | 3 24 373 372 1086 | 3 69 182 373 1087 | 3 68 372 182 1088 | 3 2 375 374 1089 | 3 67 183 375 1090 | 3 69 374 183 1091 | 3 17 377 376 1092 | 3 68 184 377 1093 | 3 67 376 184 1094 | 3 24 372 378 1095 | 3 68 185 372 1096 | 3 71 378 185 1097 | 3 17 379 377 1098 | 3 70 186 379 1099 | 3 68 377 186 1100 | 3 16 381 380 1101 | 3 71 187 381 1102 | 3 70 380 187 1103 | 3 24 378 382 1104 | 3 71 188 378 1105 | 3 72 382 188 1106 | 3 16 314 381 1107 | 3 37 189 314 1108 | 3 71 381 189 1109 | 3 5 383 313 1110 | 3 72 190 383 1111 | 3 37 313 190 1112 | 3 24 382 384 1113 | 3 72 191 382 1114 | 3 73 384 191 1115 | 3 5 354 383 1116 | 3 57 192 354 1117 | 3 72 383 192 1118 | 3 8 385 353 1119 | 3 73 193 385 1120 | 3 57 353 193 1121 | 3 24 384 373 1122 | 3 73 194 384 1123 | 3 69 373 194 1124 | 3 8 386 385 1125 | 3 74 195 386 1126 | 3 73 385 195 1127 | 3 2 374 387 1128 | 3 69 196 374 1129 | 3 74 387 196 1130 | 3 25 389 388 1131 | 3 77 197 389 1132 | 3 76 388 197 1133 | 3 0 391 390 1134 | 3 75 198 391 1135 | 3 77 390 198 1136 | 3 14 393 392 1137 | 3 76 199 393 1138 | 3 75 392 199 1139 | 3 25 388 394 1140 | 3 76 200 388 1141 | 3 79 394 200 1142 | 3 14 395 393 1143 | 3 78 201 395 1144 | 3 76 393 201 1145 | 3 15 397 396 1146 | 3 79 202 397 1147 | 3 78 396 202 1148 | 3 25 394 398 1149 | 3 79 203 394 1150 | 3 81 398 203 1151 | 3 15 399 397 1152 | 3 80 204 399 1153 | 3 79 397 204 1154 | 3 3 401 400 1155 | 3 81 205 401 1156 | 3 80 400 205 1157 | 3 25 398 402 1158 | 3 81 206 398 1159 | 3 82 402 206 1160 | 3 3 368 401 1161 | 3 64 207 368 1162 | 3 81 401 207 1163 | 3 18 403 367 1164 | 3 82 208 403 1165 | 3 64 367 208 1166 | 3 25 402 389 1167 | 3 82 209 402 1168 | 3 77 389 209 1169 | 3 18 404 403 1170 | 3 83 210 404 1171 | 3 82 403 210 1172 | 3 0 390 405 1173 | 3 77 211 390 1174 | 3 83 405 211 1175 | 3 26 407 406 1176 | 3 86 212 407 1177 | 3 85 406 212 1178 | 3 0 409 408 1179 | 3 84 213 409 1180 | 3 86 408 213 1181 | 3 10 411 410 1182 | 3 85 214 411 1183 | 3 84 410 214 1184 | 3 26 406 412 1185 | 3 85 215 406 1186 | 3 88 412 215 1187 | 3 10 413 411 1188 | 3 87 216 413 1189 | 3 85 411 216 1190 | 3 11 415 414 1191 | 3 88 217 415 1192 | 3 87 414 217 1193 | 3 26 412 416 1194 | 3 88 218 412 1195 | 3 90 416 218 1196 | 3 11 417 415 1197 | 3 89 219 417 1198 | 3 88 415 219 1199 | 3 1 419 418 1200 | 3 90 220 419 1201 | 3 89 418 220 1202 | 3 26 416 420 1203 | 3 90 221 416 1204 | 3 92 420 221 1205 | 3 1 421 419 1206 | 3 91 222 421 1207 | 3 90 419 222 1208 | 3 14 423 422 1209 | 3 92 223 423 1210 | 3 91 422 223 1211 | 3 26 420 407 1212 | 3 92 224 420 1213 | 3 86 407 224 1214 | 3 14 392 423 1215 | 3 75 225 392 1216 | 3 92 423 225 1217 | 3 0 408 391 1218 | 3 86 226 408 1219 | 3 75 391 226 1220 | 3 27 425 424 1221 | 3 94 227 425 1222 | 3 93 424 227 1223 | 3 0 405 426 1224 | 3 83 228 405 1225 | 3 94 426 228 1226 | 3 18 427 404 1227 | 3 93 229 427 1228 | 3 83 404 229 1229 | 3 27 424 428 1230 | 3 93 230 424 1231 | 3 95 428 230 1232 | 3 18 364 427 1233 | 3 62 231 364 1234 | 3 93 427 231 1235 | 3 19 429 363 1236 | 3 95 232 429 1237 | 3 62 363 232 1238 | 3 27 428 430 1239 | 3 95 233 428 1240 | 3 96 430 233 1241 | 3 19 332 429 1242 | 3 46 234 332 1243 | 3 95 429 234 1244 | 3 7 431 331 1245 | 3 96 235 431 1246 | 3 46 331 235 1247 | 3 27 430 432 1248 | 3 96 236 430 1249 | 3 98 432 236 1250 | 3 7 433 431 1251 | 3 97 237 433 1252 | 3 96 431 237 1253 | 3 10 435 434 1254 | 3 98 238 435 1255 | 3 97 434 238 1256 | 3 27 432 425 1257 | 3 98 239 432 1258 | 3 94 425 239 1259 | 3 10 410 435 1260 | 3 84 240 410 1261 | 3 98 435 240 1262 | 3 0 426 409 1263 | 3 94 241 426 1264 | 3 84 409 241 1265 | 3 28 437 436 1266 | 3 100 242 437 1267 | 3 99 436 242 1268 | 3 7 328 438 1269 | 3 44 243 328 1270 | 3 100 438 243 1271 | 3 13 439 327 1272 | 3 99 244 439 1273 | 3 44 327 244 1274 | 3 28 436 440 1275 | 3 99 245 436 1276 | 3 101 440 245 1277 | 3 13 321 439 1278 | 3 41 246 321 1279 | 3 99 439 246 1280 | 3 6 441 320 1281 | 3 101 247 441 1282 | 3 41 320 247 1283 | 3 28 440 442 1284 | 3 101 248 440 1285 | 3 103 442 248 1286 | 3 6 443 441 1287 | 3 102 249 443 1288 | 3 101 441 249 1289 | 3 11 445 444 1290 | 3 103 250 445 1291 | 3 102 444 250 1292 | 3 28 442 446 1293 | 3 103 251 442 1294 | 3 104 446 251 1295 | 3 11 414 445 1296 | 3 87 252 414 1297 | 3 103 445 252 1298 | 3 10 447 413 1299 | 3 104 253 447 1300 | 3 87 413 253 1301 | 3 28 446 437 1302 | 3 104 254 446 1303 | 3 100 437 254 1304 | 3 10 434 447 1305 | 3 97 255 434 1306 | 3 104 447 255 1307 | 3 7 438 433 1308 | 3 100 256 438 1309 | 3 97 433 256 1310 | 3 29 449 448 1311 | 3 106 257 449 1312 | 3 105 448 257 1313 | 3 3 400 450 1314 | 3 80 258 400 1315 | 3 106 450 258 1316 | 3 15 451 399 1317 | 3 105 259 451 1318 | 3 80 399 259 1319 | 3 29 448 452 1320 | 3 105 260 448 1321 | 3 108 452 260 1322 | 3 15 453 451 1323 | 3 107 261 453 1324 | 3 105 451 261 1325 | 3 2 455 454 1326 | 3 108 262 455 1327 | 3 107 454 262 1328 | 3 29 452 456 1329 | 3 108 263 452 1330 | 3 109 456 263 1331 | 3 2 387 455 1332 | 3 74 264 387 1333 | 3 108 455 264 1334 | 3 8 457 386 1335 | 3 109 265 457 1336 | 3 74 386 265 1337 | 3 29 456 458 1338 | 3 109 266 456 1339 | 3 110 458 266 1340 | 3 8 350 457 1341 | 3 55 267 350 1342 | 3 109 457 267 1343 | 3 9 459 349 1344 | 3 110 268 459 1345 | 3 55 349 268 1346 | 3 29 458 449 1347 | 3 110 269 458 1348 | 3 106 449 269 1349 | 3 9 371 459 1350 | 3 66 270 371 1351 | 3 110 459 270 1352 | 3 3 450 370 1353 | 3 106 271 450 1354 | 3 66 370 271 1355 | 3 30 461 460 1356 | 3 113 272 461 1357 | 3 112 460 272 1358 | 3 1 463 462 1359 | 3 111 273 463 1360 | 3 113 462 273 1361 | 3 17 465 464 1362 | 3 112 274 465 1363 | 3 111 464 274 1364 | 3 30 460 466 1365 | 3 112 275 460 1366 | 3 114 466 275 1367 | 3 17 376 465 1368 | 3 67 276 376 1369 | 3 112 465 276 1370 | 3 2 467 375 1371 | 3 114 277 467 1372 | 3 67 375 277 1373 | 3 30 466 468 1374 | 3 114 278 466 1375 | 3 115 468 278 1376 | 3 2 454 467 1377 | 3 107 279 454 1378 | 3 114 467 279 1379 | 3 15 469 453 1380 | 3 115 280 469 1381 | 3 107 453 280 1382 | 3 30 468 470 1383 | 3 115 281 468 1384 | 3 116 470 281 1385 | 3 15 396 469 1386 | 3 78 282 396 1387 | 3 115 469 282 1388 | 3 14 471 395 1389 | 3 116 283 471 1390 | 3 78 395 283 1391 | 3 30 470 461 1392 | 3 116 284 470 1393 | 3 113 461 284 1394 | 3 14 422 471 1395 | 3 91 285 422 1396 | 3 116 471 285 1397 | 3 1 462 421 1398 | 3 113 286 462 1399 | 3 91 421 286 1400 | 3 31 473 472 1401 | 3 118 287 473 1402 | 3 117 472 287 1403 | 3 1 418 474 1404 | 3 89 288 418 1405 | 3 118 474 288 1406 | 3 11 475 417 1407 | 3 117 289 475 1408 | 3 89 417 289 1409 | 3 31 472 476 1410 | 3 117 290 472 1411 | 3 119 476 290 1412 | 3 11 444 475 1413 | 3 102 291 444 1414 | 3 117 475 291 1415 | 3 6 477 443 1416 | 3 119 292 477 1417 | 3 102 443 292 1418 | 3 31 476 478 1419 | 3 119 293 476 1420 | 3 120 478 293 1421 | 3 6 318 477 1422 | 3 39 294 318 1423 | 3 119 477 294 1424 | 3 16 479 317 1425 | 3 120 295 479 1426 | 3 39 317 295 1427 | 3 31 478 480 1428 | 3 120 296 478 1429 | 3 121 480 296 1430 | 3 16 380 479 1431 | 3 70 297 380 1432 | 3 120 479 297 1433 | 3 17 481 379 1434 | 3 121 298 481 1435 | 3 70 379 298 1436 | 3 31 480 473 1437 | 3 121 299 480 1438 | 3 118 473 299 1439 | 3 17 464 481 1440 | 3 111 300 464 1441 | 3 121 481 300 1442 | 3 1 474 463 1443 | 3 118 301 474 1444 | 3 111 463 301 1445 | -------------------------------------------------------------------------------- /graphics/plot_mesh.m: -------------------------------------------------------------------------------- 1 | %% plot_mesh 2 | % Plot mesh in an easy way, in pre-defined style or user-supplied style 3 | % Basically this is a wrap for trimesh, with additional style and data 4 | % binding (can be used in data cursor pickup). Mesh data (face,vertex) are 5 | % binding with the figure through "setappdata", in a struct form: 6 | % Mesh = struct('Face',face,'Vertex',vertex); 7 | % 8 | %% Syntax 9 | % p = plot_mesh(face,vertex,color) 10 | % p = plot_mesh(face,vertex,[],"PropertyName",PropertyValue,...) 11 | % 12 | %% Description 13 | % face : double array, nf x 3, connectivity of mesh 14 | % vertex: double array, nv x 3, vertex of mesh 15 | % color : double array, nv x 3 or nf x 3, vertex color, gray or rgb 16 | % varargin: additional property names and values pair, accept any 17 | % property-value pair which trimesh accepts. 18 | % 19 | % p: handle, a handle to the displayed figure 20 | % 21 | %% Example 22 | % p = plot_mesh(face,vertex,color) % use pre-defined style 23 | % p = plot_mesh(face,vertex,color,'EdgeColor',[36 169 225]/255) % specify edge color 24 | % p = plot_mesh(face,vertex,color,'FaceAlpha',0.5) % set face alpha to 0.5 25 | % 26 | %% Contribution 27 | % Author : Wen Cheng Feng 28 | % Created: 2014/03/ 29 | % Revised: 2014/03/24 by Wen, add doc 30 | % 31 | % Copyright 2014 Computational Geometry Group 32 | % Department of Mathematics, CUHK 33 | % http://www.math.cuhk.edu.hk/~lmlui 34 | 35 | function p = plot_mesh(face,vertex,color,varargin) 36 | if nargin < 2 37 | disp('warning: no enough inputs'); 38 | return; 39 | end 40 | dim = 3; 41 | if size(vertex,2) == 1 42 | vertex = [real(vertex),imag(vertex)]; 43 | dim = 2; 44 | end 45 | if ~exist('color','var') || isempty(color) 46 | po = patch('Faces',face,'Vertices',vertex,... 47 | 'FaceColor',[255 255 255]/255,... 48 | 'EdgeColor',[36 169 225]/255,... 49 | 'LineWidth',0.5,... 50 | 'CDataMapping','scaled'); 51 | % po = patch('Faces',face,'Vertices',vertex,... 52 | % 'FaceColor',[0.9 0.9 0.9],... 53 | % 'EdgeColor','none',... 54 | % 'FaceLighting','gouraud',... 55 | % 'AmbientStrength',0.2,... 56 | % 'DiffuseStrength',0.8,... 57 | % 'SpecularStrength',0,... 58 | % 'BackFaceLighting','lit'); 59 | % camproj('perspective') 60 | % light('Position',[0 0 -1],'Style','infinite'); 61 | elseif size(color,1) == size(vertex,1) 62 | po = patch('Faces',face,'Vertices',vertex,... 63 | 'FaceVertexCData',color,... 64 | 'FaceColor',[255 255 255]/255,... 65 | 'EdgeColor','flat',... 66 | 'LineWidth',0.5,... 67 | 'CDataMapping','scaled'); 68 | elseif size(color,1) == size(face,1) 69 | po = patch('Faces',face,'Vertices',vertex,... 70 | 'FaceVertexCData',color,... 71 | 'FaceColor','flat',... 72 | 'LineWidth',0.5,... 73 | 'CDataMapping','scaled'); 74 | end 75 | if ~isempty(varargin) 76 | set(po, varargin{:}); 77 | end 78 | if size(vertex,2) == 3 79 | camproj('perspective') 80 | end 81 | po.FaceLighting = 'gouraud'; 82 | g = gca; 83 | g.Clipping = 'off'; 84 | axis equal; 85 | if dim == 2 86 | view(0,90); 87 | end 88 | if nargout > 0 89 | p = po; 90 | end 91 | mesh = struct('Face',face,'Vertex',vertex); 92 | setappdata(gca,'Mesh',mesh); 93 | % graph = gcf; 94 | dcm_obj = datacursormode(gcf); 95 | set(dcm_obj,'UpdateFcn',@datatip_callback,'Enable','off') 96 | 97 | function output_txt = datatip_callback(obj,event) 98 | % Display the position of the data cursor 99 | % obj Currently not used (empty) 100 | % event_obj Handle to event object 101 | % output_txt Data cursor text string (string or cell array of strings). 102 | 103 | pos = get(event,'Position'); 104 | ax = get(get(event,'Target'),'Parent'); 105 | mesh = getappdata(ax,'Mesh'); 106 | 107 | d = dist(mesh.Vertex,pos); 108 | [~,index] = min(d); 109 | if length(pos)==3 110 | output_txt = {['index: ',num2str(index)],... 111 | ['X: ',num2str(pos(1),4)],... 112 | ['Y: ',num2str(pos(2),4)],... 113 | ['Z: ',num2str(pos(3),4)]}; 114 | else 115 | output_txt = {['index: ',num2str(index)],... 116 | ['X: ',num2str(pos(1),4)],... 117 | ['Y: ',num2str(pos(2),4)]}; 118 | end 119 | 120 | function d = dist(P,q) 121 | d = sqrt(dot(P-q,P-q,2)); 122 | -------------------------------------------------------------------------------- /graphics/plot_path.m: -------------------------------------------------------------------------------- 1 | %% plot path 2 | % Plot path on a mesh. Path can be a double array, specifying the vertex 3 | % index of the path on the mesh. Path can also be a cell, each cell 4 | % specify a path. If plot to figure with existing mesh, mesh will not be 5 | % plotted again. 6 | % 7 | %% Syntax 8 | % p = plot_path(face,vertex,path) 9 | % p = plot_path(face,vertex,path,style) 10 | % p = plot_path(face,vertex,path,style,marker) 11 | % p = plot_path(face,vertex,path,style,marker,marker_style) 12 | % 13 | %% Description 14 | % face : double array, nf x 3, connectivity of mesh 15 | % vertex: double array, nv x 3, vertex of mesh 16 | % path : double array, n1 x 1, vertex index of the path 17 | % cell array, n2 x 1, each cell is a path 18 | % style : string, path style 19 | % marker: double array, n3 x 1, marker index to plot 20 | % marker_style: string, marker style 21 | % 22 | % p: handle, a handle to the displayed figure 23 | % 24 | %% Example 25 | % p = plot_path(face,vertex,path) 26 | % p = plot_path(face,vertex,path,'r-') % same with last 27 | % p = plot_path(face,vertex,path,'b-',1:10,'ko') % also plot some markers with style 28 | % 29 | %% Contribution 30 | % Author : Wen Cheng Feng 31 | % Created: 2014/03/14 32 | % Revised: 2014/03/24 by Wen, add doc 33 | % 34 | % Copyright 2014 Computational Geometry Group 35 | % Department of Mathematics, CUHK 36 | % http://www.math.cuhk.edu.hk/~lmlui 37 | 38 | function p = plot_path(face,vertex,path,style,marker,marker_style) 39 | if isempty(getappdata(gca,'Mesh')) 40 | po = plot_mesh(face,vertex); 41 | end 42 | if ~exist('style','var') || isempty(style) 43 | style = 'r-'; 44 | end 45 | dim = 3; 46 | if size(vertex,2) == 2 47 | vertex(:,3) = 0; 48 | dim = 2; 49 | end 50 | if ~exist('marker','var') 51 | marker = []; 52 | end 53 | if ~exist('marker_style','var') || isempty(marker_style) 54 | marker_style = 'k*'; 55 | end 56 | hold on 57 | switch class(path) 58 | case 'cell' 59 | for i = 1:length(path) 60 | pi = path{i}; 61 | po = plot3(vertex(pi,1),vertex(pi,2),vertex(pi,3),style,'LineWidth',2); 62 | end 63 | case 'double' 64 | po = plot3(vertex(path,1),vertex(path,2),vertex(path,3),style,'LineWidth',2); 65 | end 66 | if ~isempty(marker) 67 | plot3(vertex(marker,1),vertex(marker,2),vertex(marker,3),marker_style); 68 | end 69 | if dim == 2 70 | view(0,90); 71 | end 72 | if nargout > 1 73 | p = po; 74 | end 75 | -------------------------------------------------------------------------------- /io/read_obj.m: -------------------------------------------------------------------------------- 1 | %% read obj 2 | % Read mesh data from wavefront OBJ format file, only triangle mesh supported. 3 | % 4 | % Data supported are: 5 | % 6 | % * geometric vertices (v) 7 | % * texture vertices (vt) 8 | % * vertex normals (vn) 9 | % * face (f) (triangle only) 10 | % 11 | % All other data will be discarded. 12 | 13 | %% Syntax 14 | % [face,vertex] = read_obj(filename) 15 | % [face,vertex,extra] = read_obj(filename) 16 | % 17 | %% Description 18 | % filename: string, file to read. 19 | % 20 | % face : double array, nf x 3, connectivity of the mesh. 21 | % vertex: double array, nv x 3, position of the vertices. 22 | % extra : struct, anything other than face and vertex are included. 23 | % 24 | %% Example 25 | % [face,vertex] = read_obj('cube.obj'); 26 | % [face,vertex,extra] = read_obj('face.obj'); 27 | % 28 | %% Contribution 29 | % Author : Wen Cheng Feng 30 | % Created: 2014/03/26 31 | % 32 | % Copyright 2014 Computational Geometry Group 33 | % Department of Mathematics, CUHK 34 | % http://www.math.cuhk.edu.hk/~lmlui 35 | 36 | function [face,vertex,extra] = read_obj(filename) 37 | % read whole file into a string 38 | text = fileread(filename); 39 | % split text into lines 40 | [~,lines] = regexp(text,'\n','match','split'); 41 | % remove empty and comment lines 42 | ind = cellfun(@(s) isempty(s) || strcmp(s(1),char(13)) || strcmp(s(1),'#'),lines); 43 | lines(ind) = []; 44 | 45 | % find all face lines that start with 'f' 46 | ind = cellfun(@(s) strcmp(s(1),'f'),lines); 47 | face_lines = lines(ind); 48 | lines(ind) = []; 49 | % determine format of face line 50 | [type,format,sz] = get_format(face_lines{1}); 51 | % join face lines to a string 52 | face_string = strjoin(face_lines,'\n'); 53 | % scan face from string 54 | face = sscanf(face_string,format); 55 | face = reshape(face,sz,length(face)/sz)'; 56 | 57 | % find all vertex lines that start with 'v' 58 | ind = cellfun(@(s) strcmp(s(1:2),'v '),lines); 59 | vertex_lines = lines(ind); 60 | lines(ind) = []; 61 | % determint format of vertex line 62 | [type,format,sz] = get_format(vertex_lines{1}); 63 | % join vertex lines to a string 64 | vertex_string = strjoin(vertex_lines,'\n'); 65 | % scan vertex from string 66 | vertex = sscanf(vertex_string,format); 67 | vertex = reshape(vertex,sz,length(vertex)/sz)'; 68 | 69 | % put all other stuff into a structure extra 70 | extra = []; 71 | if size(vertex,2) > 3 72 | % if vertex line have more than 3 number, then it's color 73 | vertex_color = vertex(:,4:end); 74 | vertex = vertex(:,1:3); 75 | extra.vertex_color = vertex_color; 76 | end 77 | 78 | % check if texture and normal are contained 79 | texture = []; 80 | normal = []; 81 | ind = cellfun(@(s) strcmp(s(1:2),'vt'),lines); 82 | texture_lines = lines(ind); 83 | lines(ind) = []; 84 | if sum(ind) 85 | texture_string = strjoin(texture_lines,'\n'); 86 | [type,format,sz] = get_format(texture_lines{1}); 87 | texture = sscanf(texture_string,format); 88 | texture = reshape(texture,sz,length(texture)/sz)'; 89 | extra.texture = texture; 90 | end 91 | ind = cellfun(@(s) strcmp(s(1:2),'vn'),lines); 92 | normal_lines = lines(ind); 93 | if sum(ind) 94 | normal_string = strjoin(normal_lines,'\n'); 95 | [type,format,sz] = get_format(normal_lines{1}); 96 | normal = sscanf(normal_string,format); 97 | normal = reshape(normal,sz,length(normal)/sz)'; 98 | extra.normal = normal; 99 | end 100 | 101 | % if texture or normal contained, retrive face_texture and face_normal from 102 | % face array 103 | if ~isempty(texture) && ~isempty(normal) 104 | face_texture = face(:,[2 5 8]); 105 | face_normal = face(:,[3 6 9]); 106 | face = face(:,[1 4 7]); 107 | extra.face_texture = face_texture; 108 | extra.face_normal = face_normal; 109 | elseif ~isempty(texture) && isempty(normal) 110 | face_texture = face(:,[2 4 6]); 111 | face = face(:,[1 3 5]); 112 | extra.face_texture = face_texture; 113 | elseif isempty(texture) && ~isempty(normal) 114 | face_normal = face(:,[2 4 6]); 115 | face = face(:,[1 3 5]); 116 | extra.face_normal = face_normal; 117 | end 118 | 119 | function [type,format,sz] = get_format(str) 120 | % determine the format of input str 121 | sn = '[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)'; % match number 122 | ss = '[a-zA-Z]+'; % match string 123 | format = regexprep(str,sn,'%f'); 124 | if format(end) ~= char(13) 125 | format = [format,'\n']; 126 | end 127 | [type,~] = regexp(str,ss,'match'); 128 | type = type{1}; 129 | [~,splitstr] = regexp(str,sn,'match'); 130 | sz = length(splitstr); 131 | -------------------------------------------------------------------------------- /io/read_off.m: -------------------------------------------------------------------------------- 1 | %% read_off 2 | % Read mesh data from OFF file. 3 | % 4 | %% Syntax 5 | % [face,vertex] = read_off(filename) 6 | % [face,vertex,extra] = read_off(filename) 7 | % 8 | %% Description 9 | % filename: string, file to read. 10 | % 11 | % face : double array, nf x 3, connectivity of the mesh. 12 | % vertex: double array, nv x 3, position of the vertices. 13 | % extra : struct, anything other than face and vertex are included. 14 | % 15 | %% Example 16 | % [face,vertex] = read_off('torus.off'); 17 | % [face,vertex,extra] = read_off('torus.off'); 18 | % 19 | %% Contribution 20 | % Author : Wen Cheng Feng 21 | % Created: 2014/03/27 22 | % 23 | % Copyright 2014 Computational Geometry Group 24 | % Department of Mathematics, CUHK 25 | % http://www.math.cuhk.edu.hk/~lmlui 26 | 27 | function [face,vertex,extra] = read_off(filename) 28 | fid = fopen(filename,'r'); 29 | if( fid == -1 ) 30 | error('Can''t open the file.'); 31 | end 32 | 33 | % determine if this is an OFF file 34 | line = get_next_line(fid); 35 | type = sscanf(line,'%s'); 36 | if ~strcmp(type,'OFF') && ~strcmp(type,'COFF') && ~strcmp(type,'CNOFF') 37 | fclose(fid); 38 | error('Not a valid OFF file.'); 39 | end 40 | % read vertex and face number 41 | line = get_next_line(fid); 42 | nvf = sscanf(line,'%d'); 43 | nv = nvf(1); 44 | nf = nvf(2); 45 | 46 | % read vertex 47 | k = 0; 48 | vertex = []; 49 | line = get_next_line(fid); 50 | [format,sz] = get_format(line); 51 | fseek(fid,-length(line),'cof'); 52 | while k < nv 53 | A = fscanf(fid,format,(nv-k)*sz); 54 | vertex = [vertex;reshape(A,sz,length(A)/sz)']; 55 | k = k + length(A)/sz; 56 | line = get_next_line(fid); 57 | if line == -1 % end of file 58 | if k ~= nv 59 | error('vertex data is not correct.'); 60 | end 61 | end 62 | fseek(fid,-length(line),'cof'); 63 | end 64 | 65 | % read face 66 | k = 0; 67 | face = []; 68 | line = get_next_line(fid); 69 | [format,sz] = get_format(line); 70 | fseek(fid,-length(line),'cof'); 71 | while k < nf 72 | A = fscanf(fid,format,(nf-k)*sz); 73 | face = [face;reshape(A,sz,length(A)/sz)']; 74 | k = k + length(A)/sz; 75 | line = get_next_line(fid); 76 | if line == -1 % end of file 77 | if k ~= nf 78 | error('face data is not correct.'); 79 | end 80 | end 81 | fseek(fid,-length(line),'cof'); 82 | end 83 | 84 | extra = []; 85 | if size(vertex,2) > 3 86 | extra.Vertex_color = vertex(:,4:end); 87 | vertex = vertex(:,1:3); 88 | end 89 | face(:,2:4) = face(:,2:4) + 1; 90 | if size(face,2) > 4 91 | extra.Face_color = face(:,5:end); 92 | end 93 | face = face(:,2:4); 94 | 95 | fclose(fid); 96 | 97 | function line = get_next_line(fid) 98 | % read next line, skip comment, blank line and eof 99 | line = fgets(fid); 100 | if line == -1 101 | return 102 | end 103 | while isempty(strtrim(line)) || line(1) == '#' 104 | line = fgets(fid); 105 | if line == -1 106 | return; 107 | end 108 | end 109 | 110 | function [format,sz] = get_format(str) 111 | % determine the format of input str 112 | sn = '[\-+]?(?:\d*\.|)\d+\.?(?:[eE][\-+]?\d+|)'; % match number 113 | format = regexprep(str,sn,'%f'); 114 | [~,splitstr] = regexp(str,sn,'match'); 115 | sz = length(splitstr); -------------------------------------------------------------------------------- /io/read_ply.m: -------------------------------------------------------------------------------- 1 | %% read ply 2 | % Read mesh data from ply format mesh file 3 | % 4 | %% Syntax 5 | % [face,vertex]= read_ply(filename) 6 | % [face,vertex,color] = read_ply(filename) 7 | % 8 | %% Description 9 | % filename: string, file to read. 10 | % 11 | % face : double array, nf x 3 array specifying the connectivity of the mesh. 12 | % vertex: double array, nv x 3 array specifying the position of the vertices. 13 | % color : double array, nv x 3 or nf x 3 array specifying the color of the vertices or faces. 14 | % 15 | %% Example 16 | % [face,vertex] = read_ply('cube.ply'); 17 | % [face,vertex,color] = read_ply('cube.ply'); 18 | % 19 | %% Contribution 20 | % Author : Meng Bin 21 | % Created: 2014/03/05 22 | % Revised: 2014/03/07 by Meng Bin, Block read to enhance reading speed 23 | % Revised: 2014/03/17 by Meng Bin, modify doc format 24 | % 25 | % Copyright 2014 Computational Geometry Group 26 | % Department of Mathematics, CUHK 27 | % http://www.math.cuhk.edu.hk/~lmlui 28 | 29 | function [face,vertex,color] = read_ply(filename) 30 | 31 | fid = fopen(filename,'r'); 32 | if( fid==-1 ) 33 | error('Can''t open the file.'); 34 | end 35 | 36 | % read header 37 | str = ''; 38 | while (~feof(fid) && isempty(str)) 39 | str = strtrim(fgets(fid)); 40 | end 41 | if ~stricmp(str(1:3), 'ply') 42 | error('The file is not a valid ply one.'); 43 | end 44 | 45 | file_format = ''; 46 | nvert = 0; 47 | nface = 0; 48 | stage = ''; 49 | while (~feof(fid)) 50 | str = strtrim(fgets(fid)); 51 | if stricmp(str, 'end_header') 52 | break; 53 | end 54 | tokens = regexp(str,'\s+','split'); 55 | if (size(tokens,2) <= 2) 56 | continue; 57 | end 58 | if strcmpi(tokens(1), 'comment') 59 | elseif strcmpi(tokens(1), 'format') 60 | file_format = lower(tokens(2)); 61 | elseif strcmpi(tokens(1), 'element') 62 | if strcmpi(tokens(2),'vertex') 63 | nvert = str2num(tokens{3}); 64 | stage = 'vertex'; 65 | elseif strcmpi(tokens(2),'face') 66 | nface = str2num(tokens{3}); 67 | stage = 'face'; 68 | end 69 | elseif strcmpi(tokens(1), 'property') 70 | end 71 | end 72 | 73 | if strcmpi(file_format, 'ascii') 74 | [face,vertex,color] = read_ascii(fid, nvert, nface); 75 | %elseif strcmp(lower(file_format), 'binary_little_endian') 76 | %elseif strcmp(lower(file_format), 'binary_big_endian') 77 | else 78 | error('The file is not a valid ply one. We only support ascii now.'); 79 | end 80 | 81 | fclose(fid); 82 | 83 | 84 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 85 | function [face,vertex,color] = read_ascii(fid, nvert, nface) 86 | % read ASCII format ply file 87 | color = []; 88 | 89 | %read vertex info 90 | tot_cnt = 0; 91 | cols = 0; 92 | A = []; 93 | 94 | tline = ''; 95 | while (~feof(fid) && (isempty(tline) || tline(1) == '#')) 96 | pos = ftell(fid); 97 | tline = strtrim(fgets(fid)); 98 | end 99 | C = regexp(tline,'\s+','split'); 100 | % read columns of vertex line 101 | cols = size(C,2); 102 | %rewind to starting of the line 103 | fseek(fid, pos,-1); 104 | %vertex and color line format string 105 | format = strcat(repmat('%f ', [1, cols]), '\n'); 106 | 107 | %start reading 108 | while (~feof(fid) && tot_cnt < cols*nvert) 109 | [A_,cnt] = fscanf(fid,format, cols*nvert-tot_cnt); 110 | tot_cnt = tot_cnt + cnt; 111 | A = [A;A_]; 112 | skip_comment_blank_line(fid,1); 113 | end 114 | 115 | if tot_cnt~=cols*nvert 116 | warning('Problem in reading vertices. number of vertices doesnt match header.'); 117 | end 118 | A = reshape(A, cols, tot_cnt/cols); 119 | vertex = A(1:3,:)'; 120 | 121 | % extract vertex color 122 | if cols == 6 123 | color = A(4:6,:)'; 124 | elseif cols > 6 125 | color = A(4:7,:)'; 126 | end 127 | 128 | %read face info 129 | tot_cnt = 0; 130 | A = []; 131 | tline = ''; 132 | while (~feof(fid) && (isempty(tline) || tline(1) == '#')) 133 | pos = ftell(fid); 134 | tline = strtrim(fgets(fid)); 135 | end 136 | C = regexp(tline,'\s+','split'); 137 | % read columns of face line 138 | nvert_f = str2num(C{1}); 139 | cols = nvert_f+1; 140 | if isempty(color) 141 | cols = size(C,2); 142 | end 143 | %rewind to starting of the line 144 | fseek(fid, pos,-1); 145 | %face and color line format string 146 | format = strcat(repmat('%d ', [1, nvert_f+1]), repmat('%f ', [1, cols-nvert_f-1])); 147 | format = strcat(format, '\n'); 148 | 149 | 150 | while (~feof(fid) && tot_cnt < cols*nface) 151 | [A_,cnt] = fscanf(fid,format, cols*nface-tot_cnt); 152 | tot_cnt = tot_cnt + cnt; 153 | A = [A;A_]; 154 | skip_comment_blank_line(fid,1); 155 | end 156 | 157 | if tot_cnt~=cols*nface 158 | warning('Problem in reading faces. Number of faces doesnt match header.'); 159 | end 160 | A = reshape(A, cols, tot_cnt/cols); 161 | face = A(2:nvert_f+1,:)'+1; 162 | 163 | % extract face color 164 | if cols > nvert_f+1 165 | color = A(nvert_f+2:cols,:)'; 166 | end 167 | color = color*1.0/255; 168 | 169 | function [tline] = skip_comment_blank_line(fid,rewind) 170 | % skip empty and comment lines 171 | % get next content line 172 | % if rewind==1, then rewind to the starting of the content line 173 | tline = ''; 174 | if rewind==1 175 | pos = ftell(fid); 176 | end 177 | while (~feof(fid) && (isempty(tline))) 178 | if rewind==1 179 | pos = ftell(fid); 180 | end 181 | tline = strtrim(fgets(fid)); 182 | end 183 | if rewind==1 184 | fseek(fid, pos,-1); 185 | end 186 | 187 | 188 | 189 | 190 | 191 | -------------------------------------------------------------------------------- /io/write_obj.m: -------------------------------------------------------------------------------- 1 | %% write obj 2 | % Write mesh data to OBJ format mesh file 3 | % 4 | %% Syntax 5 | % write_obj(filename,face,vertex) 6 | % 7 | %% Description 8 | % filename: string, file to read. 9 | % face : double array, nf x 3 array specifying the connectivity of the mesh. 10 | % vertex : double array, nv x 3 array specifying the position of the vertices. 11 | % color : double array, nv x 3 or nf x 3 array specifying the color of the vertices or faces. 12 | % 13 | %% Example 14 | % write_obj('cube.obj',face,vertex); 15 | % 16 | %% Contribution 17 | % Author : Meng Bin 18 | % History: 2014/03/05 file created 19 | % Revised: 2014/03/07 by Meng Bin, Block write to enhance writing speed 20 | % Revised: 2014/03/17 by Meng Bin, modify doc format 21 | % 22 | % Copyright 2014 Computational Geometry Group 23 | % Department of Mathematics, CUHK 24 | % http://www.math.cuhk.edu.hk/~lmlui 25 | 26 | function write_obj(filename,face,vertex) 27 | 28 | fid = fopen(filename,'w'); 29 | if( fid==-1 ) 30 | error('Can''t open the file.'); 31 | end 32 | 33 | %write logo 34 | fprintf (fid, '#Generated by geometric processing package.\n'); 35 | 36 | %write vertex 37 | fprintf (fid, 'v %.6f %.6f %.6f\n',vertex'); 38 | 39 | %write face 40 | fprintf (fid, 'f %d %d %d\n',face'); 41 | % for i = 1:nface 42 | % fprintf (fid, '%s ','f'); 43 | % for j = 1:nvert_face 44 | % fprintf (fid, '%d ',face(i,j)-1); 45 | % end 46 | % fprintf (fid, '\n'); 47 | % end 48 | 49 | fclose(fid); 50 | -------------------------------------------------------------------------------- /io/write_off.m: -------------------------------------------------------------------------------- 1 | %% write off 2 | % Write mesh data to OFF format mesh file 3 | % 4 | %% Syntax 5 | % write_off(filename,face,vertex,color) 6 | % write_off(filename,face,vertex) 7 | % 8 | %% Description 9 | % filename: string, file to read. 10 | % face : double array, nf x 3 array specifying the connectivity of the mesh. 11 | % vertex : double array, nv x 3 array specifying the position of the vertices. 12 | % color : double array, nv x 3 or nf x 3 array specifying the color of the vertices or faces. 13 | % 14 | %% Example 15 | % write_off('temp.off',face,vertex); 16 | % write_off('temp.off',face,vertex,clor); 17 | % 18 | %% Contribution 19 | % Author : Meng Bin 20 | % Created: 2014/03/05 21 | % Revised: 2014/03/07 by Meng Bin, Block write to enhance writing speed. 22 | % Revised: 2014/03/17 by Meng Bin, modify doc format 23 | % 24 | % Copyright 2014 Computational Geometry Group 25 | % Department of Mathematics, CUHK 26 | % http://www.math.cuhk.edu.hk/~lmlui 27 | 28 | function write_off(filename,face,vertex,color) 29 | 30 | if nargin < 4 31 | color = []; 32 | end 33 | 34 | fid = fopen(filename,'wt'); 35 | if( fid==-1 ) 36 | error('Can''t open the file.'); 37 | end 38 | 39 | nvert = size(vertex, 1); 40 | nface = size(face, 1); 41 | nvert_face = size(face, 2); 42 | 43 | ncolor =0; 44 | if ~isempty(color) 45 | ncolor = size(color, 1); 46 | end 47 | 48 | fprintf (fid, 'OFF\n'); 49 | fprintf (fid, '%d %d %d\n',nvert, nface, 0); 50 | 51 | if nvert == ncolor 52 | vertex = [vertex';color']'; 53 | end 54 | if nface == ncolor && nvert ~= ncolor 55 | face =[zeros(1,nface)+nvert_face; face'-1;color']'; 56 | else 57 | face =[zeros(1,nface)+nvert_face;face'-1]'; 58 | end 59 | dlmwrite(filename,vertex,'-append',... 60 | 'delimiter',' ',... 61 | 'precision', 6,... 62 | 'newline','pc'); 63 | 64 | dlmwrite(filename,face,'-append',... 65 | 'delimiter',' ',... 66 | 'newline','pc'); 67 | 68 | fclose(fid); 69 | 70 | end 71 | 72 | -------------------------------------------------------------------------------- /io/write_ply.m: -------------------------------------------------------------------------------- 1 | %% write ply 2 | % Write mesh data to ply format mesh file 3 | % 4 | %% Syntax 5 | % write_ply(filename,face,vertex) 6 | % write_ply(filename,face,vertex,color) 7 | % 8 | %% Description 9 | % filename: string, file to read. 10 | % face : double array, nf x 3 array specifying the connectivity of the mesh. 11 | % vertex : double array, nv x 3 array specifying the position of the vertices. 12 | % color : double array, nv x 3 or nf x 3 array specifying the color of the vertices or faces. 13 | % 14 | %% Example 15 | % write_ply('cube.ply',face,vertex); 16 | % write_ply('cube.ply',face,vertex,color); 17 | % 18 | %% Contribution 19 | % Author : Meng Bin 20 | % Created: 2014/03/05 21 | % Revised: 2014/03/07 by Meng Bin, block write to enhance writing speed 22 | % Revised: 2014/03/17 by Meng Bin, modify doc format 23 | % 24 | % Copyright 2014 Computational Geometry Group 25 | % Department of Mathematics, CUHK 26 | % http://www.math.cuhk.edu.hk/~lmlui 27 | 28 | function write_ply(filename,face,vertex,color) 29 | 30 | fid = fopen(filename,'wt'); 31 | if( fid==-1 ) 32 | error('Can''t open the file.'); 33 | end 34 | 35 | nvert = size(vertex, 1); 36 | nface = size(face, 1); 37 | nvert_face = size(face, 2); 38 | 39 | 40 | ncolor =0; 41 | if nargin < 4 42 | color = []; 43 | end 44 | if ~isempty(color) 45 | ncolor = size(color, 1); 46 | if size(color, 2) < 3 47 | error('color matrix dimension must > 3'); 48 | end 49 | end 50 | 51 | %write header 52 | fprintf (fid, 'ply\n'); 53 | fprintf (fid, 'format ascii 1.0\n'); 54 | fprintf (fid, 'comment generated by geometric processing package\n'); 55 | fprintf (fid, 'element vertex %d\n',nvert); 56 | fprintf (fid, 'property float x\n'); 57 | fprintf (fid, 'property float y\n'); 58 | fprintf (fid, 'property float z\n'); 59 | if ~isempty(color) && ncolor == nvert 60 | fprintf (fid, 'property red uchar\n'); 61 | fprintf (fid, 'property green uchar\n'); 62 | fprintf (fid, 'property blue uchar\n'); 63 | end 64 | fprintf (fid, 'element face %d\n',nface); 65 | fprintf (fid, 'property list uchar int vertex_indices\n'); 66 | if ~isempty(color) && ncolor == nface && ncolor ~= nvert 67 | fprintf (fid, 'property red uchar\n'); 68 | fprintf (fid, 'property green uchar\n'); 69 | fprintf (fid, 'property blue uchar\n'); 70 | end 71 | fprintf (fid, 'end_header\n'); 72 | 73 | if nvert == ncolor 74 | vertex = [vertex';color']'; 75 | end 76 | if nface == ncolor && nvert ~= ncolor 77 | face =[zeros(1,nface)+nvert_face; face'-1;color']'; 78 | else 79 | face =[zeros(1,nface)+nvert_face;face'-1]'; 80 | end 81 | %write vertex 82 | dlmwrite(filename,vertex,'-append',... 83 | 'delimiter',' ',... 84 | 'precision', 6,... 85 | 'newline','pc'); 86 | %write face 87 | dlmwrite(filename,face,'-append',... 88 | 'delimiter',' ',... 89 | 'newline','pc'); 90 | 91 | fclose(fid); 92 | -------------------------------------------------------------------------------- /misc/csc_to_sparse.m: -------------------------------------------------------------------------------- 1 | %% csc to sparse 2 | % Convert CSC (Compressed Sparse Column) format to sparse matrix. 3 | % 4 | % This is inverse function of sparse_to_csc. Note that if nrows is not 5 | % given and last rows of matrix are all zeros, then sparse matrix may not 6 | % have same size with CSC format matrix, since we take the max row index 7 | % used in ri as the rows of matrix. 8 | % 9 | %% Syntax 10 | % A = csc_to_sparse(cp,ri,val) 11 | % A = csc_to_sparse(cp,ri,val,nrows) 12 | % 13 | %% Description 14 | % 15 | % cp : double array, (ncols+1) x 1, index of start of each column, cp(ncols+1) indicates ending 16 | % ri : double array, nnz x 1, row indices of each nonzero element 17 | % val: double array, nnz x 1, value of each nonzero element 18 | % nrows: double scalar, optional, rows of sparse matrix A, no need to input ncols, 19 | % since ncols = length(cp)-1. If not given, nrows will be computed 20 | % as the max index in ri. 21 | % 22 | % A: sparse matrix, m x n 23 | % 24 | %% Contribution 25 | % Author : Wen Cheng Feng 26 | % Created: 2014/04/03 27 | % 28 | % Copyright 2014 Computational Geometry Group 29 | % Department of Mathematics, CUHK 30 | % http://www.math.cuhk.edu.hk/~lmlui 31 | 32 | function A = csc_to_sparse(cp,ri,val,nrows) 33 | ncols = length(cp)-1; 34 | J = zeros(length(ri),1); 35 | for i = 1:ncols 36 | J(cp(i):cp(i+1)-1) = i; 37 | end 38 | if ~exist('nrows','var') 39 | nrows = max(ri); 40 | end 41 | A = sparse(ri,J,val,nrows,ncols); 42 | -------------------------------------------------------------------------------- /misc/csr_to_sparse.m: -------------------------------------------------------------------------------- 1 | %% csr to sparse 2 | % Convert CSR (Compressed Sparse Row) format to sparse matrix. 3 | % 4 | % This is inverse function of sparse_to_csr. Note that if ncols is not 5 | % given and last cols of matrix are all zeros, then sparse matrix may not 6 | % have same size with CSR format matrix, since we take the max col index 7 | % used in ci as the cols of matrix. 8 | % 9 | %% Syntax 10 | % A = csr_to_sparse(rp,ci,val) 11 | % A = csr_to_sparse(rp,ci,val,ncols) 12 | % 13 | %% Description 14 | % 15 | % rp : double array, (nrows+1) x 1, index of start of each row, rp(nrows+1) indicates ending 16 | % ci : double array, nnz x 1, column indices of each nonzero element 17 | % val: double array, nnz x 1, value of each nonzero element 18 | % ncols: double scalar, optional, cols of sparse matrix A, no need to input nrows, 19 | % since nrows = length(rp)-1. If not given, ncols will be computed 20 | % as the max index in ci. 21 | % 22 | % A: sparse matrix, m x n 23 | % 24 | %% Contribution 25 | % Author : Wen Cheng Feng 26 | % Created: 2014/04/03 27 | % 28 | % Copyright 2014 Computational Geometry Group 29 | % Department of Mathematics, CUHK 30 | % http://www.math.cuhk.edu.hk/~lmlui 31 | 32 | function A = csr_to_sparse(rp,ci,val,ncols) 33 | nrows = length(rp)-1; 34 | I = zeros(length(ci),1); 35 | for i = 1:nrows 36 | I(rp(i):rp(i+1)-1) = i; 37 | end 38 | if ~exist('ncols','var') 39 | ncols = max(ci); 40 | end 41 | A = sparse(I,ci,val,nrows,ncols); 42 | -------------------------------------------------------------------------------- /misc/sparse_to_csc.m: -------------------------------------------------------------------------------- 1 | %% sparse to csc 2 | % Convert sparse matrix to CSC (Compressed Sparse Column) format. 3 | % 4 | % Access sparse matrix row by row may be slow in matlab, use CSC format to 5 | % accelerate it, check dijkstra for typical usage. 6 | % 7 | %% Syntax 8 | % [cp,ri,val,nrows] = sparse_to_csc(A) 9 | % 10 | %% Description 11 | % A: sparse matrix, nrows x ncols 12 | % 13 | % cp : double array, (ncols+1) x 1, index of start of each column, cp(ncols+1) indicates ending 14 | % ri : double array, nnz x 1, row indices of each nonzero element 15 | % val: double array, nnz x 1, value of each nonzero element 16 | % nrows: double scalar, rows of sparse matrix A, no need to return ncols, 17 | % since ncols = length(cp)-1; 18 | % 19 | %% Contribution 20 | % Author : Wen Cheng Feng 21 | % Created: 2014/03/20 22 | % Revised: 2014/04/03 by Wen, simplify code and add doc 23 | % 24 | % Copyright 2014 Computational Geometry Group 25 | % Department of Mathematics, CUHK 26 | % http://www.math.cuhk.edu.hk/~lmlui 27 | 28 | function [cp,ri,val,nrows] = sparse_to_csc(A) 29 | [nrows,ncols] = size(A); 30 | [ri,J,val] = find(A); 31 | cp = accumarray(J+1,1); 32 | cp = cumsum(cp)+1; 33 | -------------------------------------------------------------------------------- /misc/sparse_to_csr.m: -------------------------------------------------------------------------------- 1 | %% sparse to csr 2 | % Convert sparse matrix to csc (Compressed Sparse Row) format. 3 | % 4 | % Access sparse matrix row by row (or col by col) may be slow in Matlab, 5 | % use CSR format to accelerate it. CSC format is recommended, since Matlab 6 | % stored data in column-first order. 7 | % 8 | %% Syntax 9 | % [rp,ci,val,ncols] = sparse_to_csr(A) 10 | % 11 | %% Description 12 | % A: sparse matrix, mrows x ncols 13 | % 14 | % rp : double array, (nrows+1) x 1, index of start of each row, cp(nrows+1) indicates ending 15 | % ci : double array, nnz x 1, column indices of each nonzero element 16 | % val: double array, nnz x 1, value of each nonzero element 17 | % ncols: double scalar, columns of sparse matrix A, no need to return nrows, 18 | % since nrows = length(rp)-1; 19 | % 20 | %% Contribution 21 | % Author : Wen Cheng Feng 22 | % Created: 2014/03/20 23 | % Revised: 2014/04/03 by Wen, simplify code and add doc 24 | % 25 | % Copyright 2014 Computational Geometry Group 26 | % Department of Mathematics, CUHK 27 | % http://www.math.cuhk.edu.hk/~lmlui 28 | 29 | function [rp,ci,val,ncols] = sparse_to_csr(A) 30 | [nrows,ncols] = size(A); 31 | [ci,J,val] = find(A'); 32 | rp = accumarray(J+1,1); 33 | rp = cumsum(rp)+1; 34 | -------------------------------------------------------------------------------- /parameterization/disk_harmonic_map.m: -------------------------------------------------------------------------------- 1 | %% disk harmonic map 2 | % Disk harmonic map of a 3D simply-connected surface. 3 | % 4 | %% Syntax 5 | % uv = disk_harmonic_map(face,vertex) 6 | % 7 | %% Description 8 | % face : double array, nf x 3, connectivity of mesh 9 | % vertex: double array, nv x 3, vertex of mesh 10 | % 11 | % uv: double array, nv x 2, uv coordinates of vertex on 2D circle domain 12 | % 13 | %% Contribution 14 | % Author : Wen Cheng Feng 15 | % Created: 2014/03/18 16 | % Revised: 2014/03/24 by Wen, add doc 17 | % 18 | % Copyright 2014 Computational Geometry Group 19 | % Department of Mathematics, CUHK 20 | % http://www.math.cuhk.edu.hk/~lmlui 21 | 22 | function uv = disk_harmonic_map(face,vertex) 23 | nv = size(vertex,1); 24 | bd = compute_bd(face); 25 | % bl is boundary edge length 26 | db = vertex(bd,:) - vertex(bd([2:end,1]),:); 27 | bl = sqrt(dot(db,db,2)); 28 | t = cumsum(bl)/sum(bl)*2*pi; 29 | t = t([end,1:end-1]); 30 | % use edge length to parameterize boundary 31 | uvbd = [cos(t),sin(t)]; 32 | uv = zeros(nv,2); 33 | uv(bd,:) = uvbd; 34 | in = true(nv,1); 35 | in(bd) = false; 36 | A = laplace_beltrami(face,vertex); 37 | Ain = A(in,in); 38 | rhs = -A(in,bd)*uvbd; 39 | uvin = Ain\rhs; 40 | uv(in,:) = uvin; 41 | -------------------------------------------------------------------------------- /parameterization/rect_harmonic_map.m: -------------------------------------------------------------------------------- 1 | %% rec_harmonic_map 2 | % Harmonic map of a 3D simply-connected surface to 2D unit square 3 | % 4 | %% Syntax 5 | % uv = rect_harmonic_map(face,vertex,corner) 6 | % 7 | %% Description 8 | % face : double array, nf x 3, connectivity of mesh 9 | % vertex: double array, nv x 3, vertex of mesh 10 | % corner: double array, four corners of rectangle, can be just 4x1 vertex 11 | % index, or 4x2 with second col be complex target position of 12 | % rectangle corners, or 4x3 with second and third cols be real 13 | % target position of corners 14 | % 15 | % uv: double array, nv x 2, uv coordinates of vertex on 2D unit square domain 16 | % 17 | %% Contribution 18 | % Author : Wen Cheng Feng 19 | % Created: 2014/03/18 20 | % Revised: 2014/03/24 by Wen, add doc 21 | % 22 | % Copyright 2014 Computational Geometry Group 23 | % Department of Mathematics, CUHK 24 | % http://www.math.cuhk.edu.hk/~lmlui 25 | 26 | function uv = rect_harmonic_map(face,vertex,corner) 27 | nv = size(vertex,1); 28 | bd = compute_bd(face); 29 | nbd = size(bd,1); 30 | 31 | i = find(bd==corner(1),1,'first'); 32 | bd = bd([i:end,1:i]); 33 | corner = corner([1:end,1],:); 34 | 35 | ck = zeros(size(corner,1),1); 36 | k = 1; 37 | for i = 1:length(bd) 38 | if(bd(i) == corner(k)) 39 | ck(k) = i; 40 | k = k+1; 41 | end 42 | end 43 | 44 | uvbd = zeros(nbd,2); 45 | if size(corner,2) == 2 || size(corner,2) == 3 46 | if size(corner,2) == 3 47 | zc = corner(:,2)+1i*corner(:,3); 48 | else 49 | zc = corner; 50 | end 51 | zbd = zeros(nbd,1); 52 | 53 | zbd(ck(1):ck(2)) = linspace(zc(1),zc(2),ck(2)-ck(1)+1); 54 | zbd(ck(2):ck(3)) = linspace(zc(2),zc(3),ck(3)-ck(2)+1); 55 | zbd(ck(3):ck(4)) = linspace(zc(3),zc(4),ck(4)-ck(3)+1); 56 | zbd(ck(4):ck(5)) = linspace(zc(4),zc(5),ck(5)-ck(4)+1); 57 | uvbd = [real(zbd),imag(zbd)]; 58 | else 59 | uvbd(ck(1):ck(2),1) = linspace(0,1,ck(2)-ck(1)+1)'; 60 | uvbd(ck(1):ck(2),2) = 0; 61 | uvbd(ck(2):ck(3),1) = 1; 62 | uvbd(ck(2):ck(3),2) = linspace(0,1,ck(3)-ck(2)+1)'; 63 | uvbd(ck(3):ck(4),1) = linspace(1,0,ck(4)-ck(3)+1)'; 64 | uvbd(ck(3):ck(4),2) = 1; 65 | uvbd(ck(4):ck(5),1) = 0; 66 | uvbd(ck(4):ck(5),2) = linspace(1,0,ck(5)-ck(4)+1)'; 67 | end 68 | uvbd(end,:) = []; 69 | bd(end) = []; 70 | uv = zeros(nv,2); 71 | uv(bd,:) = uvbd; 72 | in = true(nv,1); 73 | in(bd) = false; 74 | A = laplace_beltrami(face,vertex); 75 | Ain = A(in,in); 76 | rhs = -A(in,bd)*uvbd; 77 | uvin = Ain\rhs; 78 | uv(in,:) = uvin; 79 | -------------------------------------------------------------------------------- /parameterization/spherical_conformal_map.m: -------------------------------------------------------------------------------- 1 | %% spherical conformal map 2 | % Spherical Conformal Map of a closed genus-0 surface. Methodology details 3 | % please refer to [1]. Some code is derived from Gary Choi. 4 | % 5 | % # K.C. Lam, P.T. Choi and L.M. Lui, FLASH: Fast landmark aligned 6 | % spherical harmonic parameterization for genus-0 closed brain surfaces, 7 | % UCLA CAM Report, ftp://ftp.math.ucla.edu/pub/camreport/cam13-79.pdf? 8 | % 9 | %% Syntax 10 | % uvw = spherical_conformal_map(face,vertex) 11 | % 12 | %% Description 13 | % face : double array, nf x 3, connectivity of mesh 14 | % vertex: double array, nv x 3, vertex of mesh 15 | % 16 | % uvw: double array, nv x 3, spherical uvw coordinates of vertex on 3D unit sphere 17 | % 18 | %% Contribution 19 | % Author : Wen Cheng Feng 20 | % Created: 2014/03/27 21 | % Revised: 2014/03/28 by Wen, add doc 22 | % 23 | % Copyright 2014 Computational Geometry Group 24 | % Department of Mathematics, CUHK 25 | % http://www.math.cuhk.edu.hk/~lmlui 26 | 27 | function uvw = spherical_conformal_map(face,vertex) 28 | dv1 = vertex(face(:,2),:) - vertex(face(:,3),:); 29 | e1 = sqrt(dot(dv1,dv1,2)); 30 | dv2 = vertex(face(:,3),:) - vertex(face(:,1),:); 31 | e2 = sqrt(dot(dv2,dv2,2)); 32 | dv3 = vertex(face(:,1),:) - vertex(face(:,2),:); 33 | e3 = sqrt(dot(dv3,dv3,2)); 34 | e123 = e1+e2+e3; 35 | regularity = abs(e1./e123-1/3)+abs(e2./e123-1/3)+abs(e3./e123-1/3); 36 | % choose vertex bi as the big triangle 37 | [~,bi] = min(regularity); 38 | nv = size(vertex,1); 39 | A = laplace_beltrami(face,vertex); 40 | fi = face(bi,:); 41 | [I,J,V] = find(A(fi,:)); 42 | A = A - sparse(fi(I),J,V,nv,nv) + sparse(fi,fi,[1,1,1],nv,nv); 43 | 44 | % Set boundary condition for big triangle 45 | x1 = 0; y1 = 0; 46 | x2 = 100; y2 = 0; 47 | a = vertex(fi(2),:) - vertex(fi(1),:); 48 | b = vertex(fi(3),:) - vertex(fi(1),:); 49 | ratio = norm([x1-x2,y1-y2])/norm(a); 50 | y3 = norm([x1-x2,y1-y2])*norm(cross(a,b))/norm(a)^2; 51 | x3 = sqrt(norm(b)^2*ratio^2-y3^2); 52 | 53 | % Solve matrix equation 54 | % d = complex(zeros(nv,1)); 55 | % d(fi) = [x1+1i*y1;x2+1i*y2;x3+1i*y3]; 56 | % z = A\d; 57 | d = zeros(nv,2); 58 | d(fi,:) = [x1,y1;x2,y2;x3,y3]; 59 | uv = A\d; 60 | z = uv(:,1) + 1i*uv(:,2); 61 | z = z - mean(z); 62 | dz2 = abs(z).^2; 63 | vertex_new = [2*real(z)./(1+dz2), 2*imag(z)./(1+dz2), (-1+dz2)./(1+dz2)]; 64 | 65 | % Find optimal big triangle size 66 | % Reason: the distribution will be the best 67 | % if the southmost triangle has similar size of the northmost one 68 | w = complex(vertex_new(:,1)./(1+vertex_new(:,3)), vertex_new(:,2)./(1+vertex_new(:,3))); 69 | [~, index] = sort(abs(z(face(:,1)))+abs(z(face(:,2)))+abs(z(face(:,3)))); 70 | ni = index(2); % since index(1) must be bi, not really 71 | ns = sum(abs(z(face(bi,[1 2 3]))-z(face(bi,[2 3 1]))))/3; 72 | ss = sum(abs(w(face(ni,[1 2 3]))-w(face(ni,[2 3 1]))))/3; 73 | z = z*(sqrt(ns*ss))/ns; 74 | dz2 = abs(z).^2; 75 | vertex_new = [2*real(z)./(1+dz2), 2*imag(z)./(1+dz2), (-1+dz2)./(1+dz2)]; 76 | 77 | % south pole stereographic projection 78 | uv = [vertex_new(:,1)./(1+vertex_new(:,3)),vertex_new(:,2)./(1+vertex_new(:,3))]; 79 | mu = compute_bc(face,uv,vertex); 80 | % find the south pole 81 | [~,ind] = sort(vertex_new(:,3)); 82 | nv = size(vertex,1); 83 | fixed = ind(1:min(nv,50)); 84 | % reconstruct map with given mu and some fixed point 85 | [fuv,fmu] = linear_beltrami_solver(face,uv,mu,fixed,uv(fixed,:)); 86 | fz = complex(fuv(:,1),fuv(:,2)); 87 | dfz2 = abs(fz).^2; 88 | uvw = [2*real(fz)./(1+dfz2), 2*imag(fz)./(1+dfz2), -(-1+dfz2)./(1+dfz2)]; 89 | -------------------------------------------------------------------------------- /template.m: -------------------------------------------------------------------------------- 1 | %% function_name 2 | % description of the function 3 | % 4 | % [detailed explanation] 5 | % 6 | %% Syntax 7 | % [out] = function(in); 8 | % 9 | %% Description 10 | % 11 | % 12 | %% Example 13 | % [out] = function(in); 14 | % 15 | % 16 | %% Contribution 17 | % Author : [who] 18 | % Created: yyyy/mm/dd 19 | % Revised: yyyy/mm/dd by [who], [what is revised] 20 | % 21 | % Copyright 2014 Computational Geometry Group 22 | % Department of Mathematics, CUHK 23 | % http://www.math.cuhk.edu.hk/~lmlui 24 | -------------------------------------------------------------------------------- /topology/clean_mesh.m: -------------------------------------------------------------------------------- 1 | %% clean mesh 2 | % Clean mesh by removing unreferenced vertex, and renumber vertex index in 3 | % face. 4 | % 5 | %% Syntax 6 | % [face_new,vertex_new,father] = clean_mesh(face,vertex) 7 | % 8 | %% Description 9 | % face : double array, nf x 3, connectivity of mesh 10 | % vertex: double array, nv x 3, vertex of mesh, there may have unreferenced 11 | % vertex 12 | % 13 | % face_new : double array, nf x 3, connectivity of new mesh after clean 14 | % vertex_new: double array, nv' x 3, vertex of new mesh. vertex number may 15 | % less than original mesh 16 | % father : double array, nv' x 1, father indicates the vertex on original 17 | % mesh that new vertex comes from. 18 | % 19 | %% Contribution 20 | % Author : Wen Cheng Feng 21 | % Created: 2014/03/17 22 | % Revised: 2014/03/24 by Wen, add doc 23 | % 24 | % Copyright 2014 Computational Geometry Group 25 | % Department of Mathematics, CUHK 26 | % http://www.math.cuhk.edu.hk/~lmlui 27 | 28 | function [face_new,vertex_new,father] = clean_mesh(face,vertex) 29 | % remove unreferenced vertex 30 | father = unique(face); 31 | index = zeros(max(father),1); 32 | index(father) = (1:size(father,1)); 33 | face_new = index(face); 34 | vertex_new = vertex(father,:); 35 | -------------------------------------------------------------------------------- /topology/compute_greedy_homotopy_basis.m: -------------------------------------------------------------------------------- 1 | %% compute greedy homotopy basis 2 | % Compute a greedy homotopy group basis based on the algorithm in 3 | % paper[1]. Works for closed surface. 4 | % 5 | % Two graph algorithms are needed: minimum spanning tree and shortest 6 | % path, provided in Matlab's bioinformatics toolbox. We supply 7 | % alternatives for these two functions, implemented purely in Matlab, 8 | % which are a little slower and will be invoked when Maltab's built-in 9 | % functions are not available. 10 | % 11 | % # Erickson, Jeff, and Kim Whittlesey. "Greedy optimal homotopy and 12 | % homology generators." Proceedings of the sixteenth annual ACM-SIAM 13 | % symposium on Discrete algorithms. Society for Industrial and Applied 14 | % Mathematics, 2005. 15 | % 16 | %% Syntax 17 | % hb = compute_greedy_homotopy_basis(face,vertex,bi) 18 | % 19 | %% Description 20 | % face : double array, nf x 3, connectivity of mesh 21 | % vertex: double array, nv x 3, vertex of mesh 22 | % bi : integer scaler, base point of homotopy group 23 | % 24 | % hb: cell array, n x 1, a basis of homotopy group, each cell is a closed 25 | % loop based at bi. Return empty for genus zero surface. 26 | % 27 | %% Contribution 28 | % Author : Wen Cheng Feng 29 | % Created: 2013/02/23 30 | % Revised: 2014/03/22 by Wen, optimize code with vectorized operation, 31 | % remove dependency on Matlab's built-in function. 32 | % Revised: 2014/03/24 by Wen, add doc 33 | % 34 | % Copyright 2014 Computational Geometry Group 35 | % Department of Mathematics, CUHK 36 | % http://www.math.cuhk.edu.hk/~lmlui 37 | 38 | function hb = compute_greedy_homotopy_basis(face,vertex,bi) 39 | % greedy_homotopy_basis(face,vertex,i) compute a homotopy 40 | % basis of a high genus surface S = (face,vertex), at a basis point bi; 41 | nf = size(face,1); 42 | nv = size(vertex,1); 43 | [edge,eif] = compute_edge(face); 44 | [am,amd] = compute_adjacency_matrix(face); 45 | 46 | % G is adjacency matrix constructed from the triangle mesh, with weight the 47 | % edge length. 48 | [I,J] = find(am); 49 | el = sqrt(dot(vertex(I,:)-vertex(J,:),vertex(I,:)-vertex(J,:),2)); 50 | G = sparse(I,J,el,nv,nv); 51 | G = (G + G'); % G is undirected 52 | 53 | % the shortest path in graph G, with source node bi, T = G_pred is a the tree 54 | if exist('graphshortestpath') 55 | [dist,path,pred] = graphshortestpath(G,bi,'METHOD','Dijkstra'); 56 | % we always use column array 57 | dist = dist(:); 58 | pred = pred(:); 59 | else 60 | [dist,path,pred] = dijkstra(G,bi); 61 | end 62 | 63 | % amf is the dual graph of G 64 | amf = compute_dual_graph(face); 65 | 66 | % (G\T)* 67 | % dual graph G* that do not consist edge correspond to edge in T = pred 68 | I = (1:nv)'; 69 | I(bi) = []; 70 | J = pred(I); 71 | % (I2,J2) and (J2,I2) are faces corresponding to edge (I,pred(I)) 72 | I2 = full(amd(I+(J-1)*nv)); 73 | J2 = full(amd(J+(I-1)*nv)); 74 | ind = (I2==0 | J2==0); 75 | I2(ind) = []; 76 | J2(ind) = []; 77 | amf(I2+(J2-1)*nf) = 0; 78 | amf(J2+(I2-1)*nf) = 0; 79 | 80 | % tree is the maximum spanning tree of (G\T)*, where the weight of any 81 | % edge e* is length(shortest_loop(e)) 82 | [I,J] = find(amf); 83 | ind = (eif(:,1)==-1 | eif(:,2)==-1); 84 | eif(ind,:) = []; 85 | edge(ind,:) = []; 86 | F2E = sparse([eif(:,1);eif(:,2)],[eif(:,2);eif(:,1)],[edge(:,1);edge(:,2)],nf,nf); 87 | ei = [F2E(I+(J-1)*nf),F2E(J+(I-1)*nf)]; 88 | dvi = vertex(ei(:,1),:)-vertex(ei(:,2),:); 89 | V = -(dist(ei(:,1))+dist(ei(:,2))+sqrt(dot(dvi,dvi,2))); 90 | amf_w = sparse(I,J,V,nf,nf); 91 | if exist('graphminspantree') 92 | tree = graphminspantree(amf_w,'METHOD','Kruskal'); 93 | else 94 | tree = minimum_spanning_tree(amf_w); 95 | end 96 | 97 | % G2 is the graph, with edges neither in T nor are crossed by edges in T* 98 | G2 = G; 99 | I = (1:nv)'; 100 | I(bi) = []; 101 | J = pred(I); 102 | % (I,J) are edges in T 103 | G2(I+(J-1)*nv) = 0; 104 | G2(J+(I-1)*nv) = 0; 105 | 106 | [I,J] = find(tree); 107 | % ei are edges in T* 108 | ei = [F2E(I+(J-1)*nf),F2E(J+(I-1)*nf)]; 109 | index = [ei(:,1)+(ei(:,2)-1)*nv;ei(:,2)+(ei(:,1)-1)*nv]; 110 | G2(index) = 0; 111 | 112 | % the greedy homotopy basis consists of all loops (e), where e is an edge 113 | % of G2. 114 | G2 = tril(G2); 115 | [I,J] = find(G2); 116 | hb = cell(size(I)); 117 | for i = 1:length(I) 118 | pi = path{I(i)}; 119 | pj = path{J(i)}; 120 | hb{i} = [pi(:);flipud(pj(:))]; 121 | end 122 | if isempty(I) 123 | hb = []; 124 | end 125 | -------------------------------------------------------------------------------- /topology/compute_homology_basis.m: -------------------------------------------------------------------------------- 1 | %% compute homology basis 2 | % Compute a basis for the homology group H_1(M,Z), based on the algorithm 3 | % 6 in book [1]. 4 | % 5 | % # Gu, Xianfeng David, and Shing-Tung Yau, eds. Computational conformal 6 | % geometry. Vol. 3. Somerville: International Press, 2008. 7 | % 8 | %% Syntax 9 | % hb = compute_homology_basis(face,vertex) 10 | % 11 | %% Description 12 | % face : double array, nf x 3, connectivity of mesh 13 | % vertex: double array, nv x 3, vertex of mesh 14 | % 15 | % hb: cell array, n x 1, a basis of homology group, each cell is a closed 16 | % loop based. Return empty for genus zero surface. Two loops on each 17 | % handle. If there is boundary on surface, each boundary will be an 18 | % element of hb 19 | % 20 | %% Contribution 21 | % Author : Wen Cheng Feng 22 | % Created: 2014/03/13 23 | % Revised: 2014/03/24 by Wen, add doc 24 | % 25 | % Copyright 2014 Computational Geometry Group 26 | % Department of Mathematics, CUHK 27 | % http://www.math.cuhk.edu.hk/~lmlui 28 | 29 | function hb = compute_homology_basis(face,vertex) 30 | ee = cut_graph(face,vertex); 31 | nv = size(vertex,1); 32 | G = sparse(ee(:,1),ee(:,2),ones(size(ee,1),1),nv,nv); 33 | G = G+G'; 34 | 35 | if exist('graphminspantree') 36 | [tree,pred] = graphminspantree(G,'METHOD','Kruskal'); 37 | else 38 | [tree,pred] = minimum_spanning_tree(G); 39 | end 40 | v = find(pred==0); 41 | [I,J,~] = find(tree+tree'); 42 | eh = setdiff(ee,[I,J],'rows'); 43 | hb = cell(size(eh,1),1); 44 | for i = 1:size(eh,1) 45 | p1 = trace_path(pred,eh(i,1),v); 46 | p2 = trace_path(pred,eh(i,2),v); 47 | loop = [flipud(p1);eh(i,1);eh(i,2);p2]; 48 | hb{i} = prune_path(loop); 49 | end 50 | if isempty(eh) 51 | hb = []; 52 | end 53 | 54 | function path = trace_path(pred,v,root) 55 | path = []; 56 | while true 57 | path = [path;pred(v)]; 58 | v = pred(v); 59 | if v == root 60 | break; 61 | end 62 | end 63 | 64 | function path_new = prune_path(path) 65 | ind = path ~= flipud(path); 66 | i = find(ind,1)-1; 67 | path_new = path(i:end-i+1); 68 | -------------------------------------------------------------------------------- /topology/cut_graph.m: -------------------------------------------------------------------------------- 1 | %% cut graph 2 | % Compute a cut graph of mesh, such that surface becomes simply-connected 3 | % if slice mesh along the cut-graph. There are two versions: if both face 4 | % and vertex provided, invoke version 1; if only face provided, invoke 5 | % version 2. Version 1 is exact implementation of algorithm 3 in book [1]. 6 | % Version 2 is translated from David Gu's C++ code of cut graph, which is 7 | % much faster than version 1. 8 | % 9 | % Though version 1 takes vertex into consideration, both algorithms do not 10 | % generated optimal cut graph (shortest one). In fact this problem seems 11 | % to be open until now. 12 | % 13 | %% Syntax 14 | % ee = cut_graph(face) 15 | % ee = cut_graph(face,vertex) 16 | % 17 | %% Description 18 | % face : double array, nf x 3, connectivity of mesh 19 | % vertex: double array, nv x 3, vertex of mesh 20 | % 21 | % ee: double array, n x 2, edges in the cut graph, each row is an edge on 22 | % mesh, may not be in consecutive order. ee's mainly purpose is been 23 | % passed to slice_mesh, which will slice the mesh open along edges in 24 | % ee, to form a simply-connected surface 25 | % 26 | %% Contribution 27 | % Author : Wen Cheng Feng 28 | % Created: 2014/03/13 29 | % Revised: 2014/03/13 by Wen, implement another cut graph algorithm 30 | % Revised: 2014/03/17 by Wen, merge two cut graph algorithm 31 | % 32 | % Copyright 2014 Computational Geometry Group 33 | % Department of Mathematics, CUHK 34 | % http://www.math.cuhk.edu.hk/~lmlui 35 | 36 | function ee = cut_graph(face,vertex) 37 | if nargin == 2 38 | [amf,dual_vertex] = compute_dual_graph(face,vertex); 39 | [edge,eif] = compute_edge(face); 40 | [I,J,~] = find(amf); 41 | 42 | % edge length of original mesh as weight 43 | el = zeros(size(I)); 44 | 45 | for i=1:length(I) 46 | ei = face_intersect(face(I(i),:),face(J(i),:)); 47 | el(i) = norm(vertex(ei(1),:)-vertex(ei(2),:)); 48 | end 49 | graph = sparse(I,J,-el); 50 | if exist('graphminspantree') 51 | tree = graphminspantree(graph,'Method','Kruskal'); 52 | else 53 | tree = minimum_spanning_tree(graph); 54 | end 55 | 56 | % edge length of dual mesh as weight 57 | % dual_el = sqrt(dot(dual_vertex(I,:)-dual_vertex(J,:),dual_vertex(I,:)-dual_vertex(J,:),2)); 58 | % tree = graphminspantree(amf,'METHOD','Prim','Weights',dual_el); 59 | 60 | tree = tree+tree'; 61 | [I,J,~] = find(tree); 62 | [~,ia] = setdiff(eif,[I,J],'rows'); 63 | de = edge(ia,:); 64 | nv = size(vertex,1); 65 | G = sparse(de(:,1),de(:,2),ones(size(de,1),1),nv,nv); 66 | 67 | elseif nargin == 1 68 | [am,amd] = compute_adjacency_matrix(face); 69 | nf = size(face,1); 70 | % use array to emulate queue 71 | queue = zeros(nf,1); 72 | queue(1) = 1; 73 | qs = 1; % point to queue start 74 | qe = 2; % point to queue end 75 | 76 | ft = false(nf,1); 77 | ft(1) = true; 78 | face4 = face(:,[1 2 3 1]); 79 | 80 | % translated from David Gu's cut graph algorithm 81 | % this algorithm will not take geometry into consideration, thus result is 82 | % not as visually good as cut_graph, but faster. 83 | while qe > qs 84 | fi = queue(qs); 85 | qs = qs+1; 86 | for i = 1:3 87 | he = face4(fi,[i i+1]); 88 | sf = amd(he(2),he(1)); 89 | if sf 90 | if ~ft(sf) 91 | queue(qe) = sf; 92 | qe = qe+1; 93 | ft(sf) = true; 94 | am(he(1),he(2)) = -1; 95 | % am(he(2),he(1)) = 0; 96 | end 97 | end 98 | end 99 | end 100 | am((am<0)') = 0; 101 | G = triu(am>0); 102 | end 103 | % prune the graph cut 104 | while true 105 | Gs = full(sum(G,2))+full(sum(G,1))'; 106 | ind = (Gs == 1); 107 | if sum(ind) ==0 108 | break; 109 | end 110 | G(ind,:) = 0; 111 | G(:,ind) = 0; 112 | end 113 | 114 | [I,J,~] = find(G); 115 | ee = [I,J]; 116 | 117 | function e = face_intersect(f1,f2) 118 | b = f1==f2(1); 119 | e1 = f1(b); 120 | b = f1==f2(2); 121 | e2 = f1(b); 122 | b = f1==f2(3); 123 | e3 = f1(b); 124 | e = [e1,e2,e3]; 125 | -------------------------------------------------------------------------------- /topology/dijkstra.m: -------------------------------------------------------------------------------- 1 | %% dijkstra 2 | % dijkstra shortest path algorithm, to replace Matlab's built-in function 3 | % graphshortestpath Based on the algorithm description in wikipedia page[1], 4 | % using a priority queue. Use array to emulate priority queue. This 5 | % implementation is about two times slower than Matlab's built-in function 6 | % graphshortestpath. Will be invoked when graphshortestpath is not available. 7 | % 8 | % # http://en.wikipedia.org/wiki/Dijkstra's_algorithm 9 | % 10 | %% Syntax 11 | % [distance,path,previous] = dijkstra(graph,source) 12 | % [distance,path,previous] = dijkstra(graph,source,target) 13 | % 14 | %% Description 15 | % graph : sparse matrix, nv x nv, adjacency matrix of graph (or triangle 16 | % mesh), elements are weights of adjacent path 17 | % source: integer scaler, source node of path. 18 | % target: double array, n x 1, optional, target node to calculate distance. 19 | % if not provided, will calculate path to all node. 20 | % 21 | % distance: double array, n x 1, distance from source node to all target 22 | % node 23 | % path : cell array, n x 1, each cell is the path from source to node, 24 | % which is a double array 25 | % previous: double array, n x 1, predecessor nodes of all path, 26 | % predecessor of source node is 0 27 | % 28 | %% Contribution 29 | % Author : Wen Cheng Feng 30 | % Created: 2014/03/21 31 | % Revised: 2014/03/24 by Wen, add doc 32 | % 33 | % Copyright 2014 Computational Geometry Group 34 | % Department of Mathematics, CUHK 35 | % http://www.math.cuhk.edu.hk/~lmlui 36 | 37 | function [distance,path,previous] = dijkstra(graph,source,target) 38 | nv = size(graph,1); 39 | distance = inf*ones(nv,1); 40 | distance(source) = 0; 41 | 42 | previous = zeros(nv,1); 43 | 44 | if ~exist('target','var') 45 | target = (1:nv)'; 46 | end 47 | path = cell(length(target),1); 48 | 49 | [cp,ri,val] = sparse_to_csc(graph); 50 | 51 | % use array to emulate heap (priority queue) 52 | n = 1; 53 | heap = zeros(nv,2); 54 | heap(n,1) = source; 55 | heap(source,2) = n; 56 | 57 | while n 58 | u = heap(1); 59 | n = n-1; 60 | heap = bubbledown(heap,distance,n); 61 | 62 | for ui = cp(u):cp(u+1)-1 63 | v = ri(ui); 64 | alt = distance(u) + val(ui); 65 | if alt < distance(v) 66 | distance(v) = alt; 67 | previous(v) = u; 68 | n = n+1; 69 | heap = bubbleup(heap,distance,n,v); 70 | end 71 | end 72 | end 73 | distance = distance(target); 74 | for i = 1:length(target) 75 | v = target(i); 76 | pi = v; 77 | while previous(v) 78 | v = previous(v); 79 | pi = [v;pi]; 80 | end 81 | path{i} = pi; 82 | end 83 | if length(target) == 1 84 | path = path{1}; 85 | end 86 | 87 | function heap = bubbledown(heap,priority,n) 88 | top = heap(n+1); 89 | heap(1) = top; 90 | heap(top,2) = 1; 91 | index = 1; 92 | while index*2 < n 93 | i = index*2; 94 | 95 | lc = heap(i); 96 | rc = heap(i+1); 97 | sc = lc; 98 | if priority(rc) < priority(lc) 99 | i = i+1; 100 | sc = rc; 101 | end 102 | if priority(top) > priority(sc) 103 | heap(index) = sc; 104 | heap(sc,2) = index; 105 | heap(i) = top; 106 | heap(top,2) = i; 107 | index = i; 108 | else 109 | break 110 | end 111 | end 112 | 113 | function heap = bubbleup(heap,distance,n,v) 114 | heap(n) = v; 115 | heap(v,2) = n; 116 | index = n; 117 | k = heap(n); 118 | while index > 1 119 | p = floor(index/2); 120 | tp = heap(p); 121 | if distance(tp) < distance(k) 122 | break 123 | else 124 | heap(p) = k; 125 | heap(k,2) = p; 126 | heap(index) = tp; 127 | heap(tp,2) = index; 128 | index = p; 129 | end 130 | end 131 | -------------------------------------------------------------------------------- /topology/minimum_spanning_tree.m: -------------------------------------------------------------------------------- 1 | %% minimum spanning tree 2 | % Construct minimum spanning tree on the mesh. Replace Matlab's 3 | % graphminspantree function. 4 | % 5 | % Basically this is a classical implementation of minimum spanning tree 6 | % algorithm, using adjacency matrix. Speed is about 2(large mesh)-4(smaller mesh) 7 | % times slower comparing with Matlab's built-in graphminspantree, which is 8 | % implemented via mex function graphalgs. 9 | % 10 | %% Syntax 11 | % [tree,previous] = minimum_spanning_tree(graph) 12 | % [tree,previous] = minimum_spanning_tree(graph,source) 13 | % 14 | %% Description 15 | % graph : sparse matrix, nv x nv, adjacency matrix of graph (or triangle 16 | % mesh), elements are weights of adjacent path 17 | % source: integer scaler, optional, source node of spanning tree. If not 18 | % provided, will search for smallest node in the graph. 19 | % 20 | % tree: sparse matrix, nv x nv, minimum spanning tree, if there are k 21 | % nodes in the graph, then there are k+1 nonzero elements in tree. 22 | % previous: double array, n x 1, predecessor nodes of the minimal spanning 23 | % tree, predecessor of source node is 0 24 | % 25 | %% Contribution 26 | % Author : Wen Cheng Feng 27 | % Created: 2014/03/21 28 | % Revised: 2014/03/24 by Wen, add doc 29 | % 30 | % Copyright 2014 Computational Geometry Group 31 | % Department of Mathematics, CUHK 32 | % http://www.math.cuhk.edu.hk/~lmlui 33 | 34 | function [tree,previous] = minimum_spanning_tree(graph,source) 35 | if ~exist('source','var') 36 | [I,J] = find(graph); 37 | source = J(1); 38 | end 39 | nv = size(graph,1); 40 | previous = nan(nv,1); 41 | node = source; 42 | rem = (1:nv)'; 43 | % rem(source) = []; 44 | ind = false(nv,1); 45 | ind(I) = true; 46 | ind(source) = false; 47 | rem(~ind) = []; 48 | previous(source) = 0; 49 | nvc = sum(ind); 50 | TI = zeros(nvc,1); 51 | TJ = zeros(nvc,1); 52 | TV = zeros(nvc,1); 53 | k = 1; 54 | % most time is spent on accessing submatrix, overall speed is about two 55 | % times slower than Matlab's build-in function graphminspantree. For smaller 56 | % graph, it's even slower, say, four times. 57 | while ~isempty(rem) 58 | [I,J,V] = find(graph(node,rem)); % time consuming, need to improve 59 | [v,ind] = min(V); 60 | i = node(I(ind)); 61 | j = rem(J(ind)); 62 | TI(k) = i; 63 | TJ(k) = j; 64 | TV(k) = v; 65 | k = k+1; 66 | previous(j) = i; 67 | % node(k) = j; 68 | node = [node;j]; 69 | rem(J(ind)) = []; 70 | end 71 | tree = sparse(TI,TJ,TV,nv,nv); 72 | tree = tril(tree+tree'); 73 | -------------------------------------------------------------------------------- /topology/remove_mesh_face.m: -------------------------------------------------------------------------------- 1 | %% remove mesh face 2 | % Remove face from mesh 3 | % 4 | %% Syntax 5 | % [face_new,vertex_new,father] = remove_mesh_face(face,vertex,index) 6 | % 7 | %% Description 8 | % face : double array, nf x 3, connectivity of mesh 9 | % vertex: double array, nv x 3, vertex of mesh, there may have unreferenced 10 | % vertex 11 | % index : double array, n x 1, index of face to be removed 12 | % 13 | % face_new : double array, nf x 3, connectivity of new mesh after clean 14 | % vertex_new: double array, nv' x 3, vertex of new mesh. vertex number may 15 | % less than original mesh 16 | % father : double array, nv' x 1, father indicates the vertex on original 17 | % mesh that new vertex comes from. 18 | % 19 | %% Contribution 20 | % Author : Wen Cheng Feng 21 | % Created: 2019/05/24 22 | % 23 | % Copyright 2019 24 | 25 | function [face_new,vertex_new,father] = remove_mesh_face(face,vertex,index) 26 | ind = false(size(face,1),1); 27 | ind(index) = true; 28 | [face_new,vertex_new,father] = clean_mesh(face(~ind,:),vertex); 29 | -------------------------------------------------------------------------------- /topology/remove_mesh_vertex.m: -------------------------------------------------------------------------------- 1 | %% remove mesh vertex 2 | % Remove vertex from mesh 3 | % 4 | %% Syntax 5 | % [face_new,vertex_new,father] = remove_mesh_vertex(face,vertex,index) 6 | % 7 | %% Description 8 | % face : double array, nf x 3, connectivity of mesh 9 | % vertex: double array, nv x 3, vertex of mesh, there may have unreferenced 10 | % vertex 11 | % index : double array, n x 1, index of vertex to be removed 12 | % 13 | % face_new : double array, nf x 3, connectivity of new mesh after clean 14 | % vertex_new: double array, nv' x 3, vertex of new mesh. vertex number may 15 | % less than original mesh 16 | % father : double array, nv' x 1, father indicates the vertex on original 17 | % mesh that new vertex comes from. 18 | % 19 | %% Contribution 20 | % Author : Wen Cheng Feng 21 | % Created: 2019/05/24 22 | % 23 | % Copyright 2019 24 | 25 | function [face_new,vertex_new,father] = remove_mesh_vertex(face,vertex,index) 26 | ind = false(size(vertex,1),1); 27 | ind(index) = true; 28 | ind_face = sum(ind(face),2)>0; 29 | [face_new,vertex_new,father] = clean_mesh(face(~ind_face,:),vertex); 30 | -------------------------------------------------------------------------------- /topology/slice_mesh.m: -------------------------------------------------------------------------------- 1 | %% slice_mesh 2 | % Slice mesh open along a collection of edges ee, which usually comes from 3 | % cut_graph(directly), or compute_greedy_homotopy_basis and 4 | % compute_homology_basis (need to form edges from closed loops in basis). 5 | % ee can form a single closed loops or multiple closed loops. 6 | % 7 | %% Syntax 8 | % [face_new,vertex_new,father] = slice_mesh(face,vertex,ee) 9 | % 10 | %% Description 11 | % face : double array, nf x 3, connectivity of mesh 12 | % vertex: double array, nv x 3, vertex of mesh 13 | % ee : double array, n x 2, a collection of edges, each row is an edge on 14 | % mesh, may not be in consecutive order. 15 | % 16 | % face_new : double array, nf x 3, connectivity of new mesh after slice 17 | % vertex_new: double array, nv' x 3, vertex of new mesh, vertex number is 18 | % more than original mesh, since slice mesh will separate each 19 | % vertex on ee to two vertices or more. 20 | % father : double array, nv' x 1, father indicates the vertex on original 21 | % mesh that new vertex comes from. 22 | % 23 | %% Contribution 24 | % Author : Wen Cheng Feng 25 | % Created: 2014/03/17 26 | % Revised: 2014/03/24 by Wen, add doc 27 | % 28 | % Copyright 2014 Computational Geometry Group 29 | % Department of Mathematics, CUHK 30 | % http://www.math.cuhk.edu.hk/~lmlui 31 | 32 | function [face_new,vertex_new,father] = slice_mesh(face,vertex,ee) 33 | nv = size(vertex,1); 34 | [~,amd] = compute_adjacency_matrix(face); 35 | if iscell(ee) 36 | ees = []; 37 | for i = 1:length(ee) 38 | ei = ee{i}; 39 | ei(:,2) = ei([2:end,1]); 40 | ees = [ees;ei]; 41 | end 42 | ee = ees; 43 | end 44 | G = sparse(ee(:,1),ee(:,2),ones(size(ee,1),1),nv,nv); 45 | G = G+G'; 46 | 47 | ev = unique(ee(:)); 48 | vre = compute_vertex_ring(face,vertex,ev,true); 49 | face_new = face; 50 | vertex2 = zeros(size(ee,1)*2,3); 51 | father2 = zeros(size(ee,1)*2,1); 52 | k = 1; 53 | for i = 1:size(ev,1) 54 | evr = vre{i}; 55 | for i0 = 1:length(evr) 56 | if G(evr(i0),ev(i)) 57 | break; 58 | end 59 | end 60 | if evr(1) == evr(end) % interior point 61 | evr = evr([i0:end-1,1:i0]); 62 | else % boundary point 63 | evr = evr([i0:end,1:i0-1]); 64 | end 65 | for j = 2:length(evr) 66 | fi = amd(evr(j),ev(i)); 67 | if fi 68 | fij = face_new(fi,:)==ev(i); 69 | face_new(fi,fij) = nv+k; 70 | end 71 | if G(ev(i),evr(j)) 72 | vertex2(k,:) = vertex(ev(i),:); 73 | father2(k) = ev(i); 74 | k = k+1; 75 | end 76 | end 77 | end 78 | vertex_new = [vertex;vertex2]; 79 | father = (1:nv)'; 80 | father = [father;father2]; 81 | 82 | fu = unique(face_new); 83 | index = zeros(max(fu),1); 84 | index(fu) = (1:size(fu,1)); 85 | face_new = index(face_new); 86 | vertex_new = vertex_new(fu,:); 87 | father = father(fu); -------------------------------------------------------------------------------- /tutorial/tutorial0.m: -------------------------------------------------------------------------------- 1 | %% tutorial 0: quick-start 2 | % This tutorial will bring you go through the package, show you its design 3 | % principle and capability. 4 | % 5 | %% Preparation 6 | % First we add the package folder to search path: 7 | % 8 | % addpath('geometric-processing-package') 9 | % 10 | % startup will then add all subfolders in the package to the top of search 11 | % path and set output format 12 | startup 13 | 14 | %% Read/Write mesh 15 | % Three mesh formats are supported: 16 | % <../io/OFF_File_Format.html OFF>, 17 | % <../io/OBJ_File_Format.html OBJ>, 18 | % <../io/PLY_File_Format.html PLY>. 19 | % We support a subset of these formats' specification. Check doc of that 20 | % file. 21 | [face,vertex] = read_off('data/face.off'); % read off format mesh 22 | sf = size(face) % face is a nf x 3 array 23 | sv = size(vertex) % vertex is a nv x 3 array 24 | write_obj('data/face.obj',face,vertex) % write mesh to obj format 25 | 26 | %% Visualize mesh 27 | % We supply two visualization functions: 28 | % 29 | % plot_mesh(face,vertex) 30 | % plot_path(face,vertex,path) 31 | % 32 | % Both function uses pre-defined style to plot. You can easily specify your 33 | % own style. More details please read help doc. 34 | fig = figure('Position',[555 152 455 574]); 35 | plot_mesh(face,vertex) % plot mesh 36 | axis off 37 | view(-90,-84) 38 | snapnow 39 | bd = compute_bd(face); % bd is the boundary 40 | plot_path(face,vertex,bd) % plot path (boundary) on mesh 41 | 42 | %% Advanced plotting 43 | % You can specify your own style. 44 | fig = figure('Position',[555 152 455 574]); % set figure size and background color 45 | plot_mesh(face,vertex,... 46 | 'EdgeColor',[20 20 20]/255,... 47 | 'FaceColor',[251 175 147]/255,... 48 | 'LineWidth',0.5,... 49 | 'CDataMapping','scaled'); 50 | axis equal 51 | axis tight 52 | view(-90,-84) 53 | axis off 54 | colormap hsv 55 | lighting phong 56 | light('Position',[-1 1 -1],'Style','infinite'); 57 | %% Export figure 58 | % To export high quality images, we recommend an excellent library 59 | % . Export above figure with export_fig 61 | % 62 | % export_fig face -png -transparent -nocrop 63 | % 64 | addpath('..\library\export_fig\') % add export_fig path 65 | % In the following tutorial, we always use export_fig to export figures. 66 | % For example, above figure is exported as follows: 67 | export_fig html/tutorial/face.style -png -transparent -nocrop 68 | %% 69 | % 70 | % <> 71 | % 72 | close(fig) -------------------------------------------------------------------------------- /tutorial/tutorial1.m: -------------------------------------------------------------------------------- 1 | %% tutorial 1: algebra and topology 2 | % This package provides various algebraic and topological functions. Our goal 3 | % is to provide "enough" fundamental functions such that users can develop 4 | % their own applications based on (only) this package. Performance is 5 | % always in our mind when developing this package. To achieve best 6 | % performance, vectorized operation is employed whenever possible. 7 | % 8 | % adjacency matrix is widely used. Nonzero element in am indicates a link 9 | % (edge) of the mesh. Likewise, nonzero element in amd indicates a link (halfedge) 10 | % of the mesh. Additionally, am(i,j) == 2 means that edge(i,j) is an 11 | % interior edge, while am(i,j) == 1 means edge(i,j) is an boundary edge, 12 | % since boundary edge appears only used by one face and interior edge 13 | % shares by two faces. 14 | % Since halfedge is unique, i.e., every halfedge belongs to a single face, 15 | % we store this connection between halfedge and face in amd. That is, 16 | % amd(i,j) = k means that halfedge(i,j) belongs to face k, or vice verse, 17 | % face k has halfedge(i,j), or equivalently, face k has two vertex i and j 18 | % and they are in ccw order. 19 | [face,vertex] = read_off('face.off'); 20 | [am,amd] = compute_adjacency_matrix(face); 21 | %% 22 | % Now we show how we can make use of adjacency matrix. 23 | 24 | % find edges of original mesh 25 | [I,J,V] = find(am); % all nonzero elements in am 26 | ind = I> 48 | % 49 | % To find boundary edges in consecutive order and right direction, we'd 50 | % better use amd, since it stores information of halfedge. Please read 51 | % function compute_bd for details. 52 | 53 | %% 54 | % Computation on mesh is usually decomposed to faces or vertices, for 55 | % example, calculate face area or vertex normal, discretize Laplace 56 | % operator or gradient operator. Such computation usually needs 57 | % neighboring faces/vertices. 58 | % 59 | % There are two ways to do this. One natural way is first find neighbors 60 | % then do the computation. Now we compute one-ring area at each vertex, 61 | % i.e., area of each vertex is the summation of area of its neighbor faces. 62 | 63 | % find compute one-ring faces of vertex 64 | [face,vertex] = read_off('bunny.off'); 65 | fa = face_area(face,vertex); 66 | nv = size(vertex,1); 67 | %% 68 | 69 | % instead of using for loop to sum, we can use arrayfun, which is more efficient 70 | vfr = compute_vertex_face_ring(face); 71 | va = arrayfun(@(i) sum(fa(vfr{i})),1:nv); 72 | %% 73 | % We can also do it in a MUCH MORE efficient way. Since every halfedge is 74 | % attached with a face, and we can easily access halfedges which start from 75 | % a vertex. Then the one-ring vertex area can be calculated in this way: 76 | % for every halfedge, associate it with area of the face that the halfedge 77 | % is attached to, then sum the area w.r.t. halfedge, which can be done by 78 | % accumarray. Following is the code: 79 | fa = face_area(face,vertex); 80 | [he,heif] = compute_halfedge(face); % heif means halfedge_in_face, i.e., which face the he belongs to 81 | va = accumarray(he(:,1),fa(heif)); 82 | %% 83 | % Above two pieces of code do the same thing, however the second one is 84 | % much faster. We can use tic/toc command to record time. On my computer, 85 | % first method uses 3.09s, while second method uses 0.044s, which shows 86 | % significant difference. It's not because we didn't optimize the code in 87 | % first method (in fact there is not much space to optimize), the reason is 88 | % that second method can be totally vectorized. Most time of first method 89 | % is spent on compute_vertex_face_ring (which reply on 90 | % compute_vertex_ring), it uses loop to find neighbors of each vertex. -------------------------------------------------------------------------------- /tutorial/tutorial2.m: -------------------------------------------------------------------------------- 1 | %% tutorial 2: algebra and topology - advanced 2 | % Now we show some high level operation on mesh. 3 | % 4 | %% Simply-connected surface 5 | [face,vertex] = read_off('face.off'); 6 | % find the boundary 7 | bd = compute_bd(face); 8 | % since it's simply-connected, it can be embedded to a disk or unit square 9 | uv = disk_harmonic_map(face,vertex); 10 | corner = bd(1:floor(length(bd)/4):end)'; 11 | corner = corner(1:4); 12 | uv2 = rect_harmonic_map(face,vertex,corner); 13 | % plot mesh 14 | fig = figure('Position',[347 104 1079 611],'Color',[1 1 1]); 15 | subplot(1,2,1) 16 | plot_mesh(face,vertex) 17 | view(-90,-84) 18 | axis off 19 | title('original mesh') 20 | % plot embedding 21 | subplot(1,2,2) 22 | plot_mesh(face,uv) 23 | axis off 24 | title('harmonic map') 25 | export_fig html/tutorial/face.uv -png -transparent 26 | close(fig) 27 | %% 28 | % 29 | % <> 30 | % 31 | 32 | %% Genus-0 surface 33 | [face,vertex] = read_off('maxplanck.nf25k.off'); 34 | % spherical harmonic map (is conformal) 35 | uvw = spherical_conformal_map(face,vertex); 36 | % plot mesh 37 | fig = figure('Position',[347 104 1079 611],'Color',[1 1 1]); 38 | subplot(1,2,1) 39 | plot_mesh(face,vertex) 40 | view(-180,-30) 41 | axis off 42 | title('original mesh') 43 | % plot mapping 44 | subplot(1,2,2) 45 | plot_mesh(face,uvw) 46 | view(-180,-30) 47 | axis off 48 | title('spherical conformal map') 49 | export_fig html/tutorial/maxplanck.nf25k -png -transparent 50 | close(fig) 51 | %% 52 | % 53 | % <> 54 | % 55 | 56 | %% High genus surface (genus > 0) 57 | % First we compute a cut graph of mesh, such that mesh is simply-connected 58 | % if remove the cut graph 59 | [face,vertex] = read_off('eight.off'); 60 | ee = cut_graph(face,vertex); 61 | % ee = cut_graph(face); % this one is faster 62 | % (face_new,vertex_new) is a simply-connected surface 63 | [face_new,vertex_new] = slice_mesh(face,vertex,ee); 64 | bd = compute_bd(face_new); 65 | fig = figure('Position',[347 104 1079 611],'Color',[1 1 1]); 66 | subplot(1,2,1) 67 | plot_mesh(face_new,vertex_new) 68 | axis off 69 | view(-90,-90) 70 | plot_path(face_new,vertex_new,bd); 71 | % since (face_new,vertex_new) is simply-connected, we can embed it to a disk 72 | uv = disk_harmonic_map(face_new,vertex_new); 73 | subplot(1,2,2) 74 | plot_mesh(face_new,uv) 75 | axis off 76 | export_fig html/tutorial/eight.uv -png -transparent 77 | close(fig) 78 | %% 79 | % 80 | % <> 81 | % 82 | % We can compute basis of homotopy group 83 | hb = compute_greedy_homotopy_basis(face,vertex,344); % 344 is base point 84 | fig = figure('Position',[530 148 717 560]); 85 | plot_mesh(face,vertex) 86 | view(-90,-90) 87 | plot_path(face,vertex,hb,[],344,'ko') % don't worry, we will not plot mesh again 88 | axis off 89 | export_fig html/tutorial/eight.homotopy -png -transparent 90 | close(fig) 91 | %% 92 | % 93 | % <> 94 | % 95 | % We can also compute homology group basis 96 | [face,vertex] = read_off('eight.hole.off'); % genus two surface with a hole 97 | hb = compute_homology_basis(face,vertex); 98 | fig = figure('Position',[530 148 717 560]); 99 | plot_mesh(face,vertex) 100 | view(-90,-90) 101 | plot_path(face,vertex,hb) % we will not plot mesh again 102 | axis off 103 | export_fig html/tutorial/eight.homology -png -transparent 104 | close(fig) 105 | %% 106 | % 107 | % <> 108 | % 109 | --------------------------------------------------------------------------------