Skip to content

Commit

Permalink
Fixed rotation and dilatation functions
Browse files Browse the repository at this point in the history
  • Loading branch information
wlad-svennik committed Jun 23, 2020
1 parent fe0bede commit 421afb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions laguerre_transformations/laguerre_transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand Down

0 comments on commit 421afb0

Please sign in to comment.