Triangle学习之旅1
0 Triangle简介
- Triangle是一款简单好用但是功能强大的网格剖分程序,可以将任意二维图形根据需要剖分为三角网格,其源程序为免费程序,只有很小的几个C语言程序,附官网:(http://www.cs.cmu.edu/~quake/triangle.html),官网中有很详细的软件和命令介绍。
1 下载与安装
-
Triangle官网提供了下载通道,可以下载a.zip和a.shar两个文件,这里安装时选择了a.zip文件,安装过程如下:
-
1)使用unzip命令解压a.zip文件,如果没有unzip命令需要先安装命令;解压后,a.zip中含有如下文件:
-
其中,几个C文件为Triangle源文件,makefile为其内置编写好的安装命令,h文件为编译时需要的头文件,poly文件为Triangle自带的一个简单图形示例,README为Triangle说明文件,里面详细介绍了Triangle软件使用方法。
-
2) 编译安装有两种方法,第一种为上文提到的直接使用make命令进行编译;也可以选择人工编译,输入以下命令:
cc -O -o triangl