Volume of Mesh Calculation With WebGL
来源:互联网 发布:网络数字机顶盒 编辑:程序博客网 时间:2024/05/19 00:42
//Created by Ken on Oct 20,2016 for volume compute when uploadfunction SignedVolumeOfTriangle(p1, p2, p3) { var v321 = p3.X*p2.Y*p1.Z; var v231 = p2.X*p3.Y*p1.Z; var v312 = p3.X*p1.Y*p2.Z; var v132 = p1.X*p3.Y*p2.Z; var v213 = p2.X*p1.Y*p3.Z; var v123 = p1.X*p2.Y*p3.Z; var singnedVolume=(1/6)*(-v321 + v231 + v312 - v132 - v213 + v123); return singnedVolume;}function VolumeOfMesh(points) { var i= 0,vols=0; var P1,P2,P3; do { P1={X:points[i],Y:points[i+1],Z:points[i+2]}; P2={X:points[i+3],Y:points[i+4],Z:points[i+5]}; P3={X:points[i+6],Y:points[i+7],Z:points[i+8]}; vols+=SignedVolumeOfTriangle(P1, P2, P3); i+=9; } while (i<points.length); return customRound(Math.abs(vols)/1000,2);}function customRound(number,fractiondigits){ with(Math){ return round(number*pow(10,fractiondigits))/pow(10,fractiondigits); }}
0 0
- Volume of Mesh Calculation With WebGL
- Calculate superficial area and volume of mesh with Three.js(WebGL)
- 计算 volume of 3D .vtk points (triangle mesh, closed polydata)
- A Minimum Volume Covering Approach with a Set of Ellipsoids
- The calculation of GPA
- Calculation of CPI
- Calculation of Vector Similarity
- The calculation of GPA
- hdu1202The calculation of GPA
- The calculation of GPA
- hdoj1202_The calculation of GPA
- HDU1202:The calculation of GPA
- hduoj The calculation of GPA
- The calculation of GPA 1202
- The calculation of GPA (HDU1202)
- hdu_1202 The calculation of GPA
- HDU1202 The calculation of GPA
- 1202 The calculation of GPA
- 在vue项目中前端生成二维码应该注意的问题
- 随机产生一个整数
- android 二维码 Zxing记录
- 自定义视频播放(原生)
- 控制台访问模型
- Volume of Mesh Calculation With WebGL
- missing artifact jdk.tools:jar:1.7
- linux shell 中的sleep命令
- STM32在KEIL4.7下生成BIN文件
- Android AlarmManager实现不间断轮询服务
- Memcached 笔记与总结(6)PHP 实现 Memcached 的一致性哈希分布算法
- iOS开发内存优化-问题代码定位
- dismissViewControllerAnimated到根视图
- 这十种男人发不了财!看看你是不是