From 421afb008b135d30231f0441ef766852d26d2e8c Mon Sep 17 00:00:00 2001 From: ogogmad Date: Tue, 23 Jun 2020 07:48:40 +0100 Subject: [PATCH] Fixed rotation and dilatation functions --- laguerre_transformations/laguerre_transformations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/laguerre_transformations/laguerre_transformations.py b/laguerre_transformations/laguerre_transformations.py index 7e9395e..a140c7f 100644 --- a/laguerre_transformations/laguerre_transformations.py +++ b/laguerre_transformations/laguerre_transformations.py @@ -76,7 +76,7 @@ def make_grid(nlines=100, spacing=100): def dilatation(t): """Returns a matrix that represents an axial dilatation.""" - return matrix([[one,t*eps/2],[-t*eps/2,one]]) + return block([[one,t*eps/2],[-t*eps/2,one]]) def interpolate(transformation, nframes=50): """Returns a list of transformations that interpolates between the @@ -92,7 +92,7 @@ def interpolate(transformation, nframes=50): def rotation(theta): """Returns a matrix that represents a rotation about the origin as a Laguerre transformation.""" - return matrix([[cos(theta/2)*one,-sin(theta/2)*one], + return block([[cos(theta/2)*one,-sin(theta/2)*one], [sin(theta/2)*one,cos(theta/2)*one]]) def apply_transformations(transformations, lines):