22 Jun
2022
22 Jun
'22
2:38 p.m.
untested! class CoordFrame: def __init__(self, mat = None): if mat is None: mat = np.array([1.0,0,0,0],[0,1.0,0,0],[0,0,1.0,0],[0,0,0,1.0]) self.mat = mat def apply(self, vec): return self.mat @ vec def inverted(self): return CoordFrame(self.mat.inverse()) # to move into camera space, call cameraframe.inverted().apply(vector) # to move into outer space, call innerframe.apply(vector) next i'll make a class for single-point characters to place in 3-space, to draw the bottom