A partial fix for rendering finite lines.
This commit is contained in:
parent
56228bc8b1
commit
2b0e9cbeef
4
draw.py
4
draw.py
@ -1,7 +1,7 @@
|
|||||||
from cmath import exp
|
from cmath import exp
|
||||||
|
|
||||||
from constants import I, BLACK
|
from constants import I, BLACK
|
||||||
from gyro import MobiusInt, MobiusAdd, MobiusDist, cDot
|
from gyro import MobiusInt, MobiusAdd, MobiusDist, cDot, Poincare2Klein
|
||||||
from lines import cBetween
|
from lines import cBetween
|
||||||
|
|
||||||
from numba import jit, byte, double, prange, optional
|
from numba import jit, byte, double, prange, optional
|
||||||
@ -38,7 +38,7 @@ def draw(level,gPlayer,fov,res):
|
|||||||
if cDot(rot,MobiusAdd(cInt,-gPlayer.cPos)) > 0:
|
if cDot(rot,MobiusAdd(cInt,-gPlayer.cPos)) > 0:
|
||||||
continue
|
continue
|
||||||
rDist = MobiusDist(cInt,gPlayer.cPos)*1.1
|
rDist = MobiusDist(cInt,gPlayer.cPos)*1.1
|
||||||
if j.isFinite and not cBetween(j.pointA,j.pointB,cInt):
|
if j.isFinite and not cBetween(Poincare2Klein(j.pointA),Poincare2Klein(j.pointB),Poincare2Klein(cInt)):
|
||||||
continue
|
continue
|
||||||
if m is None:
|
if m is None:
|
||||||
m = DrawnSegment(rDist,j.color)
|
m = DrawnSegment(rDist,j.color)
|
||||||
|
Loading…
Reference in New Issue
Block a user