MCPcopy Create free account
hub / github.com/densechen/CASS / scale_matrix

Function scale_matrix

lib/transformations.py:386–417  ·  view source on GitHub ↗

Return matrix to scale by factor around origin in direction. Use factor -1 for point symmetry. >>> v = (numpy.random.rand(4, 5) - 0.5) * 20 >>> v[3] = 1 >>> S = scale_matrix(-1.234) >>> numpy.allclose(numpy.dot(S, v)[:3], -1.234*v[:3]) True >>> factor = random.random()

(factor, origin=None, direction=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

unit_vectorFunction · 0.85

Tested by

no test coverage detected