Description Usage Arguments Details Value See Also Examples
View source: R/build-instructions.R
Render faceted plot of instructions for 2D mosacis or 3D model objects. For mosaics, can specify the number of steps.
1 | build_instructions(brickr_obj, num_steps = 6)
|
brickr_obj |
brickr mosaic or 3D model object. |
num_steps |
Number of discrete steps in instruction manual, for mosaics only. |
Instructions for 2D mosaics are split into sections beginning at the bottom of the image. This makes it easier to follow each row when building an actual brick mosaic.
3D model instructions are displayed one Level (z value) at a time. The current model level is clearly displayed, while the previous level is shows as transparent.
A single plot object of steps to build brickr model or mosaic.
Other Resources:
build_colors()
,
build_pieces_table()
,
build_pieces()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Import a jpeg or png
demo_file <- system.file("extdata", "demo_img.jpg",
package = "brickr", mustWork = TRUE)
demo_image <- jpeg::readJPEG(demo_file)
#Create a mosaic oject
mosaic <- demo_image %>%
image_to_mosaic(img_size = 24)
#Rather than drawing the mosaic, use build_instructions() to draw instructions
mosaic %>%
build_instructions()
#Change the number of steps for more detail
mosaic %>%
build_instructions(num_steps = 9)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.