imagine I have a 3 columns matrix x, y, z where z is a height/intensity of x and y.
x = runif(1000)
y = runif(1000)
z = rnorm(1000)
How to use the rayshader packge for 3D surface from x, y, z?
although the rgl could do it, i think is it possible to directly use the rayshader for 3D surface from x, y, z?
Thanks hees
You could use
akima::interp
to approximate the surface with a matrix of values, and mayberayshader::ray_shade
can handle that. Code would beThis gives a matrix of shade values; it doesn't draw anything. To draw something, you'll need to turn those values into colours, and display them. For example,
which gives this plot: