Description Usage Arguments Details Value Author(s) References See Also Examples
This function generates the variation of the images of the 3 dimensional display figure. There are four methods in total. See details for more information. It acts as a wrap because the creation of the figure is done using functions from the rgl package.
1 2 | spatial3d_mirrorDouble(obj, angle = pi/1.3, x = 0.3, y = 3, z = 0.8,
method = "one", axis = TRUE)
|
obj |
An object with class of threeD. |
angle, x, y, z |
See details |
method |
There are 4 methods. See details. |
axis |
Showing the axis is helpful when first testing the function. |
For 3D figures, some of the cubes may be hidden in sight when automatically generated. Hence, one would need to rotate the display figure several times to ensure that none of the cubes are hidden. This may be even more so when it comes to 2 figures within an image. The longer the number of connected cubes, the more likely it will overlap with each other. About 8 is more or less right.
The arguments angle, x, y, z represents the rotation of angle radians based on the x, y and z axis. This is a wrapper to the rotationMatrix function from the rgl package. Changing the values in the arguments angle, x, y, z coordinates allows one to programmatically change angles to study potential cognitive operators at work.
You can also rotate the figure interactively by clicking on the figure and moving it in different direction.
There are 4 methods to create distractors. The first method generates, the first image as a mirror, and the second image as normal. The second method is vice versa from the first method. The third method generates both mirror images. The first method generates correct rotation but the image is always short of one cube.
Return the matrix that generates the mirror image of the display figure.
Aiden Loe
https://en.wikipedia.org/wiki/Radian
Bejar, I. I. (1990). A generative analysis of a three-dimensional spatial task. Applied Psychological Measurement, 14(3), 237-245.
lisy
, arith
, spatial2d
, spatial3dDouble
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | display <- spatial3dDouble(seed=4, angle=pi/1.3, x=0.3,y=4,z=0.8,cubes=8, axis = TRUE)
display_mirror <- spatial3d_mirrorDouble(display, angle=pi/1.3, x=0.3, y=4, z=0.8,
method="one", axis = TRUE)
# To save the figure (not run)
# library(rgl)
# display_mirror <- spatial3d_mirrorDouble(display, angle=pi/1.3, x=0.3, y=4, z=0.8,
# method="one", axis = TRUE)
# wd<- '~/desktop'
# save in pdf
# item <- 1
# save <- paste0(wd,"/mirror3d_",item,".pdf")
# rgl.postscript(save,"pdf")
# save in png
# rgl.snapshot(filename="image3D.png",fmt="png")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.