zoukankan      html  css  js  c++  java
  • [工具]toolbox_graph基本操作

    toolbox_graph提供了对3D模型的一些操作。MATLAB代码源自:http://www.mathworks.com/matlabcentral/fileexchange/5355-toolbox-graph/content/toolbox_graph/toolbox_graph.m

    关于代码的总结说明:(toolbox_graph.m)

    基本操作——

    compute_vertex_ring:为网格的每一个顶点计算第一环邻居。

    function vring = compute_vertex_ring(face)

    参数说明:face——3*f的矩阵,f表示面的数目。

    输出:vring{i} 表示与第i个顶点相邻的顶点集合。在MATLAB中的结果为1*f cell(f为顶点个数),cell中保存的为顶点序号。

    compute_normal:使用面的法向量的平均值作为顶点的法向量。

    function [normal,normalf] = compute_normal(vertex,face)

    参数说明:vertex——3*v的矩阵,v表示顶点的数目;

      face——同上。

    输出:normal——顶点的法向量。3*v的矩阵;

      normalf——面的法向量。3*f的矩阵。

    triangulation2adjacency:为给定的三角形网格计算邻接矩阵。

    function A = triangulation2adjacency(face,vertex)

    参数说明:face——同上;

      vertex——同上。

    输出:A——保存顶点相连的邻接矩阵,大小为v*v。

    reverse_orientation:翻转面的法向量的方向。

    function face1 = reverse_orientation(face)

    参数说明:face——同上。

    输出:face1——翻转后的面。

  • 相关阅读:
    代理的原理
    nodemon:让node自动重启
    http与https的区别
    Content-Type:几种常用数据编码格式
    vue ssr服务端渲染
    vue 实现文件上传和文件下载
    vue element-ui表格里时间戳转换成时间显示
    vue npm start 自动打开网页
    yearProgress.vue
    vuejs中class与style的绑定
  • 原文地址:https://www.cnblogs.com/sipin/p/4359262.html
Copyright © 2011-2022 走看看