irtk.sampling.sample_hemisphere¶
- irtk.sampling.sample_hemisphere(batch: int, radius: float, method: Literal['uniform', 'fibonacci'] = 'uniform', axis: int = 1) torch.Tensor ¶
Sample points on a hemisphere.
- Parameters:
batch – Number of points to sample.
radius – Radius of the hemisphere.
method – Sampling method, either ‘uniform’ or ‘fibonacci’.
axis – Axis to use as up direction (0 for x, 1 for y, 2 for z).
- Returns:
Sampled points on the hemisphere with shape (batch, 3).
- Return type:
torch.Tensor