perspective_to_psace in 3D

This commit is contained in:
Zeno Rogue 2020-04-05 10:55:01 +02:00
parent 233adddd36
commit bacdacbb7f
1 changed files with 2 additions and 0 deletions

View File

@ -44,6 +44,7 @@ EX hyperpoint perspective_to_space(hyperpoint h, ld alpha IS(vid.alpha), eGeomet
return hpxy(hx * (1 + alpha), hy * (1 + alpha));
ld hr = hx*hx+hy*hy;
if(LDIM == 3) hr += h[2]*h[2];
if(hr > .9999 && gc == gcHyperbolic) return Hypc;
@ -65,6 +66,7 @@ EX hyperpoint perspective_to_space(hyperpoint h, ld alpha IS(vid.alpha), eGeomet
hyperpoint H;
H[0] = hx * (hz+alpha);
H[1] = hy * (hz+alpha);
if(LDIM == 3) H[2] = h[2] * (hz + alpha);
H[LDIM] = hz;
return H;