top of page

#Librerías necesarias

install.packages("rgl")

install.packages("magick")

#Codigo

library("rgl")

library("magick")

open3d()

shade3d( translate3d( tetrahedron3d(col = "red"), 0, 0, 0) )

shade3d( translate3d( cube3d(col = "green"), 3, 0, 0) )

shade3d( translate3d( octahedron3d(col = "blue"), 6, 0, 0) )

shade3d( translate3d( dodecahedron3d(col = "cyan"), 9, 0, 0) )

shade3d( translate3d( icosahedron3d(col = "magenta"), 12, 0, 0) )

#Giro Automatico

play3d( spin3d( axis = c(0, 0, 1), rpm = 7), duration = 100 )

# O Generar Gif

movie3d( spin3d( axis = c(0, 0, 1), rpm = 7),
         duration = 10, dir = getwd(),
         type = "gif", clean =  TRUE )

###################################################

install.packages("rgl")
install.packages("magick")

library("rgl")

library("magick")

open3d()

shade3d( translate3d( tetrahedron3d(col = "red"), 0, 0, 0) )

shade3d( translate3d( cube3d(col = "green"), 3, 0, 0) )

shade3d( translate3d( octahedron3d(col = "blue"), 6, 0, 0) )

shade3d( translate3d( dodecahedron3d(col = "cyan"), 9, 0, 0) )

shade3d( translate3d( icosahedron3d(col = "magenta"), 12, 0, 0) );
play3d( spin3d( axis = c(0, 0, 1), rpm = 7), duration = 100 )

###################################################

”Bien! Mensaje recibido

  • b-facebook
  • Twitter Round
bottom of page