C0 and Cx1 now changes depending on DIM

This commit is contained in:
? 2019-02-25 14:50:39 +01:00 committed by Zeno Rogue
parent 02920b5d2f
commit 5ae2714e37
2 changed files with 10 additions and 4 deletions

View File

@ -3180,7 +3180,9 @@ extern ld backbrightness;
void initcells();
void precalc();
extern const hyperpoint C0;
extern const hyperpoint C02, C03;
#define C0 (DIM == 2 ? C02 : C03)
extern long long circlesize[100], disksize[100];
extern ld circlesizeD[10000];

View File

@ -128,13 +128,17 @@ hyperpoint hpxy3(ld x, ld y, ld z) {
}
// center of the pseudosphere
const hyperpoint Hypc = hpxyz(0,0,0);
const hyperpoint Hypc = hyperpoint(0,0,0,0);
// origin of the hyperbolic plane
const hyperpoint C0 = hpxyz(0,0,1);
const hyperpoint C02 = hyperpoint(0,0,1,0);
const hyperpoint C03 = hyperpoint(0,0,0,1);
// a point (I hope this number needs no comments ;) )
const hyperpoint Cx1 = hpxyz(1,0,1.41421356237);
const hyperpoint Cx12 = hyperpoint(1,0,1.41421356237,0);
const hyperpoint Cx13 = hyperpoint(1,0,0,1.41421356237);
#define Cx1 (DIM==2?Cx12:Cx13)
// this function returns approximate square of distance between two points
// (in the spherical analogy, this would be the distance in the 3D space,