28
28
# ' #Generate the cornell box and add a single white sphere to the center
29
29
# ' scene = generate_cornell() %>%
30
30
# ' add_object(sphere(x=555/2,y=555/2,z=555/2,radius=555/8,material=lambertian()))
31
- # ' \dontrun {
31
+ # ' \donttest {
32
32
# ' render_scene(scene, lookfrom=c(278,278,-800),lookat = c(278,278,0), samples=500,
33
33
# ' aperture=0, fov=40, ambient_light=FALSE, parallel=TRUE)
34
34
# ' }
37
37
# ' scene = scene %>%
38
38
# ' add_object(cube(x=555/2,y=555/8,z=555/2,xwidth=555/2,ywidth=555/4,zwidth=555/2,
39
39
# ' material = lambertian(checkercolor="purple",checkerperiod=20)))
40
- # ' \dontrun {
40
+ # ' \donttest {
41
41
# ' render_scene(scene, lookfrom=c(278,278,-800),lookat = c(278,278,0), samples=500,
42
42
# ' aperture=0, fov=40, ambient_light=FALSE, parallel=TRUE)
43
43
# ' }
46
46
# ' scene = scene %>%
47
47
# ' add_object(sphere(x=555/2+555/4,y=555/2,z=555/2,radius=555/8,
48
48
# ' material = lambertian(noise=1/20)))
49
- # ' \dontrun {
49
+ # ' \donttest {
50
50
# ' render_scene(scene, lookfrom=c(278,278,-800),lookat = c(278,278,0), samples=500,
51
51
# ' aperture=0, fov=40, ambient_light=FALSE, parallel=TRUE)
52
52
# ' }
55
55
# ' scene = scene %>%
56
56
# ' add_object(cube(x=555/2-555/4,y=555/2,z=555/2,xwidth=555/4,ywidth=555/4,zwidth=555/4,
57
57
# ' material = lambertian(fog=TRUE, fogdensity=0.05,color="orange")))
58
- # ' \dontrun {
58
+ # ' \donttest {
59
59
# ' render_scene(scene, lookfrom=c(278,278,-800),lookat = c(278,278,0), samples=500,
60
60
# ' aperture=0, fov=40, ambient_light=FALSE, parallel=TRUE)
61
61
# ' }
@@ -98,23 +98,23 @@ lambertian = function(color = "#ffffff", checkercolor = NA, checkerperiod = 3,
98
98
# ' #Generate the cornell box with a single metal sphere in the center
99
99
# ' scene = generate_cornell() %>%
100
100
# ' add_object(sphere(x=555/2,y=555/2,z=555/2,radius=555/8,material=metal()))
101
- # ' \dontrun {
101
+ # ' \donttest {
102
102
# ' render_scene(scene, lookfrom=c(278,278,-800),lookat = c(278,278,0), samples=500,
103
103
# ' aperture=0, fov=40, ambient_light=FALSE, parallel=TRUE)
104
104
# ' }
105
105
# ' #Add a rotated shiny metal cube
106
106
# ' scene = scene %>%
107
107
# ' add_object(cube(x=380,y=150/2,z=200,xwidth=150,ywidth=150,zwidth=150,
108
108
# ' material = metal(color="#8B4513"),angle=c(0,45,0)))
109
- # ' \dontrun {
109
+ # ' \donttest {
110
110
# ' render_scene(scene, lookfrom=c(278,278,-800),lookat = c(278,278,0), samples=500,
111
111
# ' aperture=0, fov=40, ambient_light=FALSE, parallel=TRUE)
112
112
# ' }
113
113
# ' #Add a brushed metal cube (setting the fuzz variable)
114
114
# ' scene = scene %>%
115
115
# ' add_object(cube(x=150,y=150/2,z=300,xwidth=150,ywidth=150,zwidth=150,
116
116
# ' material = metal(color="#FAFAD2",fuzz=0.1),angle=c(0,-30,0)))
117
- # ' \dontrun {
117
+ # ' \donttest {
118
118
# ' render_scene(scene, lookfrom=c(278,278,-800),lookat = c(278,278,0), samples=500,
119
119
# ' aperture=0, fov=40, ambient_light=FALSE, parallel=TRUE)
120
120
# ' }
@@ -143,27 +143,27 @@ metal = function(color = "#ffffff", fuzz = 0, implicit_sample = FALSE) {
143
143
# ' #Generate a checkered ground
144
144
# ' scene = generate_ground(depth=-0.5,
145
145
# ' material=lambertian(color="white", checkercolor="grey30",checkerperiod=2))
146
- # ' \dontrun {
146
+ # ' \donttest {
147
147
# ' render_scene(scene,parallel=TRUE)
148
148
# ' }
149
149
# '
150
150
# ' #Add a glass sphere
151
- # ' \dontrun {
151
+ # ' \donttest {
152
152
# ' scene %>%
153
153
# ' add_object(sphere(x=-0.5,radius=0.5,material=dielectric())) %>%
154
154
# ' render_scene(parallel=TRUE,samples=400)
155
155
# ' }
156
156
# '
157
157
# ' #Add a rotated colored glass cube
158
- # ' \dontrun {
158
+ # ' \donttest {
159
159
# ' scene %>%
160
160
# ' add_object(sphere(x=-0.5,radius=0.5,material=dielectric())) %>%
161
161
# ' add_object(cube(x=0.5,xwidth=0.5,material=dielectric(color="darkgreen"),angle=c(0,-45,0))) %>%
162
162
# ' render_scene(parallel=TRUE,samples=40)
163
163
# ' }
164
164
# '
165
165
# ' #Add an area light behind and at an angle and turn off the ambient lighting
166
- # ' \dontrun {
166
+ # ' \donttest {
167
167
# ' scene %>%
168
168
# ' add_object(sphere(x=-0.5,radius=0.5,material=dielectric())) %>%
169
169
# ' add_object(cube(x=0.5,xwidth=0.5,material=dielectric(color="darkgreen"),angle=c(0,-45,0))) %>%
@@ -179,4 +179,4 @@ dielectric = function(color="white", refraction = 1.5, implicit_sample = FALSE)
179
179
checkercolor = list (NA ), noise = 0 , noisephase = 0 , noiseintensity = 0 , noisecolor = list (c(0 ,0 ,0 )),
180
180
image = list (NA ), lightintensity = NA ,
181
181
fog = FALSE , fogdensity = NA , implicit_sample = implicit_sample )
182
- }
182
+ }
0 commit comments