cleanup and rename
This commit is contained in:
parent
acb86b8013
commit
1f332614f2
1 changed files with 153 additions and 216 deletions
|
|
@ -43,7 +43,7 @@ def build_box(rbounds):
|
|||
}
|
||||
|
||||
|
||||
def planes_from_box(rbounds):
|
||||
def planes_from_box(rbounds: numpy.ndarray):
|
||||
faces = [
|
||||
(( 0, 0, 1), -rbounds[0, 2]),
|
||||
(( 0, 0, -1), rbounds[1, 2]),
|
||||
|
|
@ -74,9 +74,3 @@ def planes_from_tetrahedron(vertices: numpy.ndarray):
|
|||
|
||||
return [plane for plane in zip(n, d)]
|
||||
|
||||
|
||||
def volume_of_tetrahedron(vertices):
|
||||
ad, bd, cd = vertices[0:3] - vertices[3]
|
||||
return -ad @ numpy.cross(bd, cd) / 6
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue