想知道各种几何模型在超球面(四维球的球面)上的样子吗?这个程序可以把各种几何体映射到超球面上,然后用三维的方式展示出来。你会发现几何体的棱和面都是弯的,这是因为这些几何体是在四维球面中的。就像三维球表面上的赤道和两根经线组成的“三角形”一样,每条边都是弯的。 从http://www.math.cmu.edu/~fho/jenn/可下载到最新版本
但在Ubunutu 9.10中按照官方安装步骤会出现错误,如下
代码: 全选
~/jenn3d $ make
g++ -O3 -ffast-math -fomit-frame-pointer -funroll-loops -pipe -DDEBUG_LEVEL=0 -DCAPTURE=4 -c -o main.o main.C
In file included from main.h:23,
from main.C:20:
definitions.h: In function 'void Logging::indent()':
definitions.h:158: error: 'abort' was not declared in this scope
definitions.h: In function 'void Logging::outdent()':
definitions.h:163: error: 'abort' was not declared in this scope
In file included from todd_coxeter.h:24,
from go_game.h:29,
from drawing.h:24,
from main.h:24,
from main.C:20:
linalg.h: In function 'float random_unif()':
linalg.h:173: error: 'drand48' was not declared in this scope
make: *** [main.o] Error 1
1、解压缩下载的文件
2、将下面的代码添加到 definitions.h 文件中,如图所示
代码: 全选
#include <stdlib.h>
#include <string.h>
#include <algorithm>
代码: 全选
sudo apt-get install freeglut3-dev
sudo apt-get install libpng-dev
make
./jenn
解决方法参考http://students.wmi.amu.edu.pl/~s301428/blog/?p=25