77 geometry process
0 引言
记录几何方面的一些处理技术。
1 任意多边形面积计算:包含凸多边形和凹多边形
转载了JustDoIT
https://www.cnblogs.com/TenosDoIt/p/4047211.html
附上代码
struct Point2d
{
double x;
double y;
Point2d(double xx, double yy): x(xx), y(yy){}
}; //计算任意多边形的面积,顶点按照顺时针或者逆时针方向排列
double ComputePolygonArea(const vector<Point2d> &points)
{
int point_num = points.size();
if(point_num < )return 0.0;
double s = points[].y * (points[point_num-].x - points[].x);
for(int i = ; i < point_num; ++i)
s += points[i].y * (points[i-].x - points[(i+)%point_num].x);
return fabs(s/2.0);
}
2 平面直线的交点
https://www.jianshu.com/p/3468c9967fc7
3 直角坐标与球坐标的相互转化
https://www.cnblogs.com/hans_gis/archive/2012/11/21/2755126.html
4 在球上生成均匀的点
(1)正二十面体:一个20个face,12个vertice的图形

(2)格点数量公式

viewpoints = 10*4^depth + 2;
(1)12 = 10*4^0 + 2
(2)42 = 10*4^1 + 2
(3)162 = 10*4^2 + 2
(4)642 = 10*4^3 + 2
(3) 老外写的资料
http://donhavey.com/blog/tutorials/tutorial-3-the-icosahedron-sphere/
(4) 基本思路
(1)根据当前模型尺寸定义正二十边形,包括12个顶点(vertices)和20个三角面片(triangles)
(2)访问每一个面片,对面片进行细分,subdivision
77 geometry process的更多相关文章
- NodeJS入门(五)—— process对象
process对象用于处理与当前进程相关的事情,它是一个全局对象,可以在任何地方直接访问到它而无需引入额外模块. 它是 EventEmitter 的一个实例. 本章的示例可以从我的Github上下载到 ...
- LRU缓存实现(Java)
LRU Cache的LinkedHashMap实现 LRU Cache的链表+HashMap实现 LinkedHashMap的FIFO实现 调用示例 LRU是Least Recently Used 的 ...
- 【转载】row cache lock
转自:http://blog.itpub.net/26736162/viewspace-2139754/ 定位的办法: --查询row cache lock等待 select event,p1 ...
- python---用链表结构实现有序和无序列表的几个功能
只是看看套路,没有深入练习. 如果真要自己写,可以基于此类. 但其实,在普通使用中,这样实现的性能,并没有python原生的列表性能好. 因为python原生列表的功能,是基于数组作扩展实现的. # ...
- [转]LRU缓存实现(Java)
LRU Cache的LinkedHashMap实现 LRU Cache的链表+HashMap实现 LinkedHashMap的FIFO实现 调用示例 LRU是Least Recently Used 的 ...
- <<Differential Geometry of Curves and Surfaces>>笔记
<Differential Geometry of Curves and Surfaces> by Manfredo P. do Carmo real line Rinterval I== ...
- Linux Process Virtual Memory
目录 . 简介 . 进程虚拟地址空间 . 内存映射的原理 . 数据结构 . 对区域的操作 . 地址空间 . 内存映射 . 反向映射 .堆的管理 . 缺页异常的处理 . 用户空间缺页异常的校正 . 内核 ...
- Linux Process Management && Process Scheduling Principle
目录 . 引言 . 进程优先级 . 进程的生命周 . 进程表示 . 进程管理相关的系统调用 . 进程调度 . 完全公平调度类 . 实时调度类 . 调度器增强 . 小结 1. 引言 在多处理器系统中,可 ...
- Process Kill Technology && Process Protection Against In Linux
目录 . 引言 . Kill Process By Kill Command && SIGNAL . Kill Process By Resource Limits . Kill Pr ...
随机推荐
- 【HDU6609】Find the answer【线段树】
题目大意:给你一个序列,对于每个i,你可以选择1~i-1中任意多的数并将它删去,剩余的数(包括i)∑≤m,问对于每个i最少删几个数可以达到要求 题解: 考虑朴素的思想,对于每个i,我只需要删去最大的若 ...
- signer information does not match signer information of other classes in the same package
报错日志: java.lang.SecurityException: class "org.bouncycastle.asn1.ASN1ObjectIdentifier"'s si ...
- BUUCTF | [SUCTF 2019]EasySQL (堆叠注入)
fuzz ing了一下,发现了一堆过滤: 同时发现了注入点,这个应该是var_dump()函数 ===============第二天的分割线 好吧我放弃了,找了一下wp 正确解:select 1;se ...
- Buuctf | BUU LFI COURSE 1
跟着赵师傅学CTF,这里是我的学习记录 ?file=/flag ?file=/var/log/nginx/access.log :包含ngnix的日志记录 在user-agent里面插入 :bbbbb ...
- LintCode之合并排序数组
题目描述: 我的代码: public class Solution { /* * @param A: sorted integer array A * @param B: sorted integer ...
- 116、TensorFlow变量的版本
import tensorflow as tf v = tf.get_variable("v", shape=(), initializer=tf.zeros_initialize ...
- 【VisualStdio】在VS2015中显示上下文菜单中“创建单元测试”菜单
---恢复内容开始--- VS2012以后创建单元测试的选项被默认隐藏了,创建单元测试变得无比低效率.看msdn的说法好像是想推荐使用Intell Test来替代单元测试的用途,但是还没摸清楚也不敢瞎 ...
- Ajax二级联动简单实例
效果图: 图1 图2(浙江省内存在山东省的数据,原因是先前加入的数据未删除) 思路:通过下拉省份,将省份id传入后台,根据省份塞入相应省份的市的数据,将市的数据再次传回前端 前端HTML及JS代码: ...
- LeetCode 95. Unique Binary Search Trees II 动态演示
比如输入为n, 这道题目就是让返回由1,2,... n的组成的所有二叉排序树,每个树都必须包含这n个数 这是二叉树的排列组合的题目.排列组合经常用DFS来解决. 这道题比如输入为3,也就是求start ...
- list中的所有值转换为字符串,以及list拼接成一个字符串
import stringlis=[1,2,3,'abc']fw=open('hello.txt','w',encoding='utf-8')# print(''.join(str(lis).repl ...