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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ @@ -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!
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.
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.
NEWS.md
+ An overall leaner package to ensure optimal performance and remove experimental features.
Updated documentation to increase accessibility and usability.
Optional new coordinate system to allow for varying piece shape and 1-height plates & pieces. (Most bricks are 3-height)
New shapes! Plates, cheese slopes, round 1x1 bricks, conical 1x1 bricks.
Removed bricks_from_rayshader() and build_bricks_rayshader() to decrease the complexity of package.
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.
lego_colors as examples.
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.