nCov visualization

nCov visualization

nCov visualization


Github project: tylermorganwall/coronaobj

Packages Install

Install through remotes

remotes::install_github("tylermorganwall/rayrender")
remotes::install_github("tylermorganwall/coronaobj")

(An extral data with  91.2MB is in inst/extdata. So, it may take a while to installing it)

Install from local

git clone https://github.com/tylermorganwall/rayrender.git
git clone https://github.com/tylermorganwall/coronaobj.git
install.packages("/home/ken/test/rayrender/",repos = NULL)
install.packages("/home/ken/test/coronaobj/",repos = NULL)

Start with coronaobj

library(coronaobj)
library(rayrender)

write_corona_obj("defaults.obj") # write the obj file to local

obj_model("defaults.obj", vertex_colors = TRUE) %>%
add_object(sphere(y=10,z=10,x=10, material=light(intensity=100))) %>%
add_object(sphere(y=10,z=10,x=-10, material=light(intensity=100))) %>%
render_scene(parallel=TRUE, samples = 1000, fov = 7, min_variance=0, focal_distance = 9.6,
width=800,height=800)

It takes me about 30min…

1586932705100-52454ad9-bdec-498e-bb87-8bb61554de89

## above right
obj_model("defaults.obj", vertex_colors = TRUE) %>%
add_object(sphere(y=10,z=10,x=10, material=light(color="lightblue",intensity=160))) %>%
add_object(sphere(y=10,z=10,x=-10, material=light(color="orange",intensity=160))) %>%
add_object(sphere(y=-10,z=-5,material=light(color="purple", intensity = 160))) %>%
render_scene(parallel=TRUE, samples = 1000, fov = 7, min_variance=0, focal_distance = 9.6,
aperture=0.5, width=800,height=800)

1586932810859-46f7ae3b-37b7-4161-8373-c6c0a16d1c9e

Author

Karobben

Posted on

2020-06-10

Updated on

2024-01-11

Licensed under

Comments