A package for calculate barycentric coordinates in the tetrahedras.
Project description
Query_pts
A package for calculate barycentric coordinates in the tetrahedras.
Dependency
This package relies on cuda 10, which has been tested on pytorch 1.7.1 and cuda 10.2.
Usage
import torch
import query_pts
tet_idx, barycentric = query_pts.cal_barycentric(q_pts, verts, tets, indexes, 4)
Args:
q_pts (torch.tensor): the query points, [Nq,3]
verts (torch.tensor): the vertices tethedra, [NV,3]
tets (torch.tensor): the vertex index of each tet, [NT,4]
K (int): the nearest neighbors for searching to accelerate query
use_cuda (bool, optional): _description_. Defaults to True.
Return:
tet_idx (torch.tensor): the tet which containing the query point, [Nq,]
barycentric (torch.tensor): corresponding barycentric coordinates, [Nq,4]
If a point is not in any tetrahedras, the tet idx is set to -1 and barycentric coordinates are set to [0,0,0,0].
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
query_pts-0.2.1.tar.gz
(27.2 kB
view details)
File details
Details for the file query_pts-0.2.1.tar.gz.
File metadata
- Download URL: query_pts-0.2.1.tar.gz
- Upload date:
- Size: 27.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb19a9ab8f0c2e02773921cab2d528b304e5601dd3d5724226c18fec1c23f812
|
|
| MD5 |
5365aeb08d0f42a0b08d1e9a4ef9da89
|
|
| BLAKE2b-256 |
1c5b81772500cc2a484de04853cb930956d4c19469844f2a166a8983f52351c5
|