Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 699 Bytes

helpers.get_bounding_box.rst

File metadata and controls

44 lines (29 loc) · 699 Bytes

get_bounding_box

k3d.helpers.get_bounding_box

Examples

Set boundary

import k3d
import numpy as np

model_matrix = np.array([[1, 2, 3, 4]])

box = k3d.helpers.get_bounding_box(model_matrix, boundary=[-3, 3, -1, 1, 0, 5])

"""
array([-5, 20])
"""

No set boundaries

import k3d
import numpy as np

model_matrix = np.array([[1, 2, 3, 4],
                         [2, 4, 6, 8]])

box = k3d.helpers.get_bounding_box(model_matrix)

"""
array([-3.,  3., -6.,  6.])
"""