ryantimpe / brickr

3D LEGO models and mosaics from images using R and #tidyverse
Other
415 stars 57 forks source link

Mosaic built right-justified only #9

Closed GeoMicroSoares closed 5 years ago

GeoMicroSoares commented 5 years ago

Hi there,

Thanks so much for the package! Having loads of fun!

This might either be interesting or really basic, but trying to generate a pickle-shaped 3D mosaic here, and getting all my pieces justified to the right. Any way to go around this? I'd like them centered, as you may realize below.

The current state of my Excel sheet: image

The code I'm using to import this:

pickle =read.csv("PICKLE.csv")

brick_colors_2 <- tibble::tribble(
  ~`.value`, ~Color,
  1, "Bright yel. green",
  2, "White"
)

pickle %>% 
  bricks_from_table(brick_colors_2) %>% 
  display_bricks(theta = 210)

# %>% collect_3d() %>% 
#   display_3d(fov=0,theta=-20,phi=30,windowsize=c(1000,800),zoom=0.7)

rayshader::render_snapshot()

What I'm getting: image

Thanks!

ryantimpe commented 5 years ago

I assume you sorted this out (padded each of the smaller levels with 0s on either side) but this might be a good feature for me to add.... allowing to draw from the middle rather than at y=1.

GeoMicroSoares commented 5 years ago

Hey @ryantimpe yeah, figured it out, made myself a Pickle RIck as well :) 53215233_552496548576428_6489149646668038144_n