plot.obj: Plot OBJ form

Description Usage Arguments Value Examples

Description

The value for 'face_colour' is expanded to the length of the number of faces, so the application is discrete to each face, rather than varying between vertices.

Usage

1
2
## S3 method for class 'obj'
plot(x, ..., face_colour = "grey", homog = 1)

Arguments

x

obj model see 'read_obj'

...

passed to 'rgl::shade3d'

face_colour

colours to apply to faces

homog

homogeneous fourth coordinate, defaults to 1

Value

the rgl shape3d object, invisibly

Examples

1
2
3
4
5
6
7
8
9
#x <- read_obj("https://raw.githubusercontent.com/Cecropia/thehallaframe/master/models/david.obj")
#plot(x)
#plot(x, col = "grey")
#plot(x, col = "grey", homog = 1.5)
#plot(x, col = "grey", homog = 2)
#lapply(seq(1.5, 4, by = 0.5), function(a) plot(x, col = "grey", homog = a))
f <- system.file("extdata/greek_bust.obj.zip", package = "obj")
obj <- read_obj(f)
lapply(seq(1.5, 4, by = 0.5), function(a) plot(obj, col = "grey", homog = a))

hypertidy/obj documentation built on May 9, 2019, 5:55 p.m.