From 2b0e9cbeefc6e986962751540d96c6fcc46fd960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?b=CA=B0edoh=E2=82=82=20sw=C3=A9?= Date: Fri, 5 Apr 2024 19:24:50 +0500 Subject: [PATCH] A partial fix for rendering finite lines. --- draw.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/draw.py b/draw.py index 8406355..b081034 100644 --- a/draw.py +++ b/draw.py @@ -1,7 +1,7 @@ from cmath import exp 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 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: continue 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 if m is None: m = DrawnSegment(rDist,j.color)