R语言rayrender包,mesh3d_model文件和对象mesh3d”模式
# Thu Jul 01 01:59:02 2021 -
# 字符编码:UTF-8
# R 版本:R x64 4.1 for window 10
# cgh163email@163.com
# 个人笔记不负责任,拎了个梨🍐🌷
#.rs.restartR()
require(rayrender)
rm(list = ls());gc()
? mesh3d_model # mesh3d”模式
#加载mesh3d对象(从Rvcg)并渲染:
library(Rvcg)
data(humface)
rgl:: shade3d(humface)
generate_studio() %>%
add_object(mesh3d_model(
humface,
y = -0.3,
x = 0,
z = 0,
material = glossy(color = "dodgerblue4"),
scale_mesh = 1 / 70
)) %>%
add_object(sphere(
y = 5,
x = 5,
z = 5,
material = light(intensity = 50)
)) %>%
render_scene(
samples = 500,
width = 800,
height = 800,
lookat = c(0, 0.5, 1),
aperture = 0.0
)
kittyR::meowR(sound = 4)#猫叫
image.png
image.png
网友评论