diff --git a/DESCRIPTION b/DESCRIPTION index 1caeee1..36a3896 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: brickr Title: Tools to emulate the LEGO® System in R -Version: 0.2.9.9300 +Version: 0.3.0 Authors@R: person(given = "Ryan", family = "Timpe", diff --git a/NEWS.md b/NEWS.md index 3a1f20e..f4a99e6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ # Current version -##brickr 0.3.0 - a.k.a. [Pirate ship]() +# brickr 0.3.0 - a.k.a. [Pirate ship]() * An overall leaner package to ensure optimal performance and remove experimental features. @@ -20,7 +20,7 @@ ---- -##brickr 0.2.0.9003 +# brickr 0.2.0.9003 * Issues after updating to [farver 2.0](https://github.com/thomasp85/farver). Temporarily set color method back to 'brickr_classic'. diff --git a/R/image-to-mosaic.R b/R/image-to-mosaic.R index 664c3f1..db90c55 100644 --- a/R/image-to-mosaic.R +++ b/R/image-to-mosaic.R @@ -20,7 +20,7 @@ #' @export #' image_to_mosaic <- function(img, img_size = 48, color_table = NULL, - method = "brickr_classic", + method = "cie94", color_palette = c("universal", "generic", "special"), dithering = FALSE, contrast = 1, use_bricks = NULL, diff --git a/R/image-to-prep-mosaic.R b/R/image-to-prep-mosaic.R index 7b26430..92a45c9 100644 --- a/R/image-to-prep-mosaic.R +++ b/R/image-to-prep-mosaic.R @@ -95,12 +95,13 @@ image_to_scaled <- function(image, img_size = 48, brightness = 1, warhol = 1:3){ #' Convert image output from scale_image() to bricks #' #' @param image_list List output from scale_image(). Contains an element \code{Img_scaled}. -#' @param method The method to use for comparison. Either 'brickr_classic', 'euclidean', 'cie1976', 'cie94', 'cie2000', or 'cmc'. +#' @param method Default 'cie94'. The method to use for comparison. Either 'brickr_classic', 'euclidean', 'cie1976', 'cie94', 'cie2000', or 'cmc'. #' 'brickr_classic' is an explicit euclidean distance formula, but yield different results than 'euclidean' in {farver}. #' See \code{farver::compare_colour}. #' @param color_table Defaults to \code{lego_colors}. Data frame of brick colors to map onto image. Must contain Name and R, G, B channels. #' See attached data \code{lego_colors} as examples. -#' @param color_palette Brick color rarity to use. Defaults to all colors: 'universal' (most common), 'generic', and 'special' (least common). This is useful when trying to build the mosaic out of real bricks. +#' @param color_palette Brick color rarity to use. Defaults to all colors: 'universal' (most common), 'generic', and 'special' (least common). +#' This is useful when trying to build the mosaic out of real bricks. #' Use "bw" for only grayscale bricks. Ignored if a \code{color_table} is supplied. #' @param dithering Improves color of large, photo-realistic mosaics. #' @param contrast For \code{color_palette = "bw"}. A value >1 will increase the contrast of the image while a positive value <1 will decrease the contrast. @@ -109,7 +110,7 @@ image_to_scaled <- function(image, img_size = 48, brightness = 1, warhol = 1:3){ #' @usage NULL #' @keywords internal #' @return A list with element \code{Img_lego} containing a data frame of the x- & y-coordinates, R, G, B channels, and mapped color of each brick (pixel). -scaled_to_colors <- function(image_list, method = "brickr_classic", +scaled_to_colors <- function(image_list, method = "cie94", color_table = NULL, color_palette = c("universal", "generic", "special"), dithering = FALSE, diff --git a/README.Rmd b/README.Rmd index b9989d4..fa67c78 100644 --- a/README.Rmd +++ b/README.Rmd @@ -28,22 +28,22 @@ library(tidyverse) The package is divided into 2 systems: - - [**Mosaics**](#mosaics): Convert image files into mosaics that could be built using LEGO® bricks. - - [**3D Models**](#3d-models): Build 3D LEGO® models from data tables using [rgl](https://cran.r-project.org/web/packages/rgl/index.html). + - [**Mosaics**](#mosaics): Convert image files into mosaics that could be built using LEGO bricks. + - [**3D Models**](#3d-models): Build 3D LEGO models from data tables using [rgl](https://cran.r-project.org/web/packages/rgl/index.html). -brickr also includes tools help users create the Mosaics and 3D model output using real LEGO® elements. +brickr also includes tools help users create the Mosaics and 3D model output using real LEGO elements. Check out [brickr.org](http://brickr.org) for more detail! ### What's the point? -The goal of **brickr** is to provide a series of tools to integrate the LEGO® system with R by: +The goal of **brickr** is to provide a series of tools to integrate the LEGO system with R by: - Enhancing a real world building experience with mosaics, generated instructions, and piece counts. - Generating interest in R and coding for new audiences with easy-to-create 3D models. - Embracing pure novelty. -*brickr is developed under the [Fair Play](https://www.lego.com/en-us/legal/notices-and-policies/fair-play/) policy using publicly available information about LEGO® products. brickr is not affiliated with The LEGO Group.* +*brickr is developed under the [Fair Play](https://www.lego.com/en-us/legal/notices-and-policies/fair-play/) policy using publicly available information about LEGO products. brickr is not affiliated with The LEGO Group.* ## Installation ``` r @@ -216,6 +216,6 @@ mosaic1 %>% build_pieces() ## Acknowledgements -3D models in brickr would not exist without [Tyler Morgan-Wall](https://twitter.com/tylermorganwall) and his [rayshader](https://www.rayshader.com/) package. If you're interested in creating any time of 3D models in R, check out his [rayrender](https://www.rayrender.net/) package. +3D models in brickr would not exist without [Tyler Morgan-Wall](https://twitter.com/tylermorganwall) and his [rayshader](https://www.rayshader.com/) package. If you're interested in creating 3D models of literally *anything* R, check out his [rayrender](https://www.rayrender.net/) package. All functions in brickr are created with the [tidyverse](https://www.tidyverse.org/) and [rgl](https://cran.r-project.org/web/packages/rgl/index.html). diff --git a/README.md b/README.md index 345e0b0..65f0888 100644 --- a/README.md +++ b/README.md @@ -19,19 +19,19 @@ status](https://travis-ci.org/ryantimpe/brickr.svg?branch=master)](https://travi The package is divided into 2 systems: - [**Mosaics**](#mosaics): Convert image files into mosaics that could - be built using LEGO® bricks. - - [**3D Models**](#3d-models): Build 3D LEGO® models from data tables + be built using LEGO bricks. + - [**3D Models**](#3d-models): Build 3D LEGO models from data tables using [rgl](https://cran.r-project.org/web/packages/rgl/index.html). brickr also includes tools help users create the Mosaics and 3D model -output using real LEGO® elements. +output using real LEGO elements. Check out [brickr.org](http://brickr.org) for more detail\! ### What’s the point? The goal of **brickr** is to provide a series of tools to integrate the -LEGO® system with R by: +LEGO system with R by: - Enhancing a real world building experience with mosaics, generated instructions, and piece counts. @@ -41,7 +41,7 @@ LEGO® system with R by: *brickr is developed under the [Fair Play](https://www.lego.com/en-us/legal/notices-and-policies/fair-play/) -policy using publicly available information about LEGO® products. brickr +policy using publicly available information about LEGO products. brickr is not affiliated with The LEGO Group.* ## Installation @@ -281,7 +281,7 @@ mosaic1 %>% build_pieces() 3D models in brickr would not exist without [Tyler Morgan-Wall](https://twitter.com/tylermorganwall) and his [rayshader](https://www.rayshader.com/) package. If you’re interested in -creating any time of 3D models in R, check out his +creating 3D models of literally *anything* R, check out his [rayrender](https://www.rayrender.net/) package. All functions in brickr are created with the diff --git a/cran-comments.md b/cran-comments.md new file mode 100644 index 0000000..bb47d8b --- /dev/null +++ b/cran-comments.md @@ -0,0 +1,12 @@ +## Test environments +* local Windows 10 install, R 3.6.1 +* ubuntu 14.04 (on travis-ci), R 3.6.2 +* win-builder (devel and release) + +## R CMD check results +There were no ERRORs or WARNINGs or NOTEs. + +This is my first cran submission. + +## Downstream dependencies +No downstream dependencies \ No newline at end of file diff --git a/docs/404.html b/docs/404.html index 786e1c1..1c55479 100644 --- a/docs/404.html +++ b/docs/404.html @@ -78,7 +78,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 7f07c55..c7d28f5 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -78,7 +78,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/LICENSE.html b/docs/LICENSE.html index 7509d97..c9ca64c 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -78,7 +78,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/articles/index.html b/docs/articles/index.html index 2151d3e..354da19 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -78,7 +78,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/articles/models-from-other.html b/docs/articles/models-from-other.html index bd1ed78..9a91500 100644 --- a/docs/articles/models-from-other.html +++ b/docs/articles/models-from-other.html @@ -39,7 +39,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/articles/models-from-program.html b/docs/articles/models-from-program.html index a7e96ce..8d96520 100644 --- a/docs/articles/models-from-program.html +++ b/docs/articles/models-from-program.html @@ -39,7 +39,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/articles/models-from-program_files/figure-html/bricks_6-1.png b/docs/articles/models-from-program_files/figure-html/bricks_6-1.png index 19f0317..33fd1f7 100644 Binary files a/docs/articles/models-from-program_files/figure-html/bricks_6-1.png and b/docs/articles/models-from-program_files/figure-html/bricks_6-1.png differ diff --git a/docs/articles/models-from-program_files/figure-html/bricks_8-1.png b/docs/articles/models-from-program_files/figure-html/bricks_8-1.png index 0fe1e8c..84629e5 100644 Binary files a/docs/articles/models-from-program_files/figure-html/bricks_8-1.png and b/docs/articles/models-from-program_files/figure-html/bricks_8-1.png differ diff --git a/docs/articles/models-from-program_files/figure-html/bricks_9-1.png b/docs/articles/models-from-program_files/figure-html/bricks_9-1.png index 73711cb..51b8dc6 100644 Binary files a/docs/articles/models-from-program_files/figure-html/bricks_9-1.png and b/docs/articles/models-from-program_files/figure-html/bricks_9-1.png differ diff --git a/docs/articles/models-from-tables.html b/docs/articles/models-from-tables.html index eb1e544..b1a02e5 100644 --- a/docs/articles/models-from-tables.html +++ b/docs/articles/models-from-tables.html @@ -39,7 +39,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/articles/models-piece-type.html b/docs/articles/models-piece-type.html index e848e96..1fb4cd1 100644 --- a/docs/articles/models-piece-type.html +++ b/docs/articles/models-piece-type.html @@ -39,7 +39,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/articles/mosaics.html b/docs/articles/mosaics.html index 9d778c0..e0e8db6 100644 --- a/docs/articles/mosaics.html +++ b/docs/articles/mosaics.html @@ -39,7 +39,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/authors.html b/docs/authors.html index 00bd586..1032035 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -78,7 +78,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/index.html b/docs/index.html index 32c2654..b46cd5d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -42,7 +42,7 @@ brickr - 0.2.9.9300 + 0.3 @@ -122,22 +122,22 @@

The package is divided into 2 systems:

-

brickr also includes tools help users create the Mosaics and 3D model output using real LEGO® elements.

+

brickr also includes tools help users create the Mosaics and 3D model output using real LEGO elements.

Check out brickr.org for more detail!

What’s the point?

-

The goal of brickr is to provide a series of tools to integrate the LEGO® system with R by:

+

The goal of brickr is to provide a series of tools to integrate the LEGO system with R by:

-

brickr is developed under the Fair Play policy using publicly available information about LEGO® products. brickr is not affiliated with The LEGO Group.

+

brickr is developed under the Fair Play policy using publicly available information about LEGO products. brickr is not affiliated with The LEGO Group.

@@ -304,7 +304,7 @@

Acknowledgements

-

3D models in brickr would not exist without Tyler Morgan-Wall and his rayshader package. If you’re interested in creating any time of 3D models in R, check out his rayrender package.

+

3D models in brickr would not exist without Tyler Morgan-Wall and his rayshader package. If you’re interested in creating 3D models of literally anything R, check out his rayrender package.

All functions in brickr are created with the tidyverse and rgl.

diff --git a/docs/news/index.html b/docs/news/index.html index ae14adc..b77e374 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -78,7 +78,7 @@ brickr - 0.2.9.9300 + 0.3 @@ -145,6 +145,40 @@ Source: NEWS.md +
+

+brickr 0.3.0 - a.k.a. Pirate ship +

+ +
+

+3D Models

+ +
+
+

+ggplot Extension

+ +
+
+
+
+

+brickr 0.2.0.9003

+ +
+

brickr 0.2.0 - a.k.a. Castle @@ -252,6 +286,8 @@

Contents

diff --git a/docs/reference/brickr.html b/docs/reference/brickr.html index 8f5bbc8..2fb7ff4 100644 --- a/docs/reference/brickr.html +++ b/docs/reference/brickr.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3

diff --git a/docs/reference/bricks_from_coords.html b/docs/reference/bricks_from_coords.html index 93d3e47..e7808ea 100644 --- a/docs/reference/bricks_from_coords.html +++ b/docs/reference/bricks_from_coords.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/reference/bricks_from_excel.html b/docs/reference/bricks_from_excel.html index 20c5fff..74df6cb 100644 --- a/docs/reference/bricks_from_excel.html +++ b/docs/reference/bricks_from_excel.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/reference/bricks_from_mosaic.html b/docs/reference/bricks_from_mosaic.html index e53bfda..9a932a0 100644 --- a/docs/reference/bricks_from_mosaic.html +++ b/docs/reference/bricks_from_mosaic.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/reference/bricks_from_table.html b/docs/reference/bricks_from_table.html index c57b9b0..d1f0a93 100644 --- a/docs/reference/bricks_from_table.html +++ b/docs/reference/bricks_from_table.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/reference/build_bricks.html b/docs/reference/build_bricks.html index cfde219..c9cde91 100644 --- a/docs/reference/build_bricks.html +++ b/docs/reference/build_bricks.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/reference/build_colors.html b/docs/reference/build_colors.html index e60fad7..e5f97aa 100644 --- a/docs/reference/build_colors.html +++ b/docs/reference/build_colors.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/reference/build_instructions.html b/docs/reference/build_instructions.html index 0e18a7a..468cffa 100644 --- a/docs/reference/build_instructions.html +++ b/docs/reference/build_instructions.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/reference/build_mosaic.html b/docs/reference/build_mosaic.html index f567145..2e9276a 100644 --- a/docs/reference/build_mosaic.html +++ b/docs/reference/build_mosaic.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/reference/build_pieces.html b/docs/reference/build_pieces.html index 23f19b0..7588311 100644 --- a/docs/reference/build_pieces.html +++ b/docs/reference/build_pieces.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/reference/build_pieces_table.html b/docs/reference/build_pieces_table.html index 88dca5a..38db17b 100644 --- a/docs/reference/build_pieces_table.html +++ b/docs/reference/build_pieces_table.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/reference/collect_bricks.html b/docs/reference/collect_bricks.html index 118fa93..350fe09 100644 --- a/docs/reference/collect_bricks.html +++ b/docs/reference/collect_bricks.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/reference/geom_brick_rect.html b/docs/reference/geom_brick_rect.html index 127b82e..df0e63a 100644 --- a/docs/reference/geom_brick_rect.html +++ b/docs/reference/geom_brick_rect.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/reference/image_to_mosaic.html b/docs/reference/image_to_mosaic.html index f48e548..22b666e 100644 --- a/docs/reference/image_to_mosaic.html +++ b/docs/reference/image_to_mosaic.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3 @@ -155,7 +155,7 @@ img, img_size = 48, color_table = NULL, - method = "brickr_classic", + method = "cie94", color_palette = c("universal", "generic", "special"), dithering = FALSE, contrast = 1, diff --git a/docs/reference/image_to_scaled.html b/docs/reference/image_to_scaled.html index b850e72..7f2815d 100644 --- a/docs/reference/image_to_scaled.html +++ b/docs/reference/image_to_scaled.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/reference/index.html b/docs/reference/index.html index dae3d7a..cd3a024 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -78,7 +78,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/reference/lego_colors.html b/docs/reference/lego_colors.html index 87359e3..34c32ef 100644 --- a/docs/reference/lego_colors.html +++ b/docs/reference/lego_colors.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/reference/pipe.html b/docs/reference/pipe.html index c2cb39a..f850e5b 100644 --- a/docs/reference/pipe.html +++ b/docs/reference/pipe.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3 diff --git a/docs/reference/scaled_to_colors.html b/docs/reference/scaled_to_colors.html index 395d493..0104d4d 100644 --- a/docs/reference/scaled_to_colors.html +++ b/docs/reference/scaled_to_colors.html @@ -79,7 +79,7 @@ brickr - 0.2.9.9300 + 0.3 @@ -161,7 +161,7 @@ method -

The method to use for comparison. Either 'brickr_classic', 'euclidean', 'cie1976', 'cie94', 'cie2000', or 'cmc'. +

Default 'cie94'. The method to use for comparison. Either 'brickr_classic', 'euclidean', 'cie1976', 'cie94', 'cie2000', or 'cmc'. 'brickr_classic' is an explicit euclidean distance formula, but yield different results than 'euclidean' in farver. See farver::compare_colour.

@@ -172,7 +172,8 @@ See attached data lego_colors as examples.

color_palette -

Brick color rarity to use. Defaults to all colors: 'universal' (most common), 'generic', and 'special' (least common). This is useful when trying to build the mosaic out of real bricks. +

Brick color rarity to use. Defaults to all colors: 'universal' (most common), 'generic', and 'special' (least common). +This is useful when trying to build the mosaic out of real bricks. Use "bw" for only grayscale bricks. Ignored if a color_table is supplied.

diff --git a/man/image_to_mosaic.Rd b/man/image_to_mosaic.Rd index bd01c2c..f898625 100644 --- a/man/image_to_mosaic.Rd +++ b/man/image_to_mosaic.Rd @@ -8,7 +8,7 @@ image_to_mosaic( img, img_size = 48, color_table = NULL, - method = "brickr_classic", + method = "cie94", color_palette = c("universal", "generic", "special"), dithering = FALSE, contrast = 1, diff --git a/man/scaled_to_colors.Rd b/man/scaled_to_colors.Rd index bd26e5a..7c25eea 100644 --- a/man/scaled_to_colors.Rd +++ b/man/scaled_to_colors.Rd @@ -6,14 +6,15 @@ \arguments{ \item{image_list}{List output from scale_image(). Contains an element \code{Img_scaled}.} -\item{method}{The method to use for comparison. Either 'brickr_classic', 'euclidean', 'cie1976', 'cie94', 'cie2000', or 'cmc'. +\item{method}{Default 'cie94'. The method to use for comparison. Either 'brickr_classic', 'euclidean', 'cie1976', 'cie94', 'cie2000', or 'cmc'. 'brickr_classic' is an explicit euclidean distance formula, but yield different results than 'euclidean' in {farver}. See \code{farver::compare_colour}.} \item{color_table}{Defaults to \code{lego_colors}. Data frame of brick colors to map onto image. Must contain Name and R, G, B channels. See attached data \code{lego_colors} as examples.} -\item{color_palette}{Brick color rarity to use. Defaults to all colors: 'universal' (most common), 'generic', and 'special' (least common). This is useful when trying to build the mosaic out of real bricks. +\item{color_palette}{Brick color rarity to use. Defaults to all colors: 'universal' (most common), 'generic', and 'special' (least common). +This is useful when trying to build the mosaic out of real bricks. Use "bw" for only grayscale bricks. Ignored if a \code{color_table} is supplied.} \item{dithering}{Improves color of large, photo-realistic mosaics.}