R语言rayrender包,generate_studio生成的工作室
# Thu Jul 01 01:31:53 2021 -
# 字符编码:UTF-8
# R 版本:R x64 4.1 for window 10
# cgh163email@163.com
# 个人笔记不负责任,拎了个梨🍐🌷
#.rs.restartR()
require(rayrender)
rm(list = ls());gc()
? generate_studio # 生成的工作室
scene = generate_studio(depth=-1, material = diffuse(color="white")) %>%
add_object(obj_model(r_obj(),y=-1,x=0.7,material=glossy(color="darkred"),angle=c(0,-20,0))) %>%
add_object(sphere(x=-0.7,radius=0.5,material=dielectric())) %>%
add_object(sphere(y=3,x=-2,z=20,material=light(intensity=600)))
render_scene(scene, parallel=TRUE,lookfrom=c(0,2,10),fov=20,clamp_value=10,samples=500)
#Zooming out to show the full default scene
render_scene(scene, parallel=TRUE,lookfrom=c(0,200,400),clamp_value=10,samples=500)
dev.copy(png, "2.png");dev.off()
image.png
image.png
网友评论