rphong_on_hemisphere: Sampling on hemisphere

View source: R/sphere.R

rphong_on_hemisphereR Documentation

Sampling on hemisphere

Description

Sampling on a hemisphere according to the Phong density (dimension 3).

Usage

rphong_on_hemisphere(n, alpha = 0, r = 1)

Arguments

n

number of simulations

alpha

parameter of the Phong density, a positive number; 0 for uniform sampling (default)

r

radius

Value

The simulations in a n times 3 matrix.

Examples

## Not run: 
library(rgl)
sims <- rphong_on_hemisphere(400, alpha = 10)
spheres3d(0, 0, 0, color = "red", alpha = 0.5)
points3d(sims)
## End(Not run)

stla/uniformly documentation built on July 29, 2023, 4:35 p.m.