Ready for 2.0 release, minus checks

This commit is contained in:
ryantimpe
2019-10-27 19:30:12 -04:00
parent aca07e2dd1
commit 80083c9dfb
76 changed files with 1568 additions and 866 deletions

173
docs/404.html Normal file
View File

@@ -0,0 +1,173 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page not found (404) • brickr</title>
<!-- favicons -->
<link rel="icon" type="image/png" sizes="16x16" href="http://brickr.org/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="http://brickr.org/favicon-32x32.png">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="http://brickr.org/apple-touch-icon.png" />
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="http://brickr.org/apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="http://brickr.org/apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="http://brickr.org/apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="http://brickr.org/pkgdown.css" rel="stylesheet">
<script src="http://brickr.org/pkgdown.js"></script>
<link href="http://brickr.org/extra.css" rel="stylesheet">
<meta property="og:title" content="Page not found (404)" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-title-body">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="http://brickr.org/index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="reference/index.html">Reference</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Articles
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="articles/graphs.html">ggplot with brickr</a>
</li>
<li>
<a href="articles/models-from-other.html">3D Models from mosaics &amp; rayshader</a>
</li>
<li>
<a href="articles/models-from-program.html">3D Models programmatically</a>
</li>
<li>
<a href="articles/models-from-tables.html">3D models from tables</a>
</li>
<li>
<a href="articles/mosaics.html">Mosaics with brickr</a>
</li>
</ul>
</li>
<li>
<a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="contents col-md-9">
<div class="page-header">
<h1>Page not found (404)</h1>
</div>
Content not found. Please use links in the navbar.
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="pkgdown.css" rel="stylesheet">
@@ -39,13 +43,14 @@
<link href="extra.css" rel="stylesheet">
<meta property="og:title" content="License" />
<meta property="og:title" content="License" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -56,6 +61,7 @@
<![endif]-->
</head>
<body>
@@ -72,7 +78,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -80,7 +86,7 @@
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -115,11 +121,10 @@
<a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -130,6 +135,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -147,19 +153,23 @@ COPYRIGHT HOLDER: Ryan Timpe
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="pkgdown.css" rel="stylesheet">
@@ -39,13 +43,14 @@
<link href="extra.css" rel="stylesheet">
<meta property="og:title" content="GNU General Public License" />
<meta property="og:title" content="GNU General Public License" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -56,6 +61,7 @@
<![endif]-->
</head>
<body>
@@ -72,7 +78,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -80,7 +86,7 @@
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -115,11 +121,10 @@
<a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -130,6 +135,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -367,19 +373,23 @@
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -13,8 +13,9 @@
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- sticky kit --><script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="ggplot with brickr">
<meta property="og:description" content="">
@@ -38,7 +39,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -46,7 +47,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -84,7 +85,7 @@
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -97,6 +98,7 @@
<!--/.navbar -->
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header toc-ignore">
@@ -114,7 +116,7 @@
<h2 class="hasAnchor">
<a href="#getting-started" class="anchor"></a>Getting started</h2>
<p>brickr includes functions to render <a href="https://ggplot2.tidyverse.org/">ggplot2</a> bar charts as bricks with LEGO color themes. The main function is <code><a href="../reference/geom_brick_col.html">geom_brick_col()</a></code>, which is the brickr equivalent of <code>geom_col()</code>. Additional functions are highly recommended to ensure that proper the chart is rendered in the proper functions and proportions.</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1">df &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/data.frame">data.frame</a></span>(<span class="dt">trt =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"a"</span>, <span class="st">"b"</span>, <span class="st">"c"</span>), <span class="dt">outcome =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="fl">2.3</span>, <span class="fl">1.9</span>, <span class="fl">3.2</span>))</a>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1">df &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(<span class="dt">trt =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"a"</span>, <span class="st">"b"</span>, <span class="st">"c"</span>), <span class="dt">outcome =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">2.3</span>, <span class="fl">1.9</span>, <span class="fl">3.2</span>))</a>
<a class="sourceLine" id="cb1-2" title="2"></a>
<a class="sourceLine" id="cb1-3" title="3"><span class="co">#For official LEGO colors, use with scale_fill_brick and theme_brick.</span></a>
<a class="sourceLine" id="cb1-4" title="4"><span class="kw">ggplot</span>(df, <span class="kw">aes</span>(trt, outcome)) <span class="op">+</span></a>
@@ -157,7 +159,7 @@
</ul>
</li>
</ul>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1">df &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/data.frame">data.frame</a></span>(<span class="dt">x =</span> LETTERS[<span class="dv">1</span><span class="op">:</span><span class="dv">10</span>], <span class="dt">y =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/sample">sample</a></span>(<span class="dv">2</span><span class="op">:</span><span class="dv">10</span>, <span class="dv">10</span>, <span class="dt">replace =</span> <span class="ot">TRUE</span>))</a>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1">df &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(<span class="dt">x =</span> LETTERS[<span class="dv">1</span><span class="op">:</span><span class="dv">10</span>], <span class="dt">y =</span> <span class="kw"><a href="https://rdrr.io/r/base/sample.html">sample</a></span>(<span class="dv">2</span><span class="op">:</span><span class="dv">10</span>, <span class="dv">10</span>, <span class="dt">replace =</span> <span class="ot">TRUE</span>))</a>
<a class="sourceLine" id="cb2-2" title="2"></a>
<a class="sourceLine" id="cb2-3" title="3"><span class="co">#For official LEGO colors, use with scale_fill_brick and theme_brick.</span></a>
<a class="sourceLine" id="cb2-4" title="4"><span class="kw">ggplot</span>(df, <span class="kw">aes</span>(x, y)) <span class="op">+</span></a>
@@ -173,7 +175,7 @@
<a href="#coords" class="anchor"></a>Coords</h2>
<p>Using <code><a href="../reference/coord-brick.html">coord_brick()</a></code> ensures that bricks are rendered with correct proportions. Unlike other <code>coord_*</code> functions in ggplot, no other inputs are necessary.</p>
<p>For horizontal bars, use <code><a href="../reference/coord-brick.html">coord_brick_flip()</a></code>.</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1">df &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/data.frame">data.frame</a></span>(<span class="dt">x =</span> LETTERS[<span class="dv">1</span><span class="op">:</span><span class="dv">8</span>], <span class="dt">y =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/sample">sample</a></span>(<span class="dv">2</span><span class="op">:</span><span class="dv">10</span>, <span class="dv">8</span>, <span class="dt">replace =</span> <span class="ot">TRUE</span>))</a>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1">df &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(<span class="dt">x =</span> LETTERS[<span class="dv">1</span><span class="op">:</span><span class="dv">8</span>], <span class="dt">y =</span> <span class="kw"><a href="https://rdrr.io/r/base/sample.html">sample</a></span>(<span class="dv">2</span><span class="op">:</span><span class="dv">10</span>, <span class="dv">8</span>, <span class="dt">replace =</span> <span class="ot">TRUE</span>))</a>
<a class="sourceLine" id="cb3-2" title="2"></a>
<a class="sourceLine" id="cb3-3" title="3"><span class="kw">ggplot</span>(df, <span class="kw">aes</span>(x, y)) <span class="op">+</span></a>
<a class="sourceLine" id="cb3-4" title="4"><span class="st"> </span><span class="kw"><a href="../reference/geom_brick_col.html">geom_brick_col</a></span>(<span class="kw">aes</span>(<span class="dt">fill =</span> x), <span class="dt">two_knob =</span> <span class="ot">FALSE</span>) <span class="op">+</span></a>
@@ -186,12 +188,12 @@
<div id="scale-and-themes" class="section level2">
<h2 class="hasAnchor">
<a href="#scale-and-themes" class="anchor"></a>Scale and themes</h2>
<p>There are 41 LEGO brick colors available in brickr. See <code><a href="../reference/build_colors.html">build_colors()</a></code> or <code><a href="https://www.rdocumentation.org/packages/utils/topics/View">View(lego_colors)</a></code> for the complete list. The easiest way to use theme colors with plots are the <code><a href="../reference/scale_fill_brick.html">scale_fill_brick()</a></code> and the <code><a href="../reference/theme_brick.html">theme_brick()</a></code> functions.</p>
<p>There are 41 LEGO brick colors available in brickr. See <code><a href="../reference/build_colors.html">build_colors()</a></code> or <code><a href="https://rdrr.io/r/utils/View.html">View(lego_colors)</a></code> for the complete list. The easiest way to use theme colors with plots are the <code><a href="../reference/scale_fill_brick.html">scale_fill_brick()</a></code> and the <code><a href="../reference/theme_brick.html">theme_brick()</a></code> functions.</p>
<p>These functions default to using the classic LEGO color theme, but can take any of the 21 themes included in brickr.</p>
<div id="scales" class="section level3">
<h3 class="hasAnchor">
<a href="#scales" class="anchor"></a>Scales</h3>
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1">df &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/data.frame">data.frame</a></span>(<span class="dt">x =</span> LETTERS[<span class="dv">1</span><span class="op">:</span><span class="dv">8</span>], <span class="dt">y =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/sample">sample</a></span>(<span class="dv">2</span><span class="op">:</span><span class="dv">10</span>, <span class="dv">8</span>, <span class="dt">replace =</span> <span class="ot">TRUE</span>))</a>
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1">df &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(<span class="dt">x =</span> LETTERS[<span class="dv">1</span><span class="op">:</span><span class="dv">8</span>], <span class="dt">y =</span> <span class="kw"><a href="https://rdrr.io/r/base/sample.html">sample</a></span>(<span class="dv">2</span><span class="op">:</span><span class="dv">10</span>, <span class="dv">8</span>, <span class="dt">replace =</span> <span class="ot">TRUE</span>))</a>
<a class="sourceLine" id="cb4-2" title="2"></a>
<a class="sourceLine" id="cb4-3" title="3">use_theme &lt;-<span class="st"> "hp"</span></a>
<a class="sourceLine" id="cb4-4" title="4"></a>
@@ -214,6 +216,7 @@
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<div id="tocnav">
<h2 class="hasAnchor">
<a href="#tocnav" class="anchor"></a>Contents</h2>
@@ -229,17 +232,20 @@
</div>
<footer><div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 100 KiB

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,13 +43,14 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Articles" />
<meta property="og:title" content="Articles" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -56,6 +61,7 @@
<![endif]-->
</head>
<body>
@@ -72,7 +78,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -80,7 +86,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -115,11 +121,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -130,6 +135,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -167,19 +173,23 @@
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -13,8 +13,9 @@
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- sticky kit --><script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="3D Models from mosaics &amp; rayshader">
<meta property="og:description" content="">
@@ -38,7 +39,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -46,7 +47,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -84,7 +85,7 @@
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -97,6 +98,7 @@
<!--/.navbar -->
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header toc-ignore">
@@ -113,7 +115,7 @@
<div id="getting-started" class="section level2">
<h2 class="hasAnchor">
<a href="#getting-started" class="anchor"></a>Getting started</h2>
<p>The <code>bricks_from_*</code> series of functions creates 3D models of LEGO bricks from a variety of input formats. These models are rendered using <a href="https://twitter.com/tylermorganwall">Tyler Morgan-Wall</a>s <a href="https://www.rayshader.com/">rayshader</a> package. This package must be installed.</p>
<p>The <code>bricks_from_*</code> series of functions creates 3D models of LEGO bricks from a variety of input formats.</p>
</div>
<div id="d-mosaics" class="section level2">
<h2 class="hasAnchor">
@@ -125,21 +127,24 @@
<li>
<code>highest_el</code> specifies if light or dark color bricks should be the tallest in the model. The default is light.</li>
</ul>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1">demo_img =<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/tempfile">tempfile</a></span>() </a>
<a class="sourceLine" id="cb1-2" title="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/download.file">download.file</a></span>(<span class="st">"http://ryantimpe.com/files/mf_unicorn.PNG"</span>, demo_img, <span class="dt">mode=</span><span class="st">"wb"</span>)</a>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1">demo_img =<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/tempfile.html">tempfile</a></span>() </a>
<a class="sourceLine" id="cb1-2" title="2"><span class="kw"><a href="https://rdrr.io/r/utils/download.file.html">download.file</a></span>(<span class="st">"http://ryantimpe.com/files/mf_unicorn.PNG"</span>, demo_img, <span class="dt">mode=</span><span class="st">"wb"</span>)</a>
<a class="sourceLine" id="cb1-3" title="3"></a>
<a class="sourceLine" id="cb1-4" title="4">mosaic &lt;-<span class="st"> </span>png<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/png/topics/readPNG">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb1-4" title="4">mosaic &lt;-<span class="st"> </span>png<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/png/man/readPNG.html">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb1-5" title="5"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>()</a>
<a class="sourceLine" id="cb1-6" title="6"></a>
<a class="sourceLine" id="cb1-7" title="7">mosaic <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>()</a></code></pre></div>
<p><img src="models-from-other_files/figure-html/bricks_6-1.png" width="384"></p>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1"></a>
<a class="sourceLine" id="cb2-2" title="2">mosaic <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb2-3" title="3"><span class="st"> </span><span class="kw"><a href="../reference/bricks_from_mosaic.html">bricks_from_mosaic</a></span>(<span class="dt">highest_el =</span> <span class="st">"dark"</span>) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb2-4" title="4"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>(<span class="dt">phi =</span> <span class="dv">60</span>, <span class="dt">theta =</span> <span class="dv">15</span>)</a>
<a class="sourceLine" id="cb2-5" title="5"></a>
<a class="sourceLine" id="cb2-6" title="6">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>(<span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<p><img src="models-from-other_files/figure-html/bricks_6-2.png" width="384"></p>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1">mosaic <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb2-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/bricks_from_mosaic.html">bricks_from_mosaic</a></span>(<span class="dt">highest_el =</span> <span class="st">"dark"</span>) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb2-3" title="3"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>()</a>
<a class="sourceLine" id="cb2-4" title="4"></a>
<a class="sourceLine" id="cb2-5" title="5"><span class="co">#From dput(round(rgl::par3d("userMatrix"),1)) after manual rotation</span></a>
<a class="sourceLine" id="cb2-6" title="6">custom_rotation &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/structure.html">structure</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">0.9</span>, <span class="fl">0.3</span>, <span class="fl">-0.3</span>, <span class="dv">0</span>, <span class="fl">-0.3</span>, <span class="fl">0.9</span>, <span class="fl">-0.3</span>, </a>
<a class="sourceLine" id="cb2-7" title="7"> <span class="dv">0</span>, <span class="fl">0.2</span>, <span class="fl">0.4</span>, <span class="fl">0.9</span>, <span class="dv">0</span>, <span class="dv">0</span>, <span class="dv">0</span>, <span class="dv">0</span>, <span class="dv">1</span>), <span class="dt">.Dim =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(4L, 4L))</a>
<a class="sourceLine" id="cb2-8" title="8"></a>
<a class="sourceLine" id="cb2-9" title="9">rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="dt">userMatrix =</span> rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/matrices.html">rotate3d</a></span>(custom_rotation, <span class="dv">0</span>, <span class="dv">0</span>, pi<span class="op">/</span><span class="dv">4</span> ,<span class="dv">1</span>))</a></code></pre></div>
<p><img src="models-from-other_files/figure-html/bricks_6a-1.png" width="384"></p>
</div>
<div id="models-from-rayshader" class="section level2">
<h2 class="hasAnchor">
@@ -156,19 +161,19 @@
<li>
<code>img_size</code> is the number of bricks on each side of the model. The default is 48.</li>
</ul>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(rayshader)</a>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span>(rayshader)</a>
<a class="sourceLine" id="cb3-2" title="2"></a>
<a class="sourceLine" id="cb3-3" title="3"><span class="co">#Example from rayshader.com</span></a>
<a class="sourceLine" id="cb3-4" title="4"></a>
<a class="sourceLine" id="cb3-5" title="5"><span class="co">#Here, I load a map with the raster package.</span></a>
<a class="sourceLine" id="cb3-6" title="6">loadzip =<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/tempfile">tempfile</a></span>() </a>
<a class="sourceLine" id="cb3-7" title="7"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/download.file">download.file</a></span>(<span class="st">"https://tylermw.com/data/dem_01.tif.zip"</span>, loadzip)</a>
<a class="sourceLine" id="cb3-8" title="8">localtif =<span class="st"> </span>raster<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/raster/topics/raster">raster</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/unzip">unzip</a></span>(loadzip, <span class="st">"dem_01.tif"</span>))</a>
<a class="sourceLine" id="cb3-9" title="9"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/unlink">unlink</a></span>(loadzip)</a>
<a class="sourceLine" id="cb3-6" title="6">loadzip =<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/tempfile.html">tempfile</a></span>() </a>
<a class="sourceLine" id="cb3-7" title="7"><span class="kw"><a href="https://rdrr.io/r/utils/download.file.html">download.file</a></span>(<span class="st">"https://tylermw.com/data/dem_01.tif.zip"</span>, loadzip)</a>
<a class="sourceLine" id="cb3-8" title="8">localtif =<span class="st"> </span>raster<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/raster/man/raster.html">raster</a></span>(<span class="kw"><a href="https://rdrr.io/r/utils/unzip.html">unzip</a></span>(loadzip, <span class="st">"dem_01.tif"</span>))</a>
<a class="sourceLine" id="cb3-9" title="9"><span class="kw"><a href="https://rdrr.io/r/base/unlink.html">unlink</a></span>(loadzip)</a>
<a class="sourceLine" id="cb3-10" title="10"></a>
<a class="sourceLine" id="cb3-11" title="11"><span class="co">#And convert it to a matrix:</span></a>
<a class="sourceLine" id="cb3-12" title="12">elmat =<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/matrix">matrix</a></span>(raster<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/raster/topics/extract">extract</a></span>(localtif, raster<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/raster/topics/extent">extent</a></span>(localtif), <span class="dt">buffer =</span> <span class="dv">1000</span>),</a>
<a class="sourceLine" id="cb3-13" title="13"> <span class="dt">nrow =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/nrow">ncol</a></span>(localtif), <span class="dt">ncol =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/nrow">nrow</a></span>(localtif))</a>
<a class="sourceLine" id="cb3-12" title="12">elmat =<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/matrix.html">matrix</a></span>(raster<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/raster/man/extract.html">extract</a></span>(localtif, raster<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/raster/man/extent.html">extent</a></span>(localtif), <span class="dt">buffer =</span> <span class="dv">1000</span>),</a>
<a class="sourceLine" id="cb3-13" title="13"> <span class="dt">nrow =</span> <span class="kw"><a href="https://rdrr.io/r/base/nrow.html">ncol</a></span>(localtif), <span class="dt">ncol =</span> <span class="kw"><a href="https://rdrr.io/r/base/nrow.html">nrow</a></span>(localtif))</a>
<a class="sourceLine" id="cb3-14" title="14"></a>
<a class="sourceLine" id="cb3-15" title="15">rayshader_object &lt;-<span class="st"> </span>elmat <span class="op">%&gt;%</span></a>
<a class="sourceLine" id="cb3-16" title="16"><span class="st"> </span><span class="kw">sphere_shade</span>(<span class="dt">texture =</span> <span class="st">"desert"</span>) <span class="op">%&gt;%</span></a>
@@ -177,22 +182,23 @@
<a class="sourceLine" id="cb3-19" title="19"></a>
<a class="sourceLine" id="cb3-20" title="20"><span class="co">#Plot with rayshader</span></a>
<a class="sourceLine" id="cb3-21" title="21">rayshader_object <span class="op">%&gt;%</span></a>
<a class="sourceLine" id="cb3-22" title="22"><span class="st"> </span><span class="kw">plot_3d</span>(elmat, <span class="dt">zscale =</span> <span class="dv">10</span>, <span class="dt">fov =</span> <span class="dv">0</span>, <span class="dt">theta =</span> <span class="dv">135</span>, <span class="dt">zoom =</span> <span class="fl">0.75</span>, <span class="dt">phi =</span> <span class="dv">45</span>, <span class="dt">windowsize =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">1000</span>, <span class="dv">800</span>))</a>
<a class="sourceLine" id="cb3-22" title="22"><span class="st"> </span><span class="kw">plot_3d</span>(elmat, <span class="dt">zscale =</span> <span class="dv">10</span>, <span class="dt">fov =</span> <span class="dv">0</span>, <span class="dt">theta =</span> <span class="dv">135</span>, <span class="dt">zoom =</span> <span class="fl">0.75</span>, <span class="dt">phi =</span> <span class="dv">45</span>, <span class="dt">windowsize =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="dv">1000</span>, <span class="dv">800</span>))</a>
<a class="sourceLine" id="cb3-23" title="23"></a>
<a class="sourceLine" id="cb3-24" title="24">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>(<span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<a class="sourceLine" id="cb3-24" title="24">rayshader<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rayshader/man/render_snapshot.html">render_snapshot</a></span>(<span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<p><img src="models-from-other_files/figure-html/bricks_rayshader-1.png" width="384"></p>
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1"></a>
<a class="sourceLine" id="cb4-2" title="2"><span class="co">#Plot as bricks</span></a>
<a class="sourceLine" id="cb4-3" title="3">rayshader_object <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb4-4" title="4"><span class="st"> </span><span class="kw"><a href="../reference/bricks_from_rayshader.html">bricks_from_rayshader</a></span>(elmat) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb4-5" title="5"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>(<span class="dt">theta =</span> <span class="dv">135</span>, <span class="dt">phi =</span> <span class="dv">45</span>)</a>
<a class="sourceLine" id="cb4-5" title="5"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks_rayshader.html">build_bricks_rayshader</a></span>(<span class="dt">theta =</span> <span class="dv">135</span>, <span class="dt">phi =</span> <span class="dv">45</span>)</a>
<a class="sourceLine" id="cb4-6" title="6"></a>
<a class="sourceLine" id="cb4-7" title="7">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>(<span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<p><img src="models-from-other_files/figure-html/bricks_rayshader-2.png" width="384"></p>
<a class="sourceLine" id="cb4-7" title="7">rayshader<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rayshader/man/render_snapshot.html">render_snapshot</a></span>(<span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<p><img src="models-from-other_files/figure-html/bricks_rayshader-2.png" width="384"><img src="models-from-other_files/figure-html/bricks_rayshader-1.png" width="384"> This example is rendered using <code><a href="../reference/build_bricks_rayshader.html">build_bricks_rayshader()</a></code>, which a bit faster for very large sets.</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<div id="tocnav">
<h2 class="hasAnchor">
<a href="#tocnav" class="anchor"></a>Contents</h2>
@@ -207,17 +213,20 @@
</div>
<footer><div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 KiB

After

Width:  |  Height:  |  Size: 288 KiB

View File

@@ -13,8 +13,9 @@
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- sticky kit --><script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="3D Models programmatically">
<meta property="og:description" content="">
@@ -38,7 +39,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -46,7 +47,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -84,7 +85,7 @@
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -97,6 +98,7 @@
<!--/.navbar -->
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header toc-ignore">
@@ -113,39 +115,39 @@
<div id="getting-started" class="section level2">
<h2 class="hasAnchor">
<a href="#getting-started" class="anchor"></a>Getting started</h2>
<p>The <code>bricks_from_*</code> series of functions creates 3D models of LEGO bricks from a variety of input formats. These models are rendered using <a href="https://twitter.com/tylermorganwall">Tyler Morgan-Wall</a>s <a href="https://www.rayshader.com/">rayshader</a> package. This package must be installed.</p>
<p>The <code>bricks_from_*</code> series of functions creates 3D models of LEGO bricks from a variety of input formats.</p>
<p>Use <code><a href="../reference/bricks_from_coords.html">bricks_from_coords()</a></code> to programmatically build 3D LEGO models rather than manually drawing them in a spreadsheet or table. Prove the function with a data frame with x, y, and z coordinates, along with an official LEGO color name for each point.</p>
</div>
<div id="a-simple-programmed-model" class="section level2">
<h2 class="hasAnchor">
<a href="#a-simple-programmed-model" class="anchor"></a>A simple programmed model</h2>
<p>Below, we create a 8x8x8 cube by expanding a data frame with the array 1:8 as the x-, y-, and z-coordinates. We then assign each row of that data frame one of three colors: Bright blue, Bright yellow, or Bright red.</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1">use_colors &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"Bright blue"</span>, <span class="st">"Bright yellow"</span>, <span class="st">"Bright red"</span>)</a>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1">use_colors &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"Bright blue"</span>, <span class="st">"Bright yellow"</span>, <span class="st">"Bright red"</span>)</a>
<a class="sourceLine" id="cb1-2" title="2"></a>
<a class="sourceLine" id="cb1-3" title="3">cube &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/expand.grid">expand.grid</a></span>(</a>
<a class="sourceLine" id="cb1-3" title="3">cube &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/expand.grid.html">expand.grid</a></span>(</a>
<a class="sourceLine" id="cb1-4" title="4"> <span class="dt">x =</span> <span class="dv">1</span><span class="op">:</span><span class="dv">8</span>,</a>
<a class="sourceLine" id="cb1-5" title="5"> <span class="dt">y =</span> <span class="dv">1</span><span class="op">:</span><span class="dv">8</span>,</a>
<a class="sourceLine" id="cb1-6" title="6"> <span class="dt">z =</span> <span class="dv">1</span><span class="op">:</span><span class="dv">8</span></a>
<a class="sourceLine" id="cb1-7" title="7">) </a>
<a class="sourceLine" id="cb1-8" title="8"></a>
<a class="sourceLine" id="cb1-9" title="9">cube<span class="op">$</span>Color &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/sample">sample</a></span>(use_colors, <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/nrow">nrow</a></span>(cube), <span class="dt">replace =</span> <span class="ot">TRUE</span>, <span class="dt">prob =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">5</span>, <span class="dv">3</span>, <span class="dv">1</span>))</a>
<a class="sourceLine" id="cb1-9" title="9">cube<span class="op">$</span>Color &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/sample.html">sample</a></span>(use_colors, <span class="kw"><a href="https://rdrr.io/r/base/nrow.html">nrow</a></span>(cube), <span class="dt">replace =</span> <span class="ot">TRUE</span>, <span class="dt">prob =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="dv">5</span>, <span class="dv">3</span>, <span class="dv">1</span>))</a>
<a class="sourceLine" id="cb1-10" title="10"></a>
<a class="sourceLine" id="cb1-11" title="11">cube <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb1-12" title="12"><span class="st"> </span><span class="kw"><a href="../reference/bricks_from_coords.html">bricks_from_coords</a></span>() <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb1-13" title="13"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>(<span class="dt">brick_res =</span> <span class="st">"uhd"</span>, <span class="dt">phi =</span> <span class="dv">30</span>, <span class="dt">theta =</span> <span class="dv">30</span>)</a>
<a class="sourceLine" id="cb1-13" title="13"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>()</a>
<a class="sourceLine" id="cb1-14" title="14"></a>
<a class="sourceLine" id="cb1-15" title="15">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>(<span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<a class="sourceLine" id="cb1-15" title="15">rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="dt">userMatrix =</span> rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/matrices.html">rotate3d</a></span>(rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="st">"userMatrix"</span>), <span class="fl">1.1</span><span class="op">*</span>pi<span class="op">/</span><span class="dv">4</span>, <span class="dv">0</span>, <span class="dv">0</span> ,<span class="dv">1</span>))</a></code></pre></div>
<p><img src="models-from-program_files/figure-html/bricks_6-1.png" width="384"></p>
<p>Using the same logic, we can build a sphere with a specified radius, and then apply rules to color each brick based on its coordinates.</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1">radius &lt;-<span class="st"> </span><span class="dv">4</span></a>
<a class="sourceLine" id="cb2-2" title="2">sphere_coords &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/expand.grid">expand.grid</a></span>(</a>
<a class="sourceLine" id="cb2-3" title="3"> <span class="dt">x =</span> <span class="dv">1</span><span class="op">:</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/Round">round</a></span>((radius<span class="op">*</span><span class="fl">2.5</span>)),</a>
<a class="sourceLine" id="cb2-4" title="4"> <span class="dt">y =</span> <span class="dv">1</span><span class="op">:</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/Round">round</a></span>((radius<span class="op">*</span><span class="fl">2.5</span>)),</a>
<a class="sourceLine" id="cb2-5" title="5"> <span class="dt">z =</span> <span class="dv">1</span><span class="op">:</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/Round">round</a></span>((radius<span class="op">/</span>(<span class="dv">6</span><span class="op">/</span><span class="dv">5</span>)<span class="op">*</span><span class="fl">2.5</span>)) <span class="co">#A brick is 6/5 taller than it is wide/deep</span></a>
<a class="sourceLine" id="cb2-2" title="2">sphere_coords &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/expand.grid.html">expand.grid</a></span>(</a>
<a class="sourceLine" id="cb2-3" title="3"> <span class="dt">x =</span> <span class="dv">1</span><span class="op">:</span><span class="kw"><a href="https://rdrr.io/r/base/Round.html">round</a></span>((radius<span class="op">*</span><span class="fl">2.5</span>)),</a>
<a class="sourceLine" id="cb2-4" title="4"> <span class="dt">y =</span> <span class="dv">1</span><span class="op">:</span><span class="kw"><a href="https://rdrr.io/r/base/Round.html">round</a></span>((radius<span class="op">*</span><span class="fl">2.5</span>)),</a>
<a class="sourceLine" id="cb2-5" title="5"> <span class="dt">z =</span> <span class="dv">1</span><span class="op">:</span><span class="kw"><a href="https://rdrr.io/r/base/Round.html">round</a></span>((radius<span class="op">/</span>(<span class="dv">6</span><span class="op">/</span><span class="dv">5</span>)<span class="op">*</span><span class="fl">2.5</span>)) <span class="co">#A brick is 6/5 taller than it is wide/deep</span></a>
<a class="sourceLine" id="cb2-6" title="6">) <span class="op">%&gt;%</span></a>
<a class="sourceLine" id="cb2-7" title="7"><span class="st"> </span>dplyr<span class="op">::</span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(</a>
<a class="sourceLine" id="cb2-8" title="8"> <span class="co">#Distance of each coordinate from center</span></a>
<a class="sourceLine" id="cb2-9" title="9"> <span class="dt">dist =</span> (((x<span class="op">-</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/mean">mean</a></span>(x))<span class="op">^</span><span class="dv">2</span> <span class="op">+</span><span class="st"> </span>(y<span class="op">-</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/mean">mean</a></span>(y))<span class="op">^</span><span class="dv">2</span> <span class="op">+</span><span class="st"> </span>(z<span class="op">-</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/mean">mean</a></span>(z))<span class="op">^</span><span class="dv">2</span>)<span class="op">^</span>(<span class="dv">1</span><span class="op">/</span><span class="dv">2</span>)),</a>
<a class="sourceLine" id="cb2-9" title="9"> <span class="dt">dist =</span> (((x<span class="op">-</span><span class="kw"><a href="https://rdrr.io/r/base/mean.html">mean</a></span>(x))<span class="op">^</span><span class="dv">2</span> <span class="op">+</span><span class="st"> </span>(y<span class="op">-</span><span class="kw"><a href="https://rdrr.io/r/base/mean.html">mean</a></span>(y))<span class="op">^</span><span class="dv">2</span> <span class="op">+</span><span class="st"> </span>(z<span class="op">-</span><span class="kw"><a href="https://rdrr.io/r/base/mean.html">mean</a></span>(z))<span class="op">^</span><span class="dv">2</span>)<span class="op">^</span>(<span class="dv">1</span><span class="op">/</span><span class="dv">2</span>)),</a>
<a class="sourceLine" id="cb2-10" title="10"> <span class="dt">Color =</span> dplyr<span class="op">::</span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/case_when.html">case_when</a></span>(</a>
<a class="sourceLine" id="cb2-11" title="11"> <span class="co">#Yellow stripes on the surface with a 2to4 thickness</span></a>
<a class="sourceLine" id="cb2-12" title="12"> dplyr<span class="op">::</span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/between.html">between</a></span>(dist, (radius<span class="dv">-1</span>), radius) <span class="op">&amp;</span><span class="st"> </span>(x<span class="op">+</span>y<span class="op">+</span>z) <span class="op">%%</span><span class="st"> </span><span class="dv">6</span> <span class="op">%in%</span><span class="st"> </span><span class="dv">0</span><span class="op">:</span><span class="dv">1</span> <span class="op">~</span><span class="st"> "Bright yellow"</span>,</a>
@@ -155,55 +157,57 @@
<a class="sourceLine" id="cb2-16" title="16"></a>
<a class="sourceLine" id="cb2-17" title="17">sphere_coords <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb2-18" title="18"><span class="st"> </span><span class="kw"><a href="../reference/bricks_from_coords.html">bricks_from_coords</a></span>() <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb2-19" title="19"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>(<span class="dt">brick_res =</span> <span class="st">"uhd"</span>, <span class="dt">phi =</span> <span class="dv">30</span>, <span class="dt">theta =</span> <span class="dv">30</span>)</a>
<a class="sourceLine" id="cb2-19" title="19"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>(<span class="dt">rgl_lit =</span> <span class="ot">FALSE</span>, <span class="dt">outline_bricks =</span> <span class="ot">TRUE</span>)</a>
<a class="sourceLine" id="cb2-20" title="20"></a>
<a class="sourceLine" id="cb2-21" title="21">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>(<span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<a class="sourceLine" id="cb2-21" title="21">rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="dt">userMatrix =</span> rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/matrices.html">rotate3d</a></span>(rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="st">"userMatrix"</span>), <span class="fl">1.1</span><span class="op">*</span>pi<span class="op">/</span><span class="dv">4</span>, <span class="dv">0</span>, <span class="dv">0</span> ,<span class="dv">1</span>))</a></code></pre></div>
<p><img src="models-from-program_files/figure-html/bricks_7-1.png" width="384"></p>
<p>The option <code>outline_bricks = TRUE</code> adds a black outline around the edges of the bricks. Setting <code>rgl_lit = FALSE</code> turns off automated lighting effects from rgl. Changing these two inputs together renders bricks in a more cartoon fashion.</p>
</div>
<div id="it-takes-a-village" class="section level2">
<h2 class="hasAnchor">
<a href="#it-takes-a-village" class="anchor"></a>It takes a village</h2>
<p>Rather than directly writing a data frame for a model, you can write a function that returns a data frame with x, y, z, and Color coordinates given initial starting parameters.</p>
<p>Below, the function <code>brick_house()</code> creates a LEGO house with randomized colors. The x- and y-coordinates and the size of the house are inputs to the functions.</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1">brick_house &lt;-<span class="st"> </span><span class="cf">function</span>(<span class="dt">x_coord =</span> <span class="dv">0</span>, <span class="dt">y_coord =</span> <span class="dv">0</span>, <span class="dt">width=</span><span class="dv">6</span>, <span class="dt">length=</span><span class="dv">5</span>, <span class="dt">height=</span><span class="dv">6</span>){</a>
<a class="sourceLine" id="cb3-2" title="2"> roof_colors &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"Dark orange"</span>, <span class="st">"Dark brown"</span>, <span class="st">"Medium nougat"</span>, <span class="st">"Medium stone grey"</span>)</a>
<a class="sourceLine" id="cb3-3" title="3"> roof_col &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/sample">sample</a></span>(roof_colors, <span class="dv">1</span>)</a>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1">brick_house &lt;-<span class="st"> </span><span class="cf">function</span>(<span class="dt">x_coord =</span> <span class="dv">0</span>, <span class="dt">y_coord =</span> <span class="dv">0</span>, <span class="dt">width=</span><span class="dv">6</span>, <span class="dt">length=</span><span class="dv">5</span>, <span class="dt">height=</span><span class="dv">7</span>){</a>
<a class="sourceLine" id="cb3-2" title="2"> roof_colors &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"Dark orange"</span>, <span class="st">"Dark brown"</span>, <span class="st">"Medium nougat"</span>, <span class="st">"Medium stone grey"</span>)</a>
<a class="sourceLine" id="cb3-3" title="3"> roof_col &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/sample.html">sample</a></span>(roof_colors, <span class="dv">1</span>)</a>
<a class="sourceLine" id="cb3-4" title="4"> </a>
<a class="sourceLine" id="cb3-5" title="5"> house_colors &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"Bright blue"</span>, <span class="st">"Bright red"</span>, <span class="st">"Dark red"</span>, <span class="st">"Dark azur"</span>, <span class="st">"Nougat"</span>, <span class="st">"Bright reddish violet"</span>)</a>
<a class="sourceLine" id="cb3-6" title="6"> house_col &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/sample">sample</a></span>(house_colors, <span class="dv">1</span>)</a>
<a class="sourceLine" id="cb3-5" title="5"> house_colors &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"Bright blue"</span>, <span class="st">"Bright red"</span>, <span class="st">"Dark red"</span>, <span class="st">"Dark azur"</span>, <span class="st">"Nougat"</span>, <span class="st">"Bright reddish violet"</span>)</a>
<a class="sourceLine" id="cb3-6" title="6"> house_col &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/sample.html">sample</a></span>(house_colors, <span class="dv">1</span>)</a>
<a class="sourceLine" id="cb3-7" title="7"> </a>
<a class="sourceLine" id="cb3-8" title="8"> house_coords &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/expand.grid">expand.grid</a></span>(</a>
<a class="sourceLine" id="cb3-8" title="8"> house_coords &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/expand.grid.html">expand.grid</a></span>(</a>
<a class="sourceLine" id="cb3-9" title="9"> <span class="dt">x =</span> <span class="dv">1</span><span class="op">:</span>width, <span class="dt">y =</span> <span class="dv">1</span><span class="op">:</span>length, <span class="dt">z =</span> (<span class="dv">1</span><span class="op">:</span>height)<span class="op">+</span><span class="dv">1</span></a>
<a class="sourceLine" id="cb3-10" title="10"> ) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb3-11" title="11"><span class="st"> </span>dplyr<span class="op">::</span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(</a>
<a class="sourceLine" id="cb3-12" title="12"> <span class="dt">roof =</span> (z <span class="op">&gt;</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/Round">round</a></span>((<span class="dv">1</span><span class="op">/</span><span class="dv">2</span>)<span class="op">*</span>height)),</a>
<a class="sourceLine" id="cb3-12" title="12"> <span class="dt">roof =</span> (z <span class="op">&gt;</span><span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/Round.html">round</a></span>((<span class="dv">1</span><span class="op">/</span><span class="dv">2</span>)<span class="op">*</span>height)),</a>
<a class="sourceLine" id="cb3-13" title="13"> <span class="dt">Color =</span> dplyr<span class="op">::</span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/case_when.html">case_when</a></span>(</a>
<a class="sourceLine" id="cb3-14" title="14"> <span class="co">#Roof</span></a>
<a class="sourceLine" id="cb3-15" title="15"> roof <span class="op">&amp;</span><span class="st"> </span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/MathFun">abs</a></span>(y <span class="op">-</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/Round">floor</a></span>(length<span class="op">/</span><span class="dv">2</span>) <span class="dv">-1</span>) <span class="op">&lt;=</span><span class="st"> </span>(height<span class="op">-</span>z)) <span class="op">~</span><span class="st"> </span>roof_col,</a>
<a class="sourceLine" id="cb3-15" title="15"> roof <span class="op">&amp;</span><span class="st"> </span>(<span class="kw"><a href="https://rdrr.io/r/base/MathFun.html">abs</a></span>(y <span class="op">-</span><span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/Round.html">floor</a></span>(length<span class="op">/</span><span class="dv">2</span>) <span class="dv">-1</span>) <span class="op">&lt;=</span><span class="st"> </span>(height<span class="op">-</span>z)) <span class="op">~</span><span class="st"> </span>roof_col,</a>
<a class="sourceLine" id="cb3-16" title="16"> roof <span class="op">~</span><span class="st"> </span><span class="ot">NA_character_</span>,</a>
<a class="sourceLine" id="cb3-17" title="17"> <span class="co">#Door and windows</span></a>
<a class="sourceLine" id="cb3-18" title="18"> x <span class="op">==</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/Round">round</a></span>(width<span class="op">/</span><span class="dv">2</span>) <span class="op">&amp;</span><span class="st"> </span>z <span class="op">==</span><span class="st"> </span><span class="dv">1</span> <span class="op">~</span><span class="st"> </span><span class="ot">NA_character_</span>,</a>
<a class="sourceLine" id="cb3-19" title="19"> dplyr<span class="op">::</span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/between.html">between</a></span>(x, <span class="dv">2</span>, width<span class="dv">-1</span>) <span class="op">&amp;</span><span class="st"> </span>x <span class="op">%%</span><span class="st"> </span><span class="dv">2</span> <span class="op">==</span><span class="st"> </span><span class="dv">0</span> <span class="op">&amp;</span><span class="st"> </span>y <span class="op">&gt;</span><span class="st"> </span><span class="dv">1</span> <span class="op">&amp;</span><span class="st"> </span>z <span class="op">==</span><span class="st"> </span><span class="dv">2</span> <span class="op">~</span><span class="st"> </span><span class="ot">NA_character_</span>,</a>
<a class="sourceLine" id="cb3-20" title="20"> dplyr<span class="op">::</span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/between.html">between</a></span>(y, <span class="dv">2</span>, length<span class="dv">-1</span>) <span class="op">&amp;</span><span class="st"> </span>y <span class="op">%%</span><span class="st"> </span><span class="dv">2</span> <span class="op">==</span><span class="st"> </span><span class="dv">0</span> <span class="op">&amp;</span><span class="st"> </span>z <span class="op">==</span><span class="st"> </span><span class="dv">2</span> <span class="op">~</span><span class="st"> </span><span class="ot">NA_character_</span>,</a>
<a class="sourceLine" id="cb3-21" title="21"> x <span class="op">%in%</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">1</span>, width) <span class="op">|</span><span class="st"> </span>y <span class="op">%in%</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">1</span>, length) <span class="op">~</span><span class="st"> </span>house_col),</a>
<a class="sourceLine" id="cb3-18" title="18"> x <span class="op">==</span><span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/Round.html">round</a></span>(width<span class="op">/</span><span class="dv">2</span>) <span class="op">&amp;</span><span class="st"> </span>y<span class="op">==</span><span class="dv">1</span> <span class="op">&amp;</span><span class="st"> </span>z <span class="op">&lt;=</span><span class="st"> </span><span class="dv">3</span> <span class="op">~</span><span class="st"> </span><span class="ot">NA_character_</span>,</a>
<a class="sourceLine" id="cb3-19" title="19"> dplyr<span class="op">::</span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/between.html">between</a></span>(x, <span class="dv">2</span>, width<span class="dv">-1</span>) <span class="op">&amp;</span><span class="st"> </span>x <span class="op">%%</span><span class="st"> </span><span class="dv">2</span> <span class="op">==</span><span class="st"> </span><span class="dv">0</span> <span class="op">&amp;</span><span class="st"> </span>y <span class="op">&gt;</span><span class="st"> </span><span class="dv">1</span> <span class="op">&amp;</span><span class="st"> </span>z <span class="op">==</span><span class="st"> </span><span class="dv">3</span> <span class="op">~</span><span class="st"> </span><span class="ot">NA_character_</span>,</a>
<a class="sourceLine" id="cb3-20" title="20"> dplyr<span class="op">::</span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/between.html">between</a></span>(y, <span class="dv">2</span>, length<span class="dv">-1</span>) <span class="op">&amp;</span><span class="st"> </span>y <span class="op">%%</span><span class="st"> </span><span class="dv">2</span> <span class="op">==</span><span class="st"> </span><span class="dv">0</span> <span class="op">&amp;</span><span class="st"> </span>z <span class="op">==</span><span class="st"> </span><span class="dv">3</span> <span class="op">~</span><span class="st"> </span><span class="ot">NA_character_</span>,</a>
<a class="sourceLine" id="cb3-21" title="21"> x <span class="op">%in%</span><span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="dv">1</span>, width) <span class="op">|</span><span class="st"> </span>y <span class="op">%in%</span><span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="dv">1</span>, length) <span class="op">~</span><span class="st"> </span>house_col),</a>
<a class="sourceLine" id="cb3-22" title="22"> <span class="dt">x =</span> x<span class="op">+</span>x_coord, </a>
<a class="sourceLine" id="cb3-23" title="23"> <span class="dt">y =</span> y<span class="op">+</span>y_coord</a>
<a class="sourceLine" id="cb3-24" title="24"> )</a>
<a class="sourceLine" id="cb3-25" title="25"> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/function">return</a></span>(house_coords)</a>
<a class="sourceLine" id="cb3-25" title="25"> <span class="kw"><a href="https://rdrr.io/r/base/function.html">return</a></span>(house_coords)</a>
<a class="sourceLine" id="cb3-26" title="26">}</a>
<a class="sourceLine" id="cb3-27" title="27"></a>
<a class="sourceLine" id="cb3-28" title="28"><span class="co">#Build one house</span></a>
<a class="sourceLine" id="cb3-29" title="29"><span class="kw">brick_house</span>() <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb3-30" title="30"><span class="st"> </span><span class="kw"><a href="../reference/bricks_from_coords.html">bricks_from_coords</a></span>() <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb3-31" title="31"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>(<span class="dt">theta =</span> <span class="dv">225</span>)</a>
<a class="sourceLine" id="cb3-32" title="32">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>(<span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<a class="sourceLine" id="cb3-31" title="31"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>()</a>
<a class="sourceLine" id="cb3-32" title="32"></a>
<a class="sourceLine" id="cb3-33" title="33">rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="dt">userMatrix =</span> rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/matrices.html">rotate3d</a></span>(rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="st">"userMatrix"</span>), <span class="fl">1.1</span><span class="op">*</span>pi<span class="op">/</span><span class="dv">4</span>, <span class="dv">0</span>, <span class="dv">0</span> ,<span class="dv">1</span>))</a></code></pre></div>
<p><img src="models-from-program_files/figure-html/bricks_8-1.png" width="384"></p>
<p>Next, we write one more function, <code>brick_street()</code> to build a road and grass foundation. The, for an arbitrary number of houses and neighborhood size, use <code><a href="https://purrr.tidyverse.org/reference/map2.html">purrr::pmap_df</a></code> to generate many houses and place them along the road.</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1">brick_street &lt;-<span class="st"> </span><span class="cf">function</span>(<span class="dt">width =</span> <span class="dv">100</span>, <span class="dt">length =</span> <span class="dv">40</span>){</a>
<a class="sourceLine" id="cb4-2" title="2"> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/expand.grid">expand.grid</a></span>(<span class="dt">x=</span><span class="dv">1</span><span class="op">:</span>width, <span class="dt">y=</span><span class="dv">1</span><span class="op">:</span>length, <span class="dt">z=</span><span class="dv">1</span>) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb4-2" title="2"> <span class="kw"><a href="https://rdrr.io/r/base/expand.grid.html">expand.grid</a></span>(<span class="dt">x=</span><span class="dv">1</span><span class="op">:</span>width, <span class="dt">y=</span><span class="dv">1</span><span class="op">:</span>length, <span class="dt">z=</span><span class="dv">1</span>) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb4-3" title="3"><span class="st"> </span>dplyr<span class="op">::</span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span>(</a>
<a class="sourceLine" id="cb4-4" title="4"> <span class="dt">Color =</span> dplyr<span class="op">::</span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/case_when.html">case_when</a></span>(</a>
<a class="sourceLine" id="cb4-5" title="5"> y <span class="op">==</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/Round">round</a></span>(length<span class="op">/</span><span class="dv">2</span>) <span class="op">&amp;</span><span class="st"> </span>x <span class="op">%%</span><span class="st"> </span><span class="dv">4</span> <span class="op">%in%</span><span class="st"> </span><span class="dv">1</span><span class="op">:</span><span class="dv">4</span> <span class="op">~</span><span class="st"> "Bright yellow"</span>,</a>
<a class="sourceLine" id="cb4-5" title="5"> y <span class="op">==</span><span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/Round.html">round</a></span>(length<span class="op">/</span><span class="dv">2</span>) <span class="op">&amp;</span><span class="st"> </span>x <span class="op">%%</span><span class="st"> </span><span class="dv">4</span> <span class="op">%in%</span><span class="st"> </span><span class="dv">1</span><span class="op">:</span><span class="dv">4</span> <span class="op">~</span><span class="st"> "Bright yellow"</span>,</a>
<a class="sourceLine" id="cb4-6" title="6"> dplyr<span class="op">::</span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/between.html">between</a></span>(y, length<span class="op">/</span><span class="dv">2</span> <span class="dv">-5</span>, length<span class="op">/</span><span class="dv">2</span> <span class="op">+</span><span class="dv">5</span>) <span class="op">~</span><span class="st"> "Dark stone grey"</span>,</a>
<a class="sourceLine" id="cb4-7" title="7"> <span class="ot">TRUE</span> <span class="op">~</span><span class="st"> "Dark green"</span></a>
<a class="sourceLine" id="cb4-8" title="8"> ))</a>
@@ -211,27 +215,27 @@
<a class="sourceLine" id="cb4-10" title="10"></a>
<a class="sourceLine" id="cb4-11" title="11"><span class="co">#Build a village, houses on 2 sides of a street</span></a>
<a class="sourceLine" id="cb4-12" title="12">n_houses =<span class="st"> </span><span class="dv">14</span></a>
<a class="sourceLine" id="cb4-13" title="13">sz =<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">100</span>, <span class="dv">40</span>)</a>
<a class="sourceLine" id="cb4-13" title="13">sz =<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="dv">100</span>, <span class="dv">40</span>)</a>
<a class="sourceLine" id="cb4-14" title="14"></a>
<a class="sourceLine" id="cb4-15" title="15"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/list">list</a></span>(<span class="dt">x_coord =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/sample">sample</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/seq">seq</a></span>(<span class="dv">10</span>, sz[<span class="dv">1</span>]<span class="op">-</span><span class="dv">10</span>, <span class="dt">by =</span> <span class="dv">10</span>), n_houses<span class="op">/</span><span class="dv">2</span>),</a>
<a class="sourceLine" id="cb4-16" title="16"> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/sample">sample</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/seq">seq</a></span>(<span class="dv">10</span>, sz[<span class="dv">1</span>]<span class="op">-</span><span class="dv">10</span>, <span class="dt">by =</span> <span class="dv">10</span>), n_houses<span class="op">/</span><span class="dv">2</span>)),</a>
<a class="sourceLine" id="cb4-17" title="17"> <span class="dt">y_coord =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/rep">rep</a></span>(sz[<span class="dv">2</span>]<span class="op">/</span><span class="dv">2-15</span>, n_houses<span class="op">/</span><span class="dv">2</span>), <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/rep">rep</a></span>(sz[<span class="dv">2</span>]<span class="op">/</span><span class="dv">2</span><span class="op">+</span><span class="dv">10</span>, n_houses<span class="op">/</span><span class="dv">2</span>)),</a>
<a class="sourceLine" id="cb4-18" title="18"> <span class="dt">width =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/sample">sample</a></span>(<span class="dv">4</span><span class="op">:</span><span class="dv">10</span>, n_houses, <span class="dt">replace =</span> <span class="ot">TRUE</span>),</a>
<a class="sourceLine" id="cb4-19" title="19"> <span class="dt">length =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/sample">sample</a></span>(<span class="dv">4</span><span class="op">:</span><span class="dv">8</span>, n_houses, <span class="dt">replace =</span> <span class="ot">TRUE</span>),</a>
<a class="sourceLine" id="cb4-20" title="20"> <span class="dt">height =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/sample">sample</a></span>(<span class="dv">5</span><span class="op">:</span><span class="dv">8</span>, n_houses, <span class="dt">replace =</span> <span class="ot">TRUE</span>)</a>
<a class="sourceLine" id="cb4-15" title="15"><span class="kw"><a href="https://rdrr.io/r/base/list.html">list</a></span>(<span class="dt">x_coord =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/sample.html">sample</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/seq.html">seq</a></span>(<span class="dv">10</span>, sz[<span class="dv">1</span>]<span class="op">-</span><span class="dv">10</span>, <span class="dt">by =</span> <span class="dv">12</span>), n_houses<span class="op">/</span><span class="dv">2</span>),</a>
<a class="sourceLine" id="cb4-16" title="16"> <span class="kw"><a href="https://rdrr.io/r/base/sample.html">sample</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/seq.html">seq</a></span>(<span class="dv">10</span>, sz[<span class="dv">1</span>]<span class="op">-</span><span class="dv">10</span>, <span class="dt">by =</span> <span class="dv">12</span>), n_houses<span class="op">/</span><span class="dv">2</span>)),</a>
<a class="sourceLine" id="cb4-17" title="17"> <span class="dt">y_coord =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/rep.html">rep</a></span>(sz[<span class="dv">2</span>]<span class="op">/</span><span class="dv">2-15</span>, n_houses<span class="op">/</span><span class="dv">2</span>), <span class="kw"><a href="https://rdrr.io/r/base/rep.html">rep</a></span>(sz[<span class="dv">2</span>]<span class="op">/</span><span class="dv">2</span><span class="op">+</span><span class="dv">10</span>, n_houses<span class="op">/</span><span class="dv">2</span>)),</a>
<a class="sourceLine" id="cb4-18" title="18"> <span class="dt">width =</span> <span class="kw"><a href="https://rdrr.io/r/base/sample.html">sample</a></span>(<span class="dv">4</span><span class="op">:</span><span class="dv">10</span>, n_houses, <span class="dt">replace =</span> <span class="ot">TRUE</span>),</a>
<a class="sourceLine" id="cb4-19" title="19"> <span class="dt">length =</span> <span class="kw"><a href="https://rdrr.io/r/base/sample.html">sample</a></span>(<span class="dv">5</span><span class="op">:</span><span class="dv">8</span>, n_houses, <span class="dt">replace =</span> <span class="ot">TRUE</span>),</a>
<a class="sourceLine" id="cb4-20" title="20"> <span class="dt">height =</span> <span class="kw"><a href="https://rdrr.io/r/base/sample.html">sample</a></span>(<span class="dv">7</span><span class="op">:</span><span class="dv">9</span>, n_houses, <span class="dt">replace =</span> <span class="ot">TRUE</span>)</a>
<a class="sourceLine" id="cb4-21" title="21"> ) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb4-22" title="22"><span class="st"> </span>purrr<span class="op">::</span><span class="kw"><a href="https://purrr.tidyverse.org/reference/map2.html">pmap_df</a></span>(brick_house) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb4-23" title="23"><span class="st"> </span>dplyr<span class="op">::</span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/bind.html">bind_rows</a></span>(<span class="kw">brick_street</span>(sz[<span class="dv">1</span>], sz[<span class="dv">2</span>])) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb4-24" title="24"><span class="st"> </span><span class="kw"><a href="../reference/bricks_from_coords.html">bricks_from_coords</a></span>() <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb4-25" title="25"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>()</a>
<a class="sourceLine" id="cb4-26" title="26"></a>
<a class="sourceLine" id="cb4-27" title="27">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_camera">render_camera</a></span>(<span class="dt">theta =</span> <span class="dv">60</span>, <span class="dt">phi =</span> <span class="dv">20</span>, <span class="dt">zoom =</span> <span class="fl">0.75</span>)</a>
<a class="sourceLine" id="cb4-28" title="28">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>(<span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<a class="sourceLine" id="cb4-27" title="27">rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="dt">userMatrix =</span> rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/matrices.html">rotate3d</a></span>(rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="st">"userMatrix"</span>), <span class="fl">1.1</span><span class="op">*</span>pi<span class="op">/</span><span class="dv">4</span>, pi<span class="op">/</span><span class="dv">4</span>, <span class="dv">0</span> ,<span class="dv">1</span>))</a></code></pre></div>
<p><img src="models-from-program_files/figure-html/bricks_9-1.png" width="384"></p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<div id="tocnav">
<h2 class="hasAnchor">
<a href="#tocnav" class="anchor"></a>Contents</h2>
@@ -246,17 +250,20 @@
</div>
<footer><div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View File

@@ -13,8 +13,9 @@
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- sticky kit --><script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="3D models from tables">
<meta property="og:description" content="">
@@ -38,7 +39,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -46,7 +47,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -84,7 +85,7 @@
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -97,6 +98,7 @@
<!--/.navbar -->
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header toc-ignore">
@@ -113,8 +115,8 @@
<div id="getting-started" class="section level2">
<h2 class="hasAnchor">
<a href="#getting-started" class="anchor"></a>Getting started</h2>
<p>The <code>bricks_from_*</code> series of functions creates 3D models of LEGO bricks from a variety of input formats. These models are rendered using <a href="https://twitter.com/tylermorganwall">Tyler Morgan-Wall</a>s <a href="https://www.rayshader.com/">rayshader</a> package. This package must be installed.</p>
<p><code><a href="../reference/bricks_from_table.html">bricks_from_table()</a></code> converts a matrix-shaped table of integers into LEGO bricks, where most columns are x-coordinates, rows are y-coordinates, and a special <code>Level</code> column denotes the elevation of the row. For simple models, this table can be made manually using <code><a href="https://www.rdocumentation.org/packages/base/topics/data.frame">data.frame()</a></code> or <code><a href="https://tibble.tidyverse.org/reference/tribble.html">tibble::tribble()</a></code>.</p>
<p>The <code>bricks_from_*</code> series of functions creates 3D models of LEGO bricks from a variety of input formats.</p>
<p><code><a href="../reference/bricks_from_table.html">bricks_from_table()</a></code> converts a matrix-shaped table of integers into LEGO bricks, where most columns are x-coordinates, rows are y-coordinates, and a special <code>Level</code> column denotes the elevation of the row. For simple models, this table can be made manually using <code><a href="https://rdrr.io/r/base/data.frame.html">data.frame()</a></code> or <code><a href="https://tibble.tidyverse.org/reference/tribble.html">tibble::tribble()</a></code>.</p>
<p>For more advanced models, its recommended you use MS Excel or a .csv file. <code><a href="../reference/bricks_from_excel.html">bricks_from_excel()</a></code> is a wrapper function to more easily build models designed using a Microsoft Excel template. Please see this repo: <a href="https://github.com/ryantimpe/brickr_toybox">brickr toybox</a>.</p>
<p>Pass the output of any <code>bricks_from_*()</code> function to <code><a href="../reference/build_bricks.html">build_bricks()</a></code> to render it as a 3D model.</p>
</div>
@@ -123,10 +125,10 @@
<a href="#individual-bricks" class="anchor"></a>Individual bricks</h2>
<p>Create a single 2x4 brick with a 2x4 data frame, with an additional column to specify the Level. These can be letters or numbers.</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="co">#This is a 2 (columns) x 4 (rows) brick</span></a>
<a class="sourceLine" id="cb1-2" title="2">(brick &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/data.frame">data.frame</a></span>(</a>
<a class="sourceLine" id="cb1-2" title="2">(brick &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(</a>
<a class="sourceLine" id="cb1-3" title="3"> <span class="dt">Level=</span><span class="st">"A"</span>,</a>
<a class="sourceLine" id="cb1-4" title="4"> <span class="dt">X1 =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/rep">rep</a></span>(<span class="dv">3</span>,<span class="dv">4</span>), <span class="co">#The number 3 is the brickrID for 'bright red'</span></a>
<a class="sourceLine" id="cb1-5" title="5"> <span class="dt">X2 =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/rep">rep</a></span>(<span class="dv">3</span>,<span class="dv">4</span>)</a>
<a class="sourceLine" id="cb1-4" title="4"> <span class="dt">X1 =</span> <span class="kw"><a href="https://rdrr.io/r/base/rep.html">rep</a></span>(<span class="dv">3</span>,<span class="dv">4</span>), <span class="co">#The number 3 is the brickrID for 'bright red'</span></a>
<a class="sourceLine" id="cb1-5" title="5"> <span class="dt">X2 =</span> <span class="kw"><a href="https://rdrr.io/r/base/rep.html">rep</a></span>(<span class="dv">3</span>,<span class="dv">4</span>)</a>
<a class="sourceLine" id="cb1-6" title="6">))</a>
<a class="sourceLine" id="cb1-7" title="7"><span class="co">#&gt; Level X1 X2</span></a>
<a class="sourceLine" id="cb1-8" title="8"><span class="co">#&gt; 1 A 3 3</span></a>
@@ -136,9 +138,9 @@
<a class="sourceLine" id="cb1-12" title="12"></a>
<a class="sourceLine" id="cb1-13" title="13">brick <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb1-14" title="14"><span class="st"> </span><span class="kw"><a href="../reference/bricks_from_table.html">bricks_from_table</a></span>() <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb1-15" title="15"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>(<span class="dt">brick_res =</span> <span class="st">"hd"</span>) <span class="co">#Bricks available in standard def, high def, and ultra hd. </span></a>
<a class="sourceLine" id="cb1-15" title="15"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>() </a>
<a class="sourceLine" id="cb1-16" title="16"></a>
<a class="sourceLine" id="cb1-17" title="17">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>( <span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<a class="sourceLine" id="cb1-17" title="17">rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="dt">userMatrix =</span> rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/matrices.html">rotate3d</a></span>(rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="st">"userMatrix"</span>), <span class="fl">1.1</span><span class="op">*</span>pi<span class="op">/</span><span class="dv">4</span>, <span class="dv">0</span>, <span class="dv">0</span> ,<span class="dv">1</span>))</a></code></pre></div>
<p><img src="models-from-tables_files/figure-html/bricks_1-1.png" width="288"></p>
<p>Stack many bricks by changing the Level value in the data frame. The script below uses <code><a href="https://purrr.tidyverse.org/reference/map.html">purrr::map_df()</a></code> to avoid copying and pasting. Changing the numeric values inside the data frame for each level creates different colors.</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1"><span class="dv">1</span><span class="op">:</span><span class="dv">10</span> <span class="op">%&gt;%</span><span class="st"> </span></a>
@@ -147,9 +149,9 @@
<a class="sourceLine" id="cb2-4" title="4"> <span class="dt">X1 =</span> .x,</a>
<a class="sourceLine" id="cb2-5" title="5"> <span class="dt">X2 =</span> .x)) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb2-6" title="6"><span class="st"> </span><span class="kw"><a href="../reference/bricks_from_table.html">bricks_from_table</a></span>() <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb2-7" title="7"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>(<span class="dt">brick_res =</span> <span class="st">"hd"</span>)</a>
<a class="sourceLine" id="cb2-7" title="7"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>(<span class="dt">rgl_lit=</span><span class="ot">FALSE</span>, <span class="dt">outline_bricks =</span> <span class="ot">TRUE</span>)</a>
<a class="sourceLine" id="cb2-8" title="8"></a>
<a class="sourceLine" id="cb2-9" title="9">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>( <span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<a class="sourceLine" id="cb2-9" title="9">rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="dt">userMatrix =</span> rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/matrices.html">rotate3d</a></span>(rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="st">"userMatrix"</span>), <span class="fl">1.1</span><span class="op">*</span>pi<span class="op">/</span><span class="dv">4</span>, <span class="dv">0</span>, <span class="dv">0</span> ,<span class="dv">1</span>))</a></code></pre></div>
<p><img src="models-from-tables_files/figure-html/bricks_2-1.png" width="288"></p>
</div>
<div id="full-models" class="section level2">
@@ -198,13 +200,14 @@
<a class="sourceLine" id="cb3-39" title="39"> </a>
<a class="sourceLine" id="cb3-40" title="40">tree_or_mushroom <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb3-41" title="41"><span class="st"> </span><span class="kw"><a href="../reference/bricks_from_table.html">bricks_from_table</a></span>(brick_colors) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb3-42" title="42"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>(<span class="dt">theta =</span> <span class="dv">210</span>, <span class="dt">phi =</span> <span class="dv">20</span>, <span class="dt">brick_res =</span> <span class="st">"hd"</span>)</a>
<a class="sourceLine" id="cb3-42" title="42"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>()</a>
<a class="sourceLine" id="cb3-43" title="43"></a>
<a class="sourceLine" id="cb3-44" title="44">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>(<span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<a class="sourceLine" id="cb3-44" title="44">rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="dt">userMatrix =</span> rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/matrices.html">rotate3d</a></span>(rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="st">"userMatrix"</span>), <span class="fl">1.1</span><span class="op">*</span>pi<span class="op">/</span><span class="dv">4</span>, <span class="dv">0</span>, <span class="dv">0</span> ,<span class="dv">1</span>))</a></code></pre></div>
<p><img src="models-from-tables_files/figure-html/bricks_5-1.png" width="384"></p>
<div id="plates-instead-of-bricks" class="section level3">
<h3 class="hasAnchor">
<a href="#plates-instead-of-bricks" class="anchor"></a>Plates instead of bricks</h3>
<p><strong>Currently unavailable in <code><a href="../reference/build_bricks.html">build_bricks()</a></code>. Use <code><a href="../reference/build_bricks_rayshader.html">build_bricks_rayshader()</a></code></strong></p>
<p>Thats clearly a tree, right? Why is the data frame called tree_or_mushroom?</p>
<p>Use the input brick_type=“plate” to render the 3D model using LEGO plates rather than bricks, which are 1/3 as tall.</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1">brick_colors &lt;-<span class="st"> </span>tibble<span class="op">::</span><span class="kw"><a href="https://tibble.tidyverse.org/reference/tribble.html">tribble</a></span>(</a>
@@ -216,9 +219,9 @@
<a class="sourceLine" id="cb4-7" title="7"> </a>
<a class="sourceLine" id="cb4-8" title="8">tree_or_mushroom <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb4-9" title="9"><span class="st"> </span><span class="kw"><a href="../reference/bricks_from_table.html">bricks_from_table</a></span>(brick_colors) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb4-10" title="10"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>(<span class="dt">theta =</span> <span class="dv">210</span>, <span class="dt">phi =</span> <span class="dv">10</span>, <span class="dt">brick_res =</span> <span class="st">"hd"</span>, <span class="dt">brick_type=</span><span class="st">"plate"</span>)</a>
<a class="sourceLine" id="cb4-10" title="10"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks_rayshader.html">build_bricks_rayshader</a></span>(<span class="dt">theta =</span> <span class="dv">210</span>, <span class="dt">phi =</span> <span class="dv">10</span>, <span class="dt">brick_res =</span> <span class="st">"hd"</span>, <span class="dt">brick_type=</span><span class="st">"plate"</span>)</a>
<a class="sourceLine" id="cb4-11" title="11"></a>
<a class="sourceLine" id="cb4-12" title="12">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>(<span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<a class="sourceLine" id="cb4-12" title="12">rayshader<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rayshader/man/render_snapshot.html">render_snapshot</a></span>(<span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<p><img src="models-from-tables_files/figure-html/bricks_5a-1.png" width="384"></p>
</div>
</div>
@@ -231,6 +234,7 @@
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<div id="tocnav">
<h2 class="hasAnchor">
<a href="#tocnav" class="anchor"></a>Contents</h2>
@@ -246,17 +250,20 @@
</div>
<footer><div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -13,8 +13,9 @@
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- sticky kit --><script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Mosaics with brickr">
<meta property="og:description" content="">
@@ -38,7 +39,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -46,7 +47,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -84,7 +85,7 @@
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -97,6 +98,7 @@
<!--/.navbar -->
</header><div class="row">
<div class="col-md-9 contents">
<div class="page-header toc-ignore">
@@ -115,16 +117,16 @@
<a href="#getting-started" class="anchor"></a>Getting started</h2>
<p>You can generate a brickr mosaic object from an image using <code><a href="../reference/image_to_mosaic.html">brickr::image_to_mosaic()</a></code>. Pass this object to <code><a href="../reference/build_mosaic.html">build_mosaic()</a></code> to construct a visualization of the mosaic.</p>
<p><img src="http://ryantimpe.com/files/mf_unicorn.PNG" width="250"></p>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1">demo_img =<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/tempfile">tempfile</a></span>() </a>
<a class="sourceLine" id="cb1-2" title="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/download.file">download.file</a></span>(<span class="st">"http://ryantimpe.com/files/mf_unicorn.PNG"</span>, demo_img, <span class="dt">mode=</span><span class="st">"wb"</span>)</a>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1">demo_img =<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/tempfile.html">tempfile</a></span>() </a>
<a class="sourceLine" id="cb1-2" title="2"><span class="kw"><a href="https://rdrr.io/r/utils/download.file.html">download.file</a></span>(<span class="st">"http://ryantimpe.com/files/mf_unicorn.PNG"</span>, demo_img, <span class="dt">mode=</span><span class="st">"wb"</span>)</a>
<a class="sourceLine" id="cb1-3" title="3"></a>
<a class="sourceLine" id="cb1-4" title="4">mosaic &lt;-<span class="st"> </span>png<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/png/topics/readPNG">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb1-4" title="4">mosaic &lt;-<span class="st"> </span>png<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/png/man/readPNG.html">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb1-5" title="5"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>()</a>
<a class="sourceLine" id="cb1-6" title="6"></a>
<a class="sourceLine" id="cb1-7" title="7">mosaic <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>()</a></code></pre></div>
<p><img src="mosaics_files/figure-html/g1-1.png" width="700"></p>
<p>The default is to create a mosaic with 48 knobs (brick studs) on each side. Change this using the <code>img_size</code> input. A single value will create a square mosaic, while an array of two values represent the width and length.</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1">png<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/png/topics/readPNG">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1">png<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/png/man/readPNG.html">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb2-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>(<span class="dt">img_size =</span> <span class="dv">32</span>) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb2-3" title="3"><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>()</a></code></pre></div>
<p><img src="mosaics_files/figure-html/g2-1.png" width="700"></p>
@@ -151,22 +153,22 @@
<li>special colors are typically reserved for certain products and its likely that bricks might not be actively produced in these colors.</li>
</ul>
<p>Use the <code>color_palette</code> input in the <code><a href="../reference/image_to_mosaic.html">image_to_mosaic()</a></code> function to limit the bricks used to any combination of these three categories.</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1">p1 &lt;-<span class="st"> </span>png<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/png/topics/readPNG">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb3-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>(<span class="dv">32</span>, <span class="dt">color_palette =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">'universal'</span>, <span class="st">'generic'</span>)) <span class="op">%&gt;%</span><span class="st"> </span></a>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1">p1 &lt;-<span class="st"> </span>png<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/png/man/readPNG.html">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb3-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>(<span class="dv">32</span>, <span class="dt">color_palette =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">'universal'</span>, <span class="st">'generic'</span>)) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb3-3" title="3"><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>(<span class="dt">title =</span> <span class="st">"universal &amp; generic"</span>)</a>
<a class="sourceLine" id="cb3-4" title="4"></a>
<a class="sourceLine" id="cb3-5" title="5">p2 &lt;-<span class="st"> </span>png<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/png/topics/readPNG">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb3-6" title="6"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>(<span class="dv">32</span>, <span class="dt">color_palette =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">'universal'</span>)) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb3-5" title="5">p2 &lt;-<span class="st"> </span>png<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/png/man/readPNG.html">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb3-6" title="6"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>(<span class="dv">32</span>, <span class="dt">color_palette =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">'universal'</span>)) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb3-7" title="7"><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>(<span class="dt">title =</span> <span class="st">"universal"</span>)</a>
<a class="sourceLine" id="cb3-8" title="8"></a>
<a class="sourceLine" id="cb3-9" title="9">gridExtra<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/gridExtra/topics/arrangeGrob">grid.arrange</a></span>(p1, p2, <span class="dt">layout_matrix =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/matrix">matrix</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">1</span>,<span class="dv">2</span>), <span class="dt">ncol=</span><span class="dv">2</span>))</a></code></pre></div>
<a class="sourceLine" id="cb3-9" title="9">gridExtra<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/gridExtra/man/arrangeGrob.html">grid.arrange</a></span>(p1, p2, <span class="dt">layout_matrix =</span> <span class="kw"><a href="https://rdrr.io/r/base/matrix.html">matrix</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="dv">1</span>,<span class="dv">2</span>), <span class="dt">ncol=</span><span class="dv">2</span>))</a></code></pre></div>
<p><img src="mosaics_files/figure-html/c_palettes-1.png" width="576"></p>
</div>
<div id="grayscale" class="section level4">
<h4 class="hasAnchor">
<a href="#grayscale" class="anchor"></a>Grayscale</h4>
<p>For grayscale or black and white mosaics, use <code>color_palette = 'bw'</code>. This creates the mosaic by measuring the brightness of each pixel in the image and mapping it one of the four shades of gray. Use the contrast input to adjust the relative brightness of the pixels.</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1">png<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/png/topics/readPNG">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb4-1" title="1">png<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/png/man/readPNG.html">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb4-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>(<span class="dv">32</span>, <span class="dt">color_palette =</span> <span class="st">'bw'</span>, <span class="dt">contrast =</span> <span class="fl">1.1</span>)<span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb4-3" title="3"><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>()</a></code></pre></div>
<p><img src="mosaics_files/figure-html/c_bw-1.png" width="700"></p>
@@ -177,9 +179,9 @@
<p>With the <code>color_table</code> input, it is possible to restrict the colors in the mosaic to a custom palette.</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" title="1"><span class="co">#Remove blue and azure colors from lego_colors</span></a>
<a class="sourceLine" id="cb5-2" title="2">lego_colors_wo_blue &lt;-<span class="st"> </span>lego_colors <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb5-3" title="3"><span class="st"> </span>dplyr<span class="op">::</span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(<span class="op">!</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/grep">grepl</a></span>(<span class="st">"blue|azur"</span>, <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/chartr">tolower</a></span>(Color)))</a>
<a class="sourceLine" id="cb5-3" title="3"><span class="st"> </span>dplyr<span class="op">::</span><span class="kw"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span>(<span class="op">!</span><span class="kw"><a href="https://rdrr.io/r/base/grep.html">grepl</a></span>(<span class="st">"blue|azur"</span>, <span class="kw"><a href="https://rdrr.io/r/base/chartr.html">tolower</a></span>(Color)))</a>
<a class="sourceLine" id="cb5-4" title="4"></a>
<a class="sourceLine" id="cb5-5" title="5">png<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/png/topics/readPNG">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb5-5" title="5">png<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/png/man/readPNG.html">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb5-6" title="6"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>(<span class="dv">32</span>, <span class="dt">color_table =</span> lego_colors_wo_blue)<span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb5-7" title="7"><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>(<span class="dt">title =</span> <span class="st">"Mosaic without blue or azur"</span>)</a></code></pre></div>
<p><img src="mosaics_files/figure-html/c_custom-1.png" width="700"></p>
@@ -190,27 +192,27 @@
<a href="#color-matching" class="anchor"></a>Color matching</h3>
<p>brickr uses the <a href="https://cran.r-project.org/web/packages/farver/index.html"><code>farver</code></a> package to match image colors to the subset of LEGO colors. Technical details of the different algorithms can be found on <a href="https://en.wikipedia.org/wiki/Color_difference">Wikipedia</a>.</p>
<p>The default algorithm is cie94, though the other farver options are available using the <code>method</code> input. The farver euclidean is not very accurate, so brickr_classic returns a manually calculated version for Euclidean RGB distance matching.</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"cie94"</span>, <span class="st">"cie2000"</span>, <span class="st">"euclidean"</span>, <span class="st">"brickr_classic"</span>) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb6-2" title="2"><span class="st"> </span>purrr<span class="op">::</span><span class="kw"><a href="https://purrr.tidyverse.org/reference/map.html">map</a></span>(<span class="op">~</span>png<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/png/topics/readPNG">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"cie94"</span>, <span class="st">"cie2000"</span>, <span class="st">"euclidean"</span>, <span class="st">"brickr_classic"</span>) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb6-2" title="2"><span class="st"> </span>purrr<span class="op">::</span><span class="kw"><a href="https://purrr.tidyverse.org/reference/map.html">map</a></span>(<span class="op">~</span>png<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/png/man/readPNG.html">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb6-3" title="3"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>(<span class="dv">24</span>, <span class="dt">method =</span>.x) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb6-4" title="4"><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>(<span class="dt">title =</span> .x )) -&gt;<span class="st"> </span>mosaics_by_method</a>
<a class="sourceLine" id="cb6-5" title="5"></a>
<a class="sourceLine" id="cb6-6" title="6">gridExtra<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/gridExtra/topics/arrangeGrob">grid.arrange</a></span>(<span class="dt">grobs =</span> mosaics_by_method, <span class="dt">layout_matrix =</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/cbind">rbind</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">1</span>,<span class="dv">2</span>),<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">3</span>,<span class="dv">4</span>)))</a></code></pre></div>
<a class="sourceLine" id="cb6-6" title="6">gridExtra<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/gridExtra/man/arrangeGrob.html">grid.arrange</a></span>(<span class="dt">grobs =</span> mosaics_by_method, <span class="dt">layout_matrix =</span><span class="kw"><a href="https://rdrr.io/r/base/cbind.html">rbind</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="dv">1</span>,<span class="dv">2</span>),<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="dv">3</span>,<span class="dv">4</span>)))</a></code></pre></div>
<p><img src="mosaics_files/figure-html/c_methods-1.png" width="480"></p>
</div>
<div id="dithering" class="section level3">
<h3 class="hasAnchor">
<a href="#dithering" class="anchor"></a>Dithering</h3>
<p>When rendering a mosaic from a photographic with many shades of similar colors, using <a href="https://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dithering">dithering</a> by setting <code>dithering = TRUE</code> will help to add texture to the mosaic and avoid large areas of the same color. This works particularly well for large mosaics, but is purely a stylist preference.</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1">gg_img =<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/tempfile">tempfile</a></span>() </a>
<a class="sourceLine" id="cb7-2" title="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/download.file">download.file</a></span>(<span class="st">"http://ryantimpe.com/files/goldengirls.JPG"</span>, gg_img, <span class="dt">mode=</span><span class="st">"wb"</span>)</a>
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1">gg_img =<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/tempfile.html">tempfile</a></span>() </a>
<a class="sourceLine" id="cb7-2" title="2"><span class="kw"><a href="https://rdrr.io/r/utils/download.file.html">download.file</a></span>(<span class="st">"http://ryantimpe.com/files/goldengirls.JPG"</span>, gg_img, <span class="dt">mode=</span><span class="st">"wb"</span>)</a>
<a class="sourceLine" id="cb7-3" title="3"></a>
<a class="sourceLine" id="cb7-4" title="4"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="ot">FALSE</span>, <span class="ot">TRUE</span>) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb7-5" title="5"><span class="st"> </span>purrr<span class="op">::</span><span class="kw"><a href="https://purrr.tidyverse.org/reference/map.html">map</a></span>(<span class="op">~</span>jpeg<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/jpeg/topics/readJPEG">readJPEG</a></span>(gg_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb7-4" title="4"><span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="ot">FALSE</span>, <span class="ot">TRUE</span>) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb7-5" title="5"><span class="st"> </span>purrr<span class="op">::</span><span class="kw"><a href="https://purrr.tidyverse.org/reference/map.html">map</a></span>(<span class="op">~</span>jpeg<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/jpeg/man/readJPEG.html">readJPEG</a></span>(gg_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb7-6" title="6"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>(<span class="dt">dithering =</span> .x) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb7-7" title="7"><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>(<span class="dt">title =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/paste">paste</a></span>(<span class="st">"dithering ="</span>, .x))) -&gt;<span class="st"> </span>mosaics_by_dither</a>
<a class="sourceLine" id="cb7-7" title="7"><span class="st"> </span><span class="kw"><a href="../reference/build_mosaic.html">build_mosaic</a></span>(<span class="dt">title =</span> <span class="kw"><a href="https://rdrr.io/r/base/paste.html">paste</a></span>(<span class="st">"dithering ="</span>, .x))) -&gt;<span class="st"> </span>mosaics_by_dither</a>
<a class="sourceLine" id="cb7-8" title="8"></a>
<a class="sourceLine" id="cb7-9" title="9">gridExtra<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/gridExtra/topics/arrangeGrob">grid.arrange</a></span>(<span class="dt">grobs =</span> mosaics_by_dither, <span class="dt">layout_matrix =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/matrix">matrix</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">1</span>,<span class="dv">2</span>), <span class="dt">ncol=</span><span class="dv">2</span>))</a></code></pre></div>
<a class="sourceLine" id="cb7-9" title="9">gridExtra<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/gridExtra/man/arrangeGrob.html">grid.arrange</a></span>(<span class="dt">grobs =</span> mosaics_by_dither, <span class="dt">layout_matrix =</span> <span class="kw"><a href="https://rdrr.io/r/base/matrix.html">matrix</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="dv">1</span>,<span class="dv">2</span>), <span class="dt">ncol=</span><span class="dv">2</span>))</a></code></pre></div>
<p><img src="mosaics_files/figure-html/c_dither-1.png" width="576"></p>
</div>
<div id="other-color-options" class="section level3">
@@ -223,18 +225,22 @@
<h2 class="hasAnchor">
<a href="#d-mosaics" class="anchor"></a>3D Mosaics</h2>
<p>With <a href="https://www.rayshader.com/">rayshader</a> installed, passing the mosaic object to <code><a href="../reference/bricks_from_mosaic.html">bricks_from_mosaic()</a></code> will render a 3D object, stacking layers of bricks on each other to create an elevated mosaic. By default, the lightest color bricks will be on top, but this can be changed using the <code>highest_el = 'dark'</code> option.</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1">png<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/png/topics/readPNG">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1">png<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/png/man/readPNG.html">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb8-2" title="2"><span class="st"> </span><span class="kw"><a href="../reference/image_to_mosaic.html">image_to_mosaic</a></span>(<span class="dv">32</span>) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb8-3" title="3"><span class="st"> </span><span class="kw"><a href="../reference/bricks_from_mosaic.html">bricks_from_mosaic</a></span>(<span class="dt">highest_el =</span> <span class="st">"dark"</span>) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb8-4" title="4"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>(<span class="dt">brick_type =</span> <span class="st">"plate"</span>)</a>
<a class="sourceLine" id="cb8-4" title="4"><span class="st"> </span><span class="kw"><a href="../reference/build_bricks.html">build_bricks</a></span>()</a>
<a class="sourceLine" id="cb8-5" title="5"></a>
<a class="sourceLine" id="cb8-6" title="6">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_camera">render_camera</a></span>(<span class="dt">theta =</span> <span class="dv">15</span>)</a>
<a class="sourceLine" id="cb8-7" title="7">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>(<span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<a class="sourceLine" id="cb8-6" title="6"><span class="co">#From dput(round(rgl::par3d("userMatrix"),1)) after manual rotation</span></a>
<a class="sourceLine" id="cb8-7" title="7">custom_rotation &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/structure.html">structure</a></span>(<span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">0.9</span>, <span class="fl">0.3</span>, <span class="fl">-0.3</span>, <span class="dv">0</span>, <span class="fl">-0.3</span>, <span class="fl">0.9</span>, <span class="fl">-0.3</span>, </a>
<a class="sourceLine" id="cb8-8" title="8"> <span class="dv">0</span>, <span class="fl">0.2</span>, <span class="fl">0.4</span>, <span class="fl">0.9</span>, <span class="dv">0</span>, <span class="dv">0</span>, <span class="dv">0</span>, <span class="dv">0</span>, <span class="dv">1</span>), <span class="dt">.Dim =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(4L, 4L))</a>
<a class="sourceLine" id="cb8-9" title="9"></a>
<a class="sourceLine" id="cb8-10" title="10">rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="dt">userMatrix =</span> rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/matrices.html">rotate3d</a></span>(custom_rotation, <span class="dv">0</span>, <span class="dv">0</span>, pi<span class="op">/</span><span class="dv">4</span> ,<span class="dv">1</span>))</a></code></pre></div>
<p><img src="mosaics_files/figure-html/c_threed-1.png" width="700"></p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<div id="tocnav">
<h2 class="hasAnchor">
<a href="#tocnav" class="anchor"></a>Contents</h2>
@@ -249,17 +255,20 @@
</div>
<footer><div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 KiB

After

Width:  |  Height:  |  Size: 171 KiB

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="pkgdown.css" rel="stylesheet">
@@ -39,13 +43,14 @@
<link href="extra.css" rel="stylesheet">
<meta property="og:title" content="Authors" />
<meta property="og:title" content="Authors" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -56,6 +61,7 @@
<![endif]-->
</head>
<body>
@@ -72,7 +78,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -80,7 +86,7 @@
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -115,11 +121,10 @@
<a href="news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -130,6 +135,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -150,19 +156,23 @@
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -13,13 +13,14 @@
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png">
<!-- jquery --><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script><!-- Bootstrap --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- sticky kit --><script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script><!-- pkgdown --><link href="pkgdown.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous">
<!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- pkgdown --><link href="pkgdown.css" rel="stylesheet">
<script src="pkgdown.js"></script><link href="extra.css" rel="stylesheet">
<meta property="og:title" content="Tools to emulate the LEGO® System in R">
<meta property="og:description" content="
Generate digital LEGO-esque models using tidyverse functions. Convert image files into 2D and 3D mosaics, along with piece counts and instructions.
Build 3D models using data frames with rayshader. Create brick bar charts with ggplot2.">
Build 3D models using data frames with rgl. Create brick bar charts with ggplot2.">
<meta property="og:image" content="http://brickr.org/logo.png">
<meta name="twitter:card" content="summary">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
@@ -28,7 +29,7 @@
<![endif]-->
</head>
<body>
<div class="container template-article">
<div class="container template-home">
<header><div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
@@ -40,7 +41,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -48,7 +49,7 @@
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -86,7 +87,7 @@
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -99,16 +100,18 @@
<!--/.navbar -->
</header><div class="row">
<div class="col-md-9 contents">
<div id="brickr" class="section level1">
</header><div class="row">
<div class="contents col-md-9">
<div id="the-lego-system-in-r" class="section level1">
<div class="page-header"><h1 class="hasAnchor">
<a href="#brickr" class="anchor"></a>brickr <img src="reference/figures/logo.png" align="right" height="138">
</h1></div>
<a href="#the-lego-system-in-r" class="anchor"></a>The LEGO® System in R</h1></div>
</div>
<div id="brickr-" class="section level1">
<h1 class="hasAnchor">
<a href="#brickr-" class="anchor"></a>brickr <img src="reference/figures/logo.png" align="right" height="138">
</h1>
<!-- <!-- badges: start -->
<div id="overview" class="section level2">
@@ -120,7 +123,7 @@
<li>
<a href="#mosaics"><strong>Mosaics</strong></a>: Convert image files into mosaics that could be built using LEGO® bricks.</li>
<li>
<a href="#3d-models"><strong>3D Models</strong></a>: Build 3D LEGO® models from simple data formats &amp; <a href="https://www.rayshader.com/">rayshader</a>.</li>
<a href="#3d-models"><strong>3D Models</strong></a>: Build 3D LEGO® models from data tables using <a href="https://cran.r-project.org/web/packages/rgl/index.html">rgl</a>.</li>
<li>
<a href="#charts"><strong>Charts</strong></a>: A <a href="https://ggplot2.tidyverse.org/">ggplot2</a> extension to generate plots that resemble LEGO® bricks.</li>
</ul>
@@ -135,7 +138,7 @@
<li>Generating interest in R and coding for new audiences with easy-to-create 3D models.</li>
<li>or just embracing pure novelty.</li>
</ul>
<p><em>brickr is developed using publicly available information about LEGO® products and is not officially affiliated with The LEGO Group</em></p>
<p><em>brickr is developed under the <a href="https://www.lego.com/en-us/legal/notices-and-policies/fair-play/">Fair Play</a> policy using publicly available information about LEGO® products. brickr is not affiliated with The LEGO Group.</em></p>
</div>
</div>
<div id="installation" class="section level2">
@@ -143,61 +146,62 @@
<a href="#installation" class="anchor"></a>Installation</h2>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" title="1"><span class="co"># To install the latest version from Github:</span></a>
<a class="sourceLine" id="cb1-2" title="2"><span class="co"># install.packages("devtools")</span></a>
<a class="sourceLine" id="cb1-3" title="3">devtools<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/devtools/topics/reexports">install_github</a></span>(<span class="st">"ryantimpe/brickr"</span>)</a>
<a class="sourceLine" id="cb1-3" title="3">devtools<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/devtools/man/remote-reexports.html">install_github</a></span>(<span class="st">"ryantimpe/brickr"</span>)</a>
<a class="sourceLine" id="cb1-4" title="4"></a>
<a class="sourceLine" id="cb1-5" title="5"><span class="co">#For 3D features, rayshader is also required.</span></a>
<a class="sourceLine" id="cb1-6" title="6"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/install.packages">install.packages</a></span>(<span class="st">"rayshader"</span>)</a></code></pre></div>
<a class="sourceLine" id="cb1-6" title="6"><span class="kw"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span>(<span class="st">"rayshader"</span>)</a></code></pre></div>
</div>
<div id="mosaics" class="section level2">
<h2 class="hasAnchor">
<a href="#mosaics" class="anchor"></a>Mosaics</h2>
<p>The mosaic functions renders an imported JPG or PNG file using LEGO colors and bricks.</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1">demo_img =<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/tempfile">tempfile</a></span>() </a>
<a class="sourceLine" id="cb2-2" title="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/download.file">download.file</a></span>(<span class="st">"http://ryantimpe.com/files/mf_unicorn.PNG"</span>, demo_img, <span class="dt">mode=</span><span class="st">"wb"</span>)</a>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" title="1">demo_img =<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/tempfile.html">tempfile</a></span>() </a>
<a class="sourceLine" id="cb2-2" title="2"><span class="kw"><a href="https://rdrr.io/r/utils/download.file.html">download.file</a></span>(<span class="st">"http://ryantimpe.com/files/mf_unicorn.PNG"</span>, demo_img, <span class="dt">mode=</span><span class="st">"wb"</span>)</a>
<a class="sourceLine" id="cb2-3" title="3"></a>
<a class="sourceLine" id="cb2-4" title="4">mosaic1 &lt;-<span class="st"> </span>png<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/png/topics/readPNG">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb2-4" title="4">mosaic1 &lt;-<span class="st"> </span>png<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/png/man/readPNG.html">readPNG</a></span>(demo_img) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb2-5" title="5"><span class="st"> </span><span class="kw"><a href="reference/image_to_mosaic.html">image_to_mosaic</a></span>(<span class="dt">img_size =</span> <span class="dv">36</span>) <span class="co">#Length of each side of mosaic in "bricks"</span></a>
<a class="sourceLine" id="cb2-6" title="6"></a>
<a class="sourceLine" id="cb2-7" title="7"><span class="co">#Plot 2D mosaic</span></a>
<a class="sourceLine" id="cb2-8" title="8">mosaic1 <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="reference/build_mosaic.html">build_mosaic</a></span>()</a></code></pre></div>
<p><img src="index_files/figure-html/m1_set-1.png" width="288"></p>
<p><img src="README_files/figure-gfm/m1_set-1.png"><!-- --></p>
<p>In general, any <strong>brickr</strong> function that begins with <code>build_</code> generates a graphical output from a <strong>brickr</strong> list object, generated from other functions.</p>
<div id="customization" class="section level3">
<h3 class="hasAnchor">
<a href="#customization" class="anchor"></a>Customization</h3>
<p><code><a href="reference/image_to_mosaic.html">image_to_mosaic()</a></code> can take a few important arguments. See <code>?image_to_mosaic()</code> for full detail.</p>
<ul>
<li><p><code>img_size</code> Providing a single value, such as <code>48</code>, crops the image to a square. Inputting a 2-element array, <code><a href="https://www.rdocumentation.org/packages/base/topics/c">c(56, 48)</a></code>, will output a rectangular image of <code><a href="https://www.rdocumentation.org/packages/base/topics/c">c(width, height)</a></code>.</p></li>
<li><p><code>color_table</code> &amp; <code>color_palette</code> Options to limit the color of bricks used in mosaics, as not all colors produced by LEGO are readily available. Set <code>color_palette</code> to universal or <code><a href="https://www.rdocumentation.org/packages/base/topics/c">c('universal', 'generic')</a></code> to limit colors to the most common ones. Use a subset of the data frame <code>lego_colors</code> as the <code>color_table</code> to specify a custom palette.</p></li>
<li><p><code>img_size</code> Providing a single value, such as <code>48</code>, crops the image to a square. Inputting a 2-element array, <code><a href="https://rdrr.io/r/base/c.html">c(56, 48)</a></code>, will output a rectangular image of <code><a href="https://rdrr.io/r/base/c.html">c(width, height)</a></code>.</p></li>
<li><p><code>color_table</code> &amp; <code>color_palette</code> Options to limit the color of bricks used in mosaics, as not all colors produced by LEGO are readily available. Set <code>color_palette</code> to universal or <code><a href="https://rdrr.io/r/base/c.html">c('universal', 'generic')</a></code> to limit colors to the most common ones. Use a subset of the data frame <code>lego_colors</code> as the <code>color_table</code> to specify a custom palette.</p></li>
<li><p><code>method</code> Technique used to map image colors into the allowed brick colors. Defaults to cie94`, but other options include cie2000 and euclidean. Also includes the option brickr_classic, used in previous version of the package.</p></li>
</ul>
</div>
</div>
<div id="d-models" class="section level2">
<div id="3d-models" class="section level2">
<h2 class="hasAnchor">
<a href="#d-models" class="anchor"></a>3D Models</h2>
<p>The <code>bricks_from_*</code> series of functions creates 3D models of LEGO bricks from a variety of input formats. These models are rendered using <a href="https://twitter.com/tylermorganwall">Tyler Morgan-Wall</a>s <a href="https://www.rayshader.com/">rayshader</a> package.</p>
<a href="#3d-models" class="anchor"></a>3D Models</h2>
<p>The <code>bricks_from_*</code> series of functions creates 3D models of LEGO bricks from a variety of input formats.</p>
<ul>
<li><p><code><a href="reference/bricks_from_table.html">bricks_from_table()</a></code> &amp; <code><a href="reference/bricks_from_excel.html">bricks_from_excel()</a></code> convert a matrix-shaped table of integers into LEGO bricks. For simple models, this table can be made manually using <code><a href="https://www.rdocumentation.org/packages/base/topics/data.frame">data.frame()</a></code> or <code><a href="https://tibble.tidyverse.org/reference/tribble.html">tibble::tribble()</a></code>. For more advanced models, its recommended you use MS Excel or a .csv file. The left-most column in the table is associated with the Level or z-axis of the model. <code><a href="reference/bricks_from_excel.html">bricks_from_excel()</a></code> is a wrapper function to more easily build models designed using a Microsoft Excel template. Please see this repo: <a href="https://github.com/ryantimpe/brickr_toybox">brickr toybox</a>.</p></li>
<li><p><code><a href="reference/bricks_from_table.html">bricks_from_table()</a></code> &amp; <code><a href="reference/bricks_from_excel.html">bricks_from_excel()</a></code> convert a matrix-shaped table of integers into LEGO bricks. For simple models, this table can be made manually using <code><a href="https://rdrr.io/r/base/data.frame.html">data.frame()</a></code> or <code><a href="https://tibble.tidyverse.org/reference/tribble.html">tibble::tribble()</a></code>. For more advanced models, its recommended you use MS Excel or a .csv file. The left-most column in the table is associated with the Level or z-axis of the model. <code><a href="reference/bricks_from_excel.html">bricks_from_excel()</a></code> is a wrapper function to more easily build models designed using a Microsoft Excel template. Please see this repo: <a href="https://github.com/ryantimpe/brickr_toybox">brickr toybox</a>.</p></li>
<li><p><code><a href="reference/bricks_from_coords.html">bricks_from_coords()</a></code> takes a data frame with <code>x</code>, <code>y</code>, &amp; <code>z</code> integer values, and <code>Color</code> columns, where each combination of x, y, &amp; z is a point in 3-dimensional space. Color must be an official LEGO color name from <code><a href="reference/build_colors.html">build_colors()</a></code>. This format is much more flexible than <code><a href="reference/bricks_from_table.html">bricks_from_table()</a></code> and allows the programmatic development of 3D models.</p></li>
<li><p><code><a href="reference/bricks_from_mosaic.html">bricks_from_mosaic()</a></code> converts a 2D <a href="#mosaics">mosaic</a> object from an image into 3D LEGO models, respectively. <code><a href="reference/bricks_from_rayshader.html">bricks_from_rayshader()</a></code> creates a LEGO model from the same input as <code><a href="https://www.rdocumentation.org/packages/rayshader/topics/plot_3d">rayshader::plot_3d()</a></code>.</p></li>
<li><p><code><a href="reference/bricks_from_mosaic.html">bricks_from_mosaic()</a></code> converts a 2D <a href="#mosaics">mosaic</a> object from an image into 3D LEGO models, respectively. <code><a href="reference/bricks_from_rayshader.html">bricks_from_rayshader()</a></code> creates a LEGO model from the same input as <code><a href="https://rdrr.io/pkg/rayshader/man/plot_3d.html">rayshader::plot_3d()</a></code>.</p></li>
</ul>
<p>Pass the output from any <code>bricks_from_*()</code> function to <code><a href="reference/build_bricks.html">build_bricks()</a></code> to see the 3D model. The <code>brick_res</code> option allows for higher resolution bricks in hd or uhd, which will take longer to render.</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(brickr)</a>
<p>Pass the output from any <code>bricks_from_*()</code> function to <code><a href="reference/build_bricks.html">build_bricks()</a></code> to see the 3D model. Models are currently rendered in <strong>rgl</strong>. Previous versions of brickr use <a href="https://twitter.com/tylermorganwall">Tyler Morgan-Wall</a>s <a href="https://www.rayshader.com/">rayshader</a> package. This option is still available by passing the output from any <code>bricks_from_*()</code> function to <code><a href="reference/build_bricks_rayshader.html">build_bricks_rayshader()</a></code>. Rayshader can still be used for saving snapshots and creating animations.</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" title="1"><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span>(brickr)</a>
<a class="sourceLine" id="cb3-2" title="2"></a>
<a class="sourceLine" id="cb3-3" title="3"><span class="co">#This is a brick</span></a>
<a class="sourceLine" id="cb3-4" title="4">brick &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/data.frame">data.frame</a></span>(</a>
<a class="sourceLine" id="cb3-4" title="4">brick &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(</a>
<a class="sourceLine" id="cb3-5" title="5"> <span class="dt">Level=</span><span class="st">"A"</span>,</a>
<a class="sourceLine" id="cb3-6" title="6"> <span class="dt">X1 =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/rep">rep</a></span>(<span class="dv">3</span>,<span class="dv">4</span>), <span class="co">#The number 3 is the brickrID for 'bright red'</span></a>
<a class="sourceLine" id="cb3-7" title="7"> <span class="dt">X2 =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/rep">rep</a></span>(<span class="dv">3</span>,<span class="dv">4</span>)</a>
<a class="sourceLine" id="cb3-6" title="6"> <span class="dt">X1 =</span> <span class="kw"><a href="https://rdrr.io/r/base/rep.html">rep</a></span>(<span class="dv">3</span>,<span class="dv">4</span>), <span class="co">#The number 3 is the brickrID for 'bright red'</span></a>
<a class="sourceLine" id="cb3-7" title="7"> <span class="dt">X2 =</span> <span class="kw"><a href="https://rdrr.io/r/base/rep.html">rep</a></span>(<span class="dv">3</span>,<span class="dv">4</span>)</a>
<a class="sourceLine" id="cb3-8" title="8">)</a>
<a class="sourceLine" id="cb3-9" title="9"></a>
<a class="sourceLine" id="cb3-10" title="10">brick <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb3-11" title="11"><span class="st"> </span><span class="kw"><a href="reference/bricks_from_table.html">bricks_from_table</a></span>() <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb3-12" title="12"><span class="st"> </span><span class="kw"><a href="reference/build_bricks.html">build_bricks</a></span>(<span class="dt">brick_res =</span> <span class="st">"uhd"</span>)</a>
<a class="sourceLine" id="cb3-12" title="12"><span class="st"> </span><span class="kw"><a href="reference/build_bricks.html">build_bricks</a></span>()</a>
<a class="sourceLine" id="cb3-13" title="13"></a>
<a class="sourceLine" id="cb3-14" title="14">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>( <span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<p><img src="index_files/figure-html/bricks_1-1.png" width="288"></p>
<a class="sourceLine" id="cb3-14" title="14"><span class="co">#Rotate the default view for a better snapshot</span></a>
<a class="sourceLine" id="cb3-15" title="15">rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="dt">userMatrix =</span> rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/matrices.html">rotate3d</a></span>(rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="st">"userMatrix"</span>), <span class="fl">0.75</span><span class="op">*</span>pi, <span class="dv">0</span>, <span class="dv">0</span> ,<span class="dv">1</span>))</a></code></pre></div>
<p><img src="README_files/figure-gfm/bricks_1-1.png"><!-- --></p>
<div id="stacking-bricks" class="section level3">
<h3 class="hasAnchor">
<a href="#stacking-bricks" class="anchor"></a>Stacking bricks</h3>
@@ -235,24 +239,25 @@
<a class="sourceLine" id="cb4-30" title="30"> </a>
<a class="sourceLine" id="cb4-31" title="31">my_first_model <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb4-32" title="32"><span class="st"> </span><span class="kw"><a href="reference/bricks_from_table.html">bricks_from_table</a></span>(brick_colors) <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb4-33" title="33"><span class="st"> </span><span class="kw"><a href="reference/build_bricks.html">build_bricks</a></span>(<span class="dt">theta =</span> <span class="dv">210</span>, <span class="dt">brick_res =</span> <span class="st">"uhd"</span>)</a>
<a class="sourceLine" id="cb4-33" title="33"><span class="st"> </span><span class="kw"><a href="reference/build_bricks.html">build_bricks</a></span>()</a>
<a class="sourceLine" id="cb4-34" title="34"></a>
<a class="sourceLine" id="cb4-35" title="35">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>(<span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<p><img src="index_files/figure-html/bricks_5-1.png" width="384"></p>
<a class="sourceLine" id="cb4-35" title="35"><span class="co">#Rotate the default view for a better snapshot</span></a>
<a class="sourceLine" id="cb4-36" title="36">rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="dt">userMatrix =</span> rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/matrices.html">rotate3d</a></span>(rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="st">"userMatrix"</span>), <span class="fl">1.1</span><span class="op">*</span>pi, <span class="dv">0</span>, <span class="dv">0</span> ,<span class="dv">1</span>))</a></code></pre></div>
<p><img src="README_files/figure-gfm/bricks_5-1.png"><!-- --></p>
</div>
<div id="programmatically-build-models" class="section level3">
<h3 class="hasAnchor">
<a href="#programmatically-build-models" class="anchor"></a>Programmatically build models</h3>
<p>Use <code><a href="reference/bricks_from_coords.html">bricks_from_coords()</a></code> to programmatically build 3D LEGO models instead of manually drawing them in a spreadsheet or table. Here you must provide whole number coordinates for x, y, and z, along with an official LEGO color name for each point.</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb5-1" title="1">radius &lt;-<span class="st"> </span><span class="dv">4</span></a>
<a class="sourceLine" id="cb5-2" title="2">sphere_coords &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/expand.grid">expand.grid</a></span>(</a>
<a class="sourceLine" id="cb5-3" title="3"> <span class="dt">x =</span> <span class="dv">1</span><span class="op">:</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/Round">round</a></span>((radius<span class="op">*</span><span class="fl">2.5</span>)),</a>
<a class="sourceLine" id="cb5-4" title="4"> <span class="dt">y =</span> <span class="dv">1</span><span class="op">:</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/Round">round</a></span>((radius<span class="op">*</span><span class="fl">2.5</span>)),</a>
<a class="sourceLine" id="cb5-5" title="5"> <span class="dt">z =</span> <span class="dv">1</span><span class="op">:</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/Round">round</a></span>((radius<span class="op">/</span>(<span class="dv">6</span><span class="op">/</span><span class="dv">5</span>)<span class="op">*</span><span class="fl">2.5</span>)) <span class="co">#A brick is 6/5 taller than it is wide/deep</span></a>
<a class="sourceLine" id="cb5-2" title="2">sphere_coords &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/expand.grid.html">expand.grid</a></span>(</a>
<a class="sourceLine" id="cb5-3" title="3"> <span class="dt">x =</span> <span class="dv">1</span><span class="op">:</span><span class="kw"><a href="https://rdrr.io/r/base/Round.html">round</a></span>((radius<span class="op">*</span><span class="fl">2.5</span>)),</a>
<a class="sourceLine" id="cb5-4" title="4"> <span class="dt">y =</span> <span class="dv">1</span><span class="op">:</span><span class="kw"><a href="https://rdrr.io/r/base/Round.html">round</a></span>((radius<span class="op">*</span><span class="fl">2.5</span>)),</a>
<a class="sourceLine" id="cb5-5" title="5"> <span class="dt">z =</span> <span class="dv">1</span><span class="op">:</span><span class="kw"><a href="https://rdrr.io/r/base/Round.html">round</a></span>((radius<span class="op">/</span>(<span class="dv">6</span><span class="op">/</span><span class="dv">5</span>)<span class="op">*</span><span class="fl">2.5</span>)) <span class="co">#A brick is 6/5 taller than it is wide/deep</span></a>
<a class="sourceLine" id="cb5-6" title="6">) <span class="op">%&gt;%</span></a>
<a class="sourceLine" id="cb5-7" title="7"><span class="st"> </span><span class="kw">mutate</span>(</a>
<a class="sourceLine" id="cb5-8" title="8"> <span class="co">#Distance of each coordinate from center</span></a>
<a class="sourceLine" id="cb5-9" title="9"> <span class="dt">dist =</span> (((x<span class="op">-</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/mean">mean</a></span>(x))<span class="op">^</span><span class="dv">2</span> <span class="op">+</span><span class="st"> </span>(y<span class="op">-</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/mean">mean</a></span>(y))<span class="op">^</span><span class="dv">2</span> <span class="op">+</span><span class="st"> </span>(z<span class="op">-</span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/mean">mean</a></span>(z))<span class="op">^</span><span class="dv">2</span>)<span class="op">^</span>(<span class="dv">1</span><span class="op">/</span><span class="dv">2</span>)),</a>
<a class="sourceLine" id="cb5-9" title="9"> <span class="dt">dist =</span> (((x<span class="op">-</span><span class="kw"><a href="https://rdrr.io/r/base/mean.html">mean</a></span>(x))<span class="op">^</span><span class="dv">2</span> <span class="op">+</span><span class="st"> </span>(y<span class="op">-</span><span class="kw"><a href="https://rdrr.io/r/base/mean.html">mean</a></span>(y))<span class="op">^</span><span class="dv">2</span> <span class="op">+</span><span class="st"> </span>(z<span class="op">-</span><span class="kw"><a href="https://rdrr.io/r/base/mean.html">mean</a></span>(z))<span class="op">^</span><span class="dv">2</span>)<span class="op">^</span>(<span class="dv">1</span><span class="op">/</span><span class="dv">2</span>)),</a>
<a class="sourceLine" id="cb5-10" title="10"> <span class="dt">Color =</span> <span class="kw">case_when</span>(</a>
<a class="sourceLine" id="cb5-11" title="11"> <span class="co">#Yellow stripes on the surface with a 2to4 thickness</span></a>
<a class="sourceLine" id="cb5-12" title="12"> <span class="kw">between</span>(dist, (radius<span class="dv">-1</span>), radius) <span class="op">&amp;</span><span class="st"> </span>(x<span class="op">+</span>y<span class="op">+</span>z) <span class="op">%%</span><span class="st"> </span><span class="dv">6</span> <span class="op">%in%</span><span class="st"> </span><span class="dv">0</span><span class="op">:</span><span class="dv">1</span> <span class="op">~</span><span class="st"> "Bright yellow"</span>,</a>
@@ -262,10 +267,12 @@
<a class="sourceLine" id="cb5-16" title="16"></a>
<a class="sourceLine" id="cb5-17" title="17">sphere_coords <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb5-18" title="18"><span class="st"> </span><span class="kw"><a href="reference/bricks_from_coords.html">bricks_from_coords</a></span>() <span class="op">%&gt;%</span><span class="st"> </span></a>
<a class="sourceLine" id="cb5-19" title="19"><span class="st"> </span><span class="kw"><a href="reference/build_bricks.html">build_bricks</a></span>(<span class="dt">brick_res =</span> <span class="st">"uhd"</span>, <span class="dt">phi =</span> <span class="dv">30</span>, <span class="dt">theta =</span> <span class="dv">30</span>)</a>
<a class="sourceLine" id="cb5-19" title="19"><span class="st"> </span><span class="kw"><a href="reference/build_bricks.html">build_bricks</a></span>(<span class="dt">outline_bricks =</span> <span class="ot">TRUE</span>, <span class="dt">rgl_lit =</span> <span class="ot">FALSE</span>)</a>
<a class="sourceLine" id="cb5-20" title="20"></a>
<a class="sourceLine" id="cb5-21" title="21">rayshader<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/rayshader/topics/render_snapshot">render_snapshot</a></span>(<span class="dt">clear =</span> <span class="ot">TRUE</span>)</a></code></pre></div>
<p><img src="index_files/figure-html/bricks_6-1.png" width="480"></p>
<a class="sourceLine" id="cb5-21" title="21"></a>
<a class="sourceLine" id="cb5-22" title="22">rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="dt">userMatrix =</span> rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/matrices.html">rotate3d</a></span>(rgl<span class="op">::</span><span class="kw"><a href="https://rdrr.io/pkg/rgl/man/par3d.html">par3d</a></span>(<span class="st">"userMatrix"</span>), <span class="fl">1.1</span><span class="op">*</span>pi<span class="op">/</span><span class="dv">4</span>, <span class="dv">0</span>, <span class="dv">0</span> ,<span class="dv">1</span>))</a></code></pre></div>
<p><img src="README_files/figure-gfm/bricks_6-1.png"><!-- --></p>
<p>The option <code>outline_bricks = TRUE</code> adds a black outline around the edges of the bricks. Setting <code>rgl_lit = FALSE</code> turns off automated lighting effects from rgl. Changing these two inputs together renders bricks in a more cartoon fashion.</p>
</div>
<div id="examples" class="section level3">
<h3 class="hasAnchor">
@@ -286,7 +293,7 @@
<h2 class="hasAnchor">
<a href="#charts" class="anchor"></a>Charts</h2>
<p>brickr includes functions to render <a href="https://ggplot2.tidyverse.org/">ggplot2</a> bar charts as bricks with LEGO color themes. The main function is <code><a href="reference/geom_brick_col.html">geom_brick_col()</a></code>, which is the brickr equivalent of <code>geom_col()</code>. Additional functions are highly recommended to ensure that proper the chart is rendered in the proper functions and proportions.</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1">df &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/data.frame">data.frame</a></span>(<span class="dt">trt =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"a"</span>, <span class="st">"b"</span>, <span class="st">"c"</span>), <span class="dt">outcome =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="fl">2.3</span>, <span class="fl">1.9</span>, <span class="fl">3.2</span>))</a>
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" title="1">df &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(<span class="dt">trt =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="st">"a"</span>, <span class="st">"b"</span>, <span class="st">"c"</span>), <span class="dt">outcome =</span> <span class="kw"><a href="https://rdrr.io/r/base/c.html">c</a></span>(<span class="fl">2.3</span>, <span class="fl">1.9</span>, <span class="fl">3.2</span>))</a>
<a class="sourceLine" id="cb6-2" title="2"></a>
<a class="sourceLine" id="cb6-3" title="3"><span class="co">#For official LEGO colors, use with scale_fill_brick and theme_brick.</span></a>
<a class="sourceLine" id="cb6-4" title="4"><span class="kw">ggplot</span>(df, <span class="kw">aes</span>(trt, outcome)) <span class="op">+</span></a>
@@ -294,9 +301,9 @@
<a class="sourceLine" id="cb6-6" title="6"><span class="st"> </span><span class="kw"><a href="reference/scale_fill_brick.html">scale_fill_brick</a></span>() <span class="op">+</span></a>
<a class="sourceLine" id="cb6-7" title="7"><span class="st"> </span><span class="kw"><a href="reference/coord-brick.html">coord_brick</a></span>() <span class="op">+</span></a>
<a class="sourceLine" id="cb6-8" title="8"><span class="st"> </span><span class="kw"><a href="reference/theme_brick.html">theme_brick</a></span>()</a></code></pre></div>
<p><img src="index_files/figure-html/geom_brick-1.png" width="384"></p>
<p><img src="README_files/figure-gfm/geom_brick-1.png"><!-- --></p>
<p>Both <code><a href="reference/scale_fill_brick.html">scale_fill_brick()</a></code> and <code><a href="reference/theme_brick.html">theme_brick()</a></code> take an input brick_theme, which ensures all colors match official LEGO brick colors. See <code><a href="reference/build_themes.html">build_themes()</a></code> for a sample of all available brick theme.</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1">df &lt;-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/data.frame">data.frame</a></span>(<span class="dt">trt =</span> letters[<span class="dv">1</span><span class="op">:</span><span class="dv">6</span>], <span class="dt">outcome =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/stats/topics/Normal">rnorm</a></span>(<span class="dv">6</span>, <span class="dt">mean =</span> <span class="dv">5</span>, <span class="dt">sd =</span> <span class="dv">2</span>))</a>
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" title="1">df &lt;-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span>(<span class="dt">trt =</span> letters[<span class="dv">1</span><span class="op">:</span><span class="dv">6</span>], <span class="dt">outcome =</span> <span class="kw"><a href="https://rdrr.io/r/stats/Normal.html">rnorm</a></span>(<span class="dv">6</span>, <span class="dt">mean =</span> <span class="dv">5</span>, <span class="dt">sd =</span> <span class="dv">2</span>))</a>
<a class="sourceLine" id="cb7-2" title="2"></a>
<a class="sourceLine" id="cb7-3" title="3">use_theme &lt;-<span class="st"> "hp"</span></a>
<a class="sourceLine" id="cb7-4" title="4"></a>
@@ -306,7 +313,7 @@
<a class="sourceLine" id="cb7-8" title="8"><span class="st"> </span><span class="kw"><a href="reference/coord-brick.html">coord_brick_flip</a></span>() <span class="op">+</span></a>
<a class="sourceLine" id="cb7-9" title="9"><span class="st"> </span><span class="kw"><a href="reference/theme_brick.html">theme_brick</a></span>(use_theme) <span class="op">+</span></a>
<a class="sourceLine" id="cb7-10" title="10"><span class="st"> </span><span class="kw">theme</span>(<span class="dt">legend.position =</span> <span class="st">"none"</span>)</a></code></pre></div>
<p><img src="index_files/figure-html/geom_brick2-1.png" width="384"></p>
<p><img src="README_files/figure-gfm/geom_brick2-1.png"><!-- --></p>
</div>
<div id="irl" class="section level2">
<h2 class="hasAnchor">
@@ -317,17 +324,18 @@
<a href="#instructions" class="anchor"></a>Instructions</h3>
<p>Use <code><a href="reference/build_instructions.html">build_instructions()</a></code> to break the mosaics and 3D models into easier-to-read steps for building the set. This defaults to 6 steps, but passing any integer value will generate that many steps.</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" title="1">mosaic1 <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="reference/build_instructions.html">build_instructions</a></span>(<span class="dv">9</span>)</a></code></pre></div>
<p><img src="index_files/figure-html/m1_instructions-1.png" width="768"></p>
<p><img src="README_files/figure-gfm/m1_instructions-1.png"><!-- --></p>
</div>
<div id="piece-list-and-count" class="section level3">
<h3 class="hasAnchor">
<a href="#piece-list-and-count" class="anchor"></a>Piece list and count</h3>
<p>Use <code><a href="reference/build_pieces.html">build_pieces()</a></code> to generate a graphic and count of all required plates or bricks (for stacked mosaics). These are sorted by color and size for easy purchase on LEGO.coms <a href="https://shop.lego.com/en-US/Pick-a-Brick">Pick-a-Brick</a> section using the advanced search option. Alternatively, use <code>table_pieces()</code> to produce a data frame table of all required bricks.</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb9-1" title="1">mosaic1 <span class="op">%&gt;%</span><span class="st"> </span><span class="kw"><a href="reference/build_pieces.html">build_pieces</a></span>()</a></code></pre></div>
<p><img src="index_files/figure-html/m1_pieces-1.png" width="768"></p>
<p><img src="README_files/figure-gfm/m1_pieces-1.png"><!-- --></p>
</div>
</div>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
@@ -354,7 +362,7 @@
</ul>
</div>
<div class="dev-status">
<div class="dev-status">
<h2>Dev status</h2>
<ul class="list-unstyled">
<li><a href="https://www.tidyverse.org/lifecycle/#maturing"><img src="https://img.shields.io/badge/lifecycle-maturing-blue.svg" alt="Lifecycle: maturing"></a></li>
@@ -362,7 +370,6 @@
</ul>
</div>
</div>
</div>
@@ -371,12 +378,14 @@
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,13 +43,14 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Changelog" />
<meta property="og:title" content="Changelog" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -56,6 +61,7 @@
<![endif]-->
</head>
<body>
@@ -72,7 +78,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -80,7 +86,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -115,11 +121,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -130,6 +135,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -139,17 +145,40 @@
<small>Source: <a href='https://github.com/ryantimpe/brickr/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
</div>
<div id="brickr-0110000" class="section level1">
<div id="brickr-020" class="section level1">
<h1 class="page-header">
<a href="#brickr-0110000" class="anchor"></a>brickr 0.1.1.0000</h1>
<a href="#brickr-020" class="anchor"></a>brickr 0.2.0</h1>
<ul>
<li><p><strong>Breaking:</strong> Pretty much <em>EVERY</em> function. Seriously, check out the README and start fresh.</p></li>
<li><p><strong>Breaking:</strong> Data “lego_colors.rda” has been updated with more accurate RGB values and new <code>brickrID</code> numbers. This will impact previously created mosaics and 3D models.</p></li>
<li>Lots of bug fixes. More to come.</li>
</ul>
<div id="documentation" class="section level2">
<h2 class="hasAnchor">
<a href="#documentation" class="anchor"></a>Documentation</h2>
<ul>
<li>Issues and bugs are now actively tracked on <a href="https://github.com/ryantimpe/brickr/issues">GitHub Issues</a>.</li>
</ul>
</div>
<div id="3d-models" class="section level2">
<h2 class="hasAnchor">
<a href="<a href='https://github.com/ryantimpe/brickr/issues/3'>#3</a>d-models" class="anchor"></a>3D Models</h2>
<ul>
<li>
<code><a href="../reference/build_bricks.html">build_bricks()</a></code> now renders models in {rgl}, rather than {rayshader}. Most options for the rendering have changed. Use <code>build_brick_rayshader()</code> for previous output.</li>
</ul>
<hr>
</div>
</div>
<div id="brickr-011" class="section level1">
<h1 class="page-header">
<a href="#brickr-011" class="anchor"></a>brickr 0.1.1</h1>
<ul>
<li><p><strong>Breaking:</strong> Pretty much <em>EVERY</em> function. Seriously, check out the README and start fresh.</p></li>
<li><p><strong>Breaking:</strong> Data “lego_colors.rda” has been updated with more accurate RGB values and new <code>brickrID</code> numbers. This will impact previously created mosaics and 3D models.</p></li>
</ul>
<div id="documentation-1" class="section level2">
<h2 class="hasAnchor">
<a href="#documentation-1" class="anchor"></a>Documentation</h2>
<ul>
<li>pkgdown site</li>
<li>Vignettes</li>
</ul>
@@ -166,9 +195,9 @@
<li>3D mosaics have been rewritten as 3D models using plates with <code><a href="../reference/bricks_from_mosaic.html">bricks_from_mosaic()</a></code>.</li>
</ul>
</div>
<div id="3d-models" class="section level2">
<div id="3d-models-1" class="section level2">
<h2 class="hasAnchor">
<a href="<a href='https://github.com/ryantimpe/brickr/issues/3'>#3</a>d-models" class="anchor"></a>3D Models</h2>
<a href="<a href='https://github.com/ryantimpe/brickr/issues/3'>#3</a>d-models-1" class="anchor"></a>3D Models</h2>
<ul>
<li>
<code>brick_res</code> input options to render models in higher definition (sd, hd, uhd)</li>
@@ -192,25 +221,6 @@
<li>
<code>scale_fill_brick</code> and <code>theme_brick</code> for different LEGO color options.</li>
</ul>
</div>
<div id="to-do" class="section level2">
<h2 class="hasAnchor">
<a href="#to-do" class="anchor"></a>TO DO</h2>
<ul>
<li>ggplot - continuous scale</li>
<li>Vignettes
<ul>
<li>IRL</li>
</ul>
</li>
<li>Check() passing</li>
</ul>
<p>** Lower Priority**</p>
<ul>
<li>Negative bricks are “underside”</li>
<li>bricks_from_models</li>
<li>ggplot plays nicely with rayshader::plot_gg()</li>
</ul>
<hr>
</div>
</div>
@@ -239,7 +249,8 @@
<div id="tocnav">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#brickr-0110000">0.1.1.0000</a></li>
<li><a href="#brickr-020">0.2.0</a></li>
<li><a href="#brickr-011">0.1.1</a></li>
<li><a href="#brickr-0009200">0.0.0.9200</a></li>
<li><a href="#brickr-0009150">0.0.0.9150</a></li>
</ul>
@@ -248,19 +259,23 @@
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -21,8 +21,6 @@ body > .container {
display: flex;
height: 100%;
flex-direction: column;
padding-top: 60px;
}
body > .container .row {
@@ -102,21 +100,13 @@ a.anchor {
margin-top: -40px;
}
/* Static header placement on mobile devices */
@media (max-width: 767px) {
.navbar-fixed-top {
position: absolute;
}
.navbar {
padding: 0;
}
}
/* Sidebar --------------------------*/
#sidebar {
margin-top: 30px;
position: -webkit-sticky;
position: sticky;
top: 70px;
}
#sidebar h2 {
font-size: 1.5em;
@@ -133,6 +123,9 @@ a.anchor {
.orcid {
height: 16px;
/* margins are required by official ORCID trademark and display guidelines */
margin-left:4px;
margin-right:4px;
vertical-align: middle;
}
@@ -222,6 +215,19 @@ a.sourceLine:hover {
visibility: visible;
}
/* headroom.js ------------------------ */
.headroom {
will-change: transform;
transition: transform 200ms linear;
}
.headroom--pinned {
transform: translateY(0%);
}
.headroom--unpinned {
transform: translateY(-100%);
}
/* mark.js ----------------------------*/
mark {
@@ -234,3 +240,17 @@ mark {
.html-widget {
margin-bottom: 10px;
}
/* fontawesome ------------------------ */
.fab {
font-family: "Font Awesome 5 Brands" !important;
}
/* don't display links in code chunks when printing */
/* source: https://stackoverflow.com/a/10781533 */
@media print {
code a:link:after, code a:visited:after {
content: "";
}
}

View File

@@ -2,14 +2,12 @@
(function($) {
$(function() {
$("#sidebar")
.stick_in_parent({offset_top: 40})
.on('sticky_kit:bottom', function(e) {
$(this).parent().css('position', 'static');
})
.on('sticky_kit:unbottom', function(e) {
$(this).parent().css('position', 'relative');
});
$('.navbar-fixed-top').headroom();
$('body').css('padding-top', $('.navbar').height() + 10);
$(window).resize(function(){
$('body').css('padding-top', $('.navbar').height() + 10);
});
$('body').scrollspy({
target: '#sidebar',

View File

@@ -1,5 +1,5 @@
pandoc: '2.7'
pkgdown: 1.3.0
pkgdown: 1.4.1
pkgdown_sha: ~
articles:
graphs: graphs.html

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="GeomBrick — CoordBrick" />
<meta property="og:description" content="ggproto for brickr geoms" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,36 +148,39 @@
</div>
<div class="ref-description">
<p>ggproto for brickr geoms</p>
</div>
<pre class="usage"><span class='fu'>draw_key_brick</span>(<span class='no'>data</span>, <span class='no'>params</span>, <span class='no'>size</span>)</pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="<code>brickr</code> package — brickr" />
<meta property="og:description" content="Google spreadsheets R API" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,35 +148,38 @@
</div>
<div class="ref-description">
<p>Google spreadsheets R API</p>
</div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Convert a data frame with x, y, z &amp; Color columns into a brickr 3D object — bricks_from_coords" />
<meta property="og:description" content="Convert a data frame with x, y, z &amp;amp; Color columns into a brickr 3D object" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,15 +148,13 @@
</div>
<div class="ref-description">
<p>Convert a data frame with x, y, z &amp; Color columns into a brickr 3D object</p>
</div>
<pre class="usage"><span class='fu'>bricks_from_coords</span>(<span class='no'>coord_table</span>, <span class='kw'>increment_level</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>max_level</span> <span class='kw'>=</span> <span class='fl'>Inf</span>,
<span class='kw'>increment_x</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>max_x</span> <span class='kw'>=</span> <span class='fl'>Inf</span>, <span class='kw'>increment_y</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>max_y</span> <span class='kw'>=</span> <span class='fl'>Inf</span>,
<span class='kw'>exclude_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>exclude_level</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
@@ -192,47 +195,48 @@
<td><p>Numeric array of Level/z dimensions to exclude.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>A list with elements <code>Img_lego</code> to pass to <code><a href='collect_bricks.html'>collect_bricks()</a></code>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other 3D Models: <code><a href='bricks_from_excel.html'>bricks_from_excel</a></code>,
<code><a href='bricks_from_mosaic.html'>bricks_from_mosaic</a></code>,
<code><a href='bricks_from_rayshader.html'>bricks_from_rayshader</a></code>,
<code><a href='bricks_from_table.html'>bricks_from_table</a></code>,
<code><a href='build_bricks_rayshader.html'>build_bricks_rayshader</a></code>,
<code><a href='build_bricks.html'>build_bricks</a></code></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#see-also">See also</a></li>
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Convert an Excel brickr template into a brickr 3D object — bricks_from_excel" />
<meta property="og:description" content="Convert an Excel brickr template into a brickr 3D object" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,15 +148,13 @@
</div>
<div class="ref-description">
<p>Convert an Excel brickr template into a brickr 3D object</p>
</div>
<pre class="usage"><span class='fu'>bricks_from_excel</span>(<span class='no'>excel_table</span>, <span class='kw'>repeat_levels</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>increment_level</span> <span class='kw'>=</span> <span class='fl'>0</span>,
<span class='kw'>max_level</span> <span class='kw'>=</span> <span class='fl'>Inf</span>, <span class='kw'>increment_x</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>max_x</span> <span class='kw'>=</span> <span class='fl'>Inf</span>, <span class='kw'>increment_y</span> <span class='kw'>=</span> <span class='fl'>0</span>,
<span class='kw'>max_y</span> <span class='kw'>=</span> <span class='fl'>Inf</span>, <span class='kw'>exclude_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>exclude_level</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
@@ -196,47 +199,48 @@
<td><p>Numeric array of Level/z dimensions to exclude.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>A list with elements <code>Img_lego</code> to pass to <code><a href='collect_bricks.html'>collect_bricks()</a></code>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other 3D Models: <code><a href='bricks_from_coords.html'>bricks_from_coords</a></code>,
<code><a href='bricks_from_mosaic.html'>bricks_from_mosaic</a></code>,
<code><a href='bricks_from_rayshader.html'>bricks_from_rayshader</a></code>,
<code><a href='bricks_from_table.html'>bricks_from_table</a></code>,
<code><a href='build_bricks_rayshader.html'>build_bricks_rayshader</a></code>,
<code><a href='build_bricks.html'>build_bricks</a></code></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#see-also">See also</a></li>
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Convert a 2D LEGO mosaic into a brickr 3D object — bricks_from_mosaic" />
<meta property="og:description" content="Convert a 2D LEGO mosaic into a brickr 3D object" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,14 +148,12 @@
</div>
<div class="ref-description">
<p>Convert a 2D LEGO mosaic into a brickr 3D object</p>
</div>
<pre class="usage"><span class='fu'>bricks_from_mosaic</span>(<span class='no'>mosaic_list</span>, <span class='kw'>mosaic_height</span> <span class='kw'>=</span> <span class='fl'>6</span>,
<span class='kw'>highest_el</span> <span class='kw'>=</span> <span class='st'>"light"</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
@@ -167,47 +170,48 @@
<td><p>Brick height is determined by brightness of color. Use <code>highest_el = 'dark'</code> for darkest bricks to have <code>mosaic_height</code>.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>A list with elements <code>threed_elevation</code> and <code>threed_hillshade</code> to created 3D mosiacs with the <code>rayshader</code> package.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other 3D Models: <code><a href='bricks_from_coords.html'>bricks_from_coords</a></code>,
<code><a href='bricks_from_excel.html'>bricks_from_excel</a></code>,
<code><a href='bricks_from_rayshader.html'>bricks_from_rayshader</a></code>,
<code><a href='bricks_from_table.html'>bricks_from_table</a></code>,
<code><a href='build_bricks_rayshader.html'>build_bricks_rayshader</a></code>,
<code><a href='build_bricks.html'>build_bricks</a></code></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#see-also">See also</a></li>
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Build a brickr 3D object from rayshader hillshade &amp; heightmap matrices — bricks_from_rayshader" />
<meta property="og:description" content="Build a brickr 3D object from rayshader hillshade &amp;amp; heightmap matrices" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,24 +148,22 @@
</div>
<div class="ref-description">
<p>Build a brickr 3D object from rayshader hillshade &amp; heightmap matrices</p>
</div>
<pre class="usage"><span class='fu'>bricks_from_rayshader</span>(<span class='no'>hillshade</span>, <span class='no'>heightmap</span>, <span class='kw'>max_height</span> <span class='kw'>=</span> <span class='fl'>12</span>,
<span class='kw'>img_size</span> <span class='kw'>=</span> <span class='fl'>48</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>hillshade</th>
<td><p>Same as <code><a href='https://www.rdocumentation.org/packages/rayshader/topics/plot_3d'>rayshader::plot_3d()</a></code>. Hillshade/image to be added to 3D surface map.</p></td>
<td><p>Same as <code><a href='https://rdrr.io/pkg/rayshader/man/plot_3d.html'>rayshader::plot_3d()</a></code>. Hillshade/image to be added to 3D surface map.</p></td>
</tr>
<tr>
<th>heightmap</th>
<td><p>Same as <code><a href='https://www.rdocumentation.org/packages/rayshader/topics/plot_3d'>rayshader::plot_3d()</a></code>. A two-dimensional matrix, where each entry in the matrix is the elevation at that point. All points are assumed to be evenly spaced.</p></td>
<td><p>Same as <code><a href='https://rdrr.io/pkg/rayshader/man/plot_3d.html'>rayshader::plot_3d()</a></code>. A two-dimensional matrix, where each entry in the matrix is the elevation at that point. All points are assumed to be evenly spaced.</p></td>
</tr>
<tr>
<th>max_height</th>
@@ -169,50 +172,51 @@
<tr>
<th>img_size</th>
<td><p>Size of output image in pixel, where one pixel = one 'brick'. Use a single value (e.g. <code>48</code>) for a square image with 48 pixels on each side.
Use an array of two values for a rectangular image <code><a href='https://www.rdocumentation.org/packages/base/topics/c'>c(width, height)</a></code>.</p></td>
Use an array of two values for a rectangular image <code><a href='https://rdrr.io/r/base/c.html'>c(width, height)</a></code>.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>A list with elements <code>threed_elevation</code> and <code>threed_hillshade</code> to created 3D mosiacs with the <code>rayshader</code> package.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other 3D Models: <code><a href='bricks_from_coords.html'>bricks_from_coords</a></code>,
<code><a href='bricks_from_excel.html'>bricks_from_excel</a></code>,
<code><a href='bricks_from_mosaic.html'>bricks_from_mosaic</a></code>,
<code><a href='bricks_from_table.html'>bricks_from_table</a></code>,
<code><a href='build_bricks_rayshader.html'>build_bricks_rayshader</a></code>,
<code><a href='build_bricks.html'>build_bricks</a></code></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#see-also">See also</a></li>
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Convert a matrix table into a brickr 3D object — bricks_from_table" />
<meta property="og:description" content="Convert a matrix table into a brickr 3D object" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,16 +148,14 @@
</div>
<div class="ref-description">
<p>Convert a matrix table into a brickr 3D object</p>
</div>
<pre class="usage"><span class='fu'>bricks_from_table</span>(<span class='no'>matrix_table</span>, <span class='kw'>color_guide</span> <span class='kw'>=</span> <span class='no'>lego_colors</span>,
<pre class="usage"><span class='fu'>bricks_from_table</span>(<span class='no'>matrix_table</span>, <span class='kw'>color_guide</span> <span class='kw'>=</span> <span class='kw pkg'>brickr</span><span class='kw ns'>::</span><span class='no'>lego_colors</span>,
<span class='kw'>.re_level</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>increment_level</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>max_level</span> <span class='kw'>=</span> <span class='fl'>Inf</span>,
<span class='kw'>increment_x</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>max_x</span> <span class='kw'>=</span> <span class='fl'>Inf</span>, <span class='kw'>increment_y</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='kw'>max_y</span> <span class='kw'>=</span> <span class='fl'>Inf</span>,
<span class='kw'>exclude_color</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>exclude_level</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
@@ -201,47 +204,48 @@
<td><p>Numeric array of Level/z dimensions to exclude.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>A list with elements <code>Img_lego</code> to pass to <code><a href='collect_bricks.html'>collect_bricks()</a></code>.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other 3D Models: <code><a href='bricks_from_coords.html'>bricks_from_coords</a></code>,
<code><a href='bricks_from_excel.html'>bricks_from_excel</a></code>,
<code><a href='bricks_from_mosaic.html'>bricks_from_mosaic</a></code>,
<code><a href='bricks_from_rayshader.html'>bricks_from_rayshader</a></code>,
<code><a href='build_bricks_rayshader.html'>build_bricks_rayshader</a></code>,
<code><a href='build_bricks.html'>build_bricks</a></code></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#see-also">See also</a></li>
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Build 3D brick model with rayshader. — build_bricks • brickr</title>
<title>Build 3D brick model with rgl — build_bricks • brickr</title>
<!-- favicons -->
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Build 3D brick model with rayshader. — build_bricks" />
<meta property="og:description" content="Build 3D brick model with rayshader." />
<meta property="og:title" content="Build 3D brick model with rgl — build_bricks" />
<meta property="og:description" content="Build 3D brick model with rgl" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,26 +136,24 @@
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Build 3D brick model with rayshader.</h1>
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/build-bricks.R'><code>R/build-bricks.R</code></a></small>
<h1>Build 3D brick model with rgl</h1>
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/build-bricks-rgl.R'><code>R/build-bricks-rgl.R</code></a></small>
<div class="hidden name"><code>build_bricks.Rd</code></div>
</div>
<div class="ref-description">
<p>Build 3D brick model with rayshader.</p>
<p>Build 3D brick model with rgl</p>
</div>
<pre class="usage"><span class='fu'>build_bricks</span>(<span class='no'>brick_list</span>, <span class='kw'>brick_type</span> <span class='kw'>=</span> <span class='st'>"brick"</span>, <span class='kw'>brick_res</span> <span class='kw'>=</span> <span class='st'>"sd"</span>,
<span class='kw'>view_levels</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>solidcolor</span> <span class='kw'>=</span> <span class='st'>"#a3a2a4"</span>, <span class='kw'>water</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>,
<span class='kw'>waterdepth</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='no'>...</span>)</pre>
<pre class="usage"><span class='fu'>build_bricks</span>(<span class='no'>brick_list</span>, <span class='kw'>background_color</span> <span class='kw'>=</span> <span class='st'>"white"</span>, <span class='kw'>rgl_lit</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>outline_bricks</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>trans_alpha</span> <span class='kw'>=</span> <span class='fl'>0.5</span>, <span class='kw'>view_levels</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
@@ -160,76 +162,73 @@
<td><p>List output from collect_bricks(). Contains an element <code>Img_lego</code>.</p></td>
</tr>
<tr>
<th>brick_type</th>
<td><p>Type of brick to use. Default is 'brick'. Other option is 'plate', which is 1/3 the height of a brick.</p></td>
<th>background_color</th>
<td><p>Default 'white'. Color of the background.</p></td>
</tr>
<tr>
<th>brick_res</th>
<td><p>Resolution, expressed at number of pixels on one side of a 1x1 brick. Defaults to 'sd' (15px). Use 'hd' for 30px per brick, and 'uhd' for 60px.
Enter a value for a custom resolution. High resolutions take longer to render.</p></td>
<th>rgl_lit</th>
<td><p>Default 'TRUE'. Include RGL lighting features in rendering.</p></td>
</tr>
<tr>
<th>outline_bricks</th>
<td><p>Default 'FALSE'. Include black outlines around brick edges.
Set to 'TRUE' and rgl_lit='FALSE' for cartoon-looking bricks.</p></td>
</tr>
<tr>
<th>trans_alpha</th>
<td><p>Default 0.5. Alpha level for transparent bricks.</p></td>
</tr>
<tr>
<th>view_levels</th>
<td><p>Numeric array of Levels/z values to display. Leave as <code>NULL</code> to include all.</p></td>
<td><p>Numeric array of Levels/z values to display. Leave as 'NULL' to include all.</p></td>
</tr>
<tr>
<th>solidcolor</th>
<td><p>Hex color of mosaic base. Only renders on bottom.</p></td>
</tr>
<tr>
<th>water</th>
<td><p>Default 'FALSE'. If 'TRUE', a water layer is rendered.</p></td>
</tr>
<tr>
<th>waterdepth</th>
<td><p>Default '0'. Water level.</p></td>
</tr>
<tr>
<th>...</th>
<td><p>All other inputs from rayshader::plot_3d() EXCEPT <code>hillshade</code>, <code>soliddepth</code>, <code>zscale</code>, and <code>shadow</code>.</p></td>
<th>brick_type</th>
<td><p>Type of brick to use. Default is 'brick'. Other option is 'plate', which is 1/3 the height of a brick.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>3D brick model rendered in the 'rgl' package.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other 3D Models: <code><a href='bricks_from_coords.html'>bricks_from_coords</a></code>,
<code><a href='bricks_from_excel.html'>bricks_from_excel</a></code>,
<code><a href='bricks_from_mosaic.html'>bricks_from_mosaic</a></code>,
<code><a href='bricks_from_rayshader.html'>bricks_from_rayshader</a></code>,
<code><a href='bricks_from_table.html'>bricks_from_table</a></code></p></div>
<code><a href='bricks_from_table.html'>bricks_from_table</a></code>,
<code><a href='build_bricks_rayshader.html'>build_bricks_rayshader</a></code></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#see-also">See also</a></li>
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -0,0 +1,239 @@
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Build 3D brick model with rayshader. — build_bricks_rayshader • brickr</title>
<!-- favicons -->
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png" />
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Build 3D brick model with rayshader. — build_bricks_rayshader" />
<meta property="og:description" content="Build 3D brick model with rayshader." />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
<li>
<a href="../reference/index.html">Reference</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Articles
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="../articles/graphs.html">ggplot with brickr</a>
</li>
<li>
<a href="../articles/models-from-other.html">3D Models from mosaics &amp; rayshader</a>
</li>
<li>
<a href="../articles/models-from-program.html">3D Models programmatically</a>
</li>
<li>
<a href="../articles/models-from-tables.html">3D models from tables</a>
</li>
<li>
<a href="../articles/mosaics.html">Mosaics with brickr</a>
</li>
</ul>
</li>
<li>
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Build 3D brick model with rayshader.</h1>
<small class="dont-index">Source: <a href='https://github.com/ryantimpe/brickr/blob/master/R/build-bricks.R'><code>R/build-bricks.R</code></a></small>
<div class="hidden name"><code>build_bricks_rayshader.Rd</code></div>
</div>
<div class="ref-description">
<p>Build 3D brick model with rayshader.</p>
</div>
<pre class="usage"><span class='fu'>build_bricks_rayshader</span>(<span class='no'>brick_list</span>, <span class='kw'>brick_type</span> <span class='kw'>=</span> <span class='st'>"brick"</span>,
<span class='kw'>brick_res</span> <span class='kw'>=</span> <span class='st'>"sd"</span>, <span class='kw'>view_levels</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>solidcolor</span> <span class='kw'>=</span> <span class='st'>"#a3a2a4"</span>,
<span class='kw'>water</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>waterdepth</span> <span class='kw'>=</span> <span class='fl'>0</span>, <span class='no'>...</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>brick_list</th>
<td><p>List output from collect_bricks(). Contains an element <code>Img_lego</code>.</p></td>
</tr>
<tr>
<th>brick_type</th>
<td><p>Type of brick to use. Default is 'brick'. Other option is 'plate', which is 1/3 the height of a brick.</p></td>
</tr>
<tr>
<th>brick_res</th>
<td><p>Resolution, expressed at number of pixels on one side of a 1x1 brick. Defaults to 'sd' (15px). Use 'hd' for 30px per brick, and 'uhd' for 60px.
Enter a value for a custom resolution. High resolutions take longer to render.</p></td>
</tr>
<tr>
<th>view_levels</th>
<td><p>Numeric array of Levels/z values to display. Leave as <code>NULL</code> to include all.</p></td>
</tr>
<tr>
<th>solidcolor</th>
<td><p>Hex color of mosaic base. Only renders on bottom.</p></td>
</tr>
<tr>
<th>water</th>
<td><p>Default 'FALSE'. If 'TRUE', a water layer is rendered.</p></td>
</tr>
<tr>
<th>waterdepth</th>
<td><p>Default '0'. Water level.</p></td>
</tr>
<tr>
<th>...</th>
<td><p>All other inputs from rayshader::plot_3d() EXCEPT <code>hillshade</code>, <code>soliddepth</code>, <code>zscale</code>, and <code>shadow</code>.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>3D brick model rendered in the 'rgl' package.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other 3D Models: <code><a href='bricks_from_coords.html'>bricks_from_coords</a></code>,
<code><a href='bricks_from_excel.html'>bricks_from_excel</a></code>,
<code><a href='bricks_from_mosaic.html'>bricks_from_mosaic</a></code>,
<code><a href='bricks_from_rayshader.html'>bricks_from_rayshader</a></code>,
<code><a href='bricks_from_table.html'>bricks_from_table</a></code>,
<code><a href='build_bricks.html'>build_bricks</a></code></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#see-also">See also</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 106 KiB

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Display available brick colors — build_colors" />
<meta property="og:description" content="Generates a plot of available brick colors. Use .names_only = TRUE to get a list of color names." />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,36 +148,36 @@
</div>
<div class="ref-description">
<p>Generates a plot of available brick colors. Use .names_only = TRUE to get a list of color names.</p>
</div>
<pre class="usage"><span class='fu'>build_colors</span>(<span class='kw'>.names_only</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
<pre class="usage"><span class='fu'>build_colors</span>(<span class='kw'>.names_only</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>include_transparent</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>.names_only</th>
<td><p>Return an array of the 41 brick color names. Does not plot.</p></td>
<td><p>Return an array of the 41 solid brick color names and 13 transparent colors. Does not plot.</p></td>
</tr>
<tr>
<th>include_transparent</th>
<td><p>Include transparent colors in the plot output.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>A table and ggplot of brick colors &amp; ID numbers.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other Resources: <code><a href='build_instructions.html'>build_instructions</a></code>,
<code><a href='build_pieces_table.html'>build_pieces_table</a></code>,
<code><a href='build_pieces.html'>build_pieces</a></code>, <code><a href='build_themes.html'>build_themes</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'>#Generate plot of colors</span>
<span class='fu'>build_colors</span>()</div><div class='output co'>#&gt; <span class='message'>Use View(lego_colors) to see these in a table format.</span></div><div class='img'><img src='build_colors-1.png' alt='' width='700' height='433' /></div><div class='input'>
<span class='fu'>build_colors</span>()</div><div class='output co'>#&gt; <span class='message'>Use View(lego_colors) to see these in a table format.</span></div><div class='output co'>#&gt; <span class='message'>Transparent colors are only used for 3D models, not color matching in mosaics or ggplot.</span></div><div class='img'><img src='build_colors-1.png' alt='' width='700' height='433' /></div><div class='input'>
<span class='co'>#Print list of colors</span>
<span class='fu'>build_colors</span>(<span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; [1] "White" "Brick yellow" "Bright red"
#&gt; [4] "Bright blue" "Bright yellow" "Black"
@@ -187,36 +192,41 @@
#&gt; [31] "Cool yellow" "Medium lilac" "Light nougat"
#&gt; [34] "Dark brown" "Medium nougat" "Dark azur"
#&gt; [37] "Aqua" "Lavender" "Spring yellowish green"
#&gt; [40] "Olive green" "Vibrant coral" </div></pre>
#&gt; [40] "Olive green" "Vibrant coral" "Transparent"
#&gt; [43] "Tr. red" "Tr. light blue" "Tr. blue"
#&gt; [46] "Tr. yellow" "Tr. green" "Tr. fl green"
#&gt; [49] "Tr. brown" "Tr. bright orange" "Tr. fl red orange"
#&gt; [52] "Tr. medium violet" "Tr. bright violet" "Tr. bright green" </div></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#see-also">See also</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Create instruction manual for 2D image mosaics — build_instructions" />
<meta property="og:description" content="Create instruction manual for 2D image mosaics" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,13 +148,11 @@
</div>
<div class="ref-description">
<p>Create instruction manual for 2D image mosaics</p>
</div>
<pre class="usage"><span class='fu'>build_instructions</span>(<span class='no'>brickr_obj</span>, <span class='kw'>num_steps</span> <span class='kw'>=</span> <span class='fl'>6</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
@@ -162,39 +165,41 @@
<td><p>Number of discrete steps in instruction manual, for mosaics only</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other Resources: <code><a href='build_colors.html'>build_colors</a></code>,
<code><a href='build_pieces_table.html'>build_pieces_table</a></code>,
<code><a href='build_pieces.html'>build_pieces</a></code>, <code><a href='build_themes.html'>build_themes</a></code></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#see-also">See also</a></li>
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Display 2D LEGO mosaic as a plot image — build_mosaic" />
<meta property="og:description" content="Display 2D LEGO mosaic as a plot image" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,13 +148,11 @@
</div>
<div class="ref-description">
<p>Display 2D LEGO mosaic as a plot image</p>
</div>
<pre class="usage"><span class='fu'>build_mosaic</span>(<span class='no'>brick_obj</span>, <span class='kw'>title</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
@@ -162,37 +165,39 @@
<td><p>Optional title to include above plotted mosaic.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other Mosaics: <code><a href='image_to_mosaic.html'>image_to_mosaic</a></code></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#see-also">See also</a></li>
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Display bricks required to build model or mosaic. — build_pieces" />
<meta property="og:description" content="Display bricks required to build model or mosaic." />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,13 +148,11 @@
</div>
<div class="ref-description">
<p>Display bricks required to build model or mosaic.</p>
</div>
<pre class="usage"><span class='fu'>build_pieces</span>(<span class='no'>brick_obj</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
@@ -158,46 +161,46 @@
<td><p>brickr mosaic or 3D model object.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>Plot object of required bricks by color and size.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other Resources: <code><a href='build_colors.html'>build_colors</a></code>,
<code><a href='build_instructions.html'>build_instructions</a></code>,
<code><a href='build_pieces_table.html'>build_pieces_table</a></code>,
<code><a href='build_themes.html'>build_themes</a></code></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#see-also">See also</a></li>
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Generate required bricks as a data frame. — build_pieces_table" />
<meta property="og:description" content="Generate required bricks as a data frame." />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,13 +148,11 @@
</div>
<div class="ref-description">
<p>Generate required bricks as a data frame.</p>
</div>
<pre class="usage"><span class='fu'>build_pieces_table</span>(<span class='no'>brick_obj</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
@@ -158,45 +161,45 @@
<td><p>brickr mosaic or 3D model object.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>Data frame of piece counts by LEGO color name and size.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other Resources: <code><a href='build_colors.html'>build_colors</a></code>,
<code><a href='build_instructions.html'>build_instructions</a></code>,
<code><a href='build_pieces.html'>build_pieces</a></code>, <code><a href='build_themes.html'>build_themes</a></code></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#see-also">See also</a></li>
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Display available brick themes for ggplot feature scale_fill_brick() — build_themes" />
<meta property="og:description" content="Generates a plot of available brick themes." />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,13 +148,11 @@
</div>
<div class="ref-description">
<p>Generates a plot of available brick themes.</p>
</div>
<pre class="usage"><span class='fu'>build_themes</span>(<span class='kw'>show_themes</span> <span class='kw'>=</span> <span class='st'>"all"</span>, <span class='kw'>.names_only</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
@@ -162,22 +165,20 @@
<td><p>Logical. Return an array of the theme names. Does not plot.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>A table and ggplot of brick colors &amp; ID numbers.</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other Resources: <code><a href='build_colors.html'>build_colors</a></code>,
<code><a href='build_instructions.html'>build_instructions</a></code>,
<code><a href='build_pieces_table.html'>build_pieces_table</a></code>,
<code><a href='build_pieces.html'>build_pieces</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'>#Generate plot of themes</span>
<span class='fu'>build_themes</span>()</div><div class='img'><img src='build_themes-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>build_themes</span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"ducks"</span>, <span class='st'>"ocean"</span>, <span class='st'>"space"</span>))</div><div class='img'><img src='build_themes-2.png' alt='' width='700' height='433' /></div><div class='input'>
<span class='fu'>build_themes</span>()</div><div class='img'><img src='build_themes-1.png' alt='' width='700' height='433' /></div><div class='input'><span class='fu'>build_themes</span>(<span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"ducks"</span>, <span class='st'>"ocean"</span>, <span class='st'>"space"</span>))</div><div class='img'><img src='build_themes-2.png' alt='' width='700' height='433' /></div><div class='input'>
<span class='co'>#Print list of themes</span>
<span class='fu'>build_themes</span>(<span class='kw'>.names_only</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</div><div class='output co'>#&gt; [1] "classic" "city" "duplo" "elves"
#&gt; [5] "friends" "hp" "jurassic" "movie"
@@ -190,30 +191,31 @@
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#see-also">See also</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Consolidate 1x1 bricks into larger ones of the same color. Internal function. — collect_bricks" />
<meta property="og:description" content="Consolidate 1x1 bricks into larger ones of the same color. Internal function." />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,13 +148,11 @@
</div>
<div class="ref-description">
<p>Consolidate 1x1 bricks into larger ones of the same color. Internal function.</p>
</div>
<pre class="usage"><span class='fu'>collect_bricks</span>(<span class='no'>image_list</span>, <span class='kw'>use_bricks</span> <span class='kw'>=</span> <span class='kw'>NULL</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
@@ -159,40 +162,42 @@
</tr>
<tr>
<th>use_bricks</th>
<td><p>Array of brick sizes to use in mosaic. Defaults to <code><a href='https://www.rdocumentation.org/packages/base/topics/c'>c('4x2', '2x2', '3x1', '2x1', '1x1')</a></code>`.</p></td>
<td><p>Array of brick sizes to use in mosaic. Defaults to <code><a href='https://rdrr.io/r/base/c.html'>c('4x2', '2x2', '3x1', '2x1', '1x1')</a></code>`.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>A list with element <code>Img_bricks</code> containing a data frame of the x- &amp; y-coordinates, R, G, B channels, and brick ID. Other helper elements.</p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,16 +43,16 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Cartesian coordinates for bricks - ggplot2 extension — coord_brick" />
<meta property="og:title" content="Cartesian coordinates for bricks - ggplot2 extension — coord_brick" />
<meta property="og:description" content="A fixed scale coordinate system that ensures correct brick proportions are maintained regardless of device size.
Use coord_brick_flip() for horizontal bars." />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -59,6 +63,7 @@ Use coord_brick_flip() for horizontal bars." />
<![endif]-->
</head>
<body>
@@ -75,7 +80,7 @@ Use coord_brick_flip() for horizontal bars." />
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -83,7 +88,7 @@ Use coord_brick_flip() for horizontal bars." />
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -118,11 +123,10 @@ Use coord_brick_flip() for horizontal bars." />
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -133,6 +137,7 @@ Use coord_brick_flip() for horizontal bars." />
</div><!--/.navbar -->
</header>
<div class="row">
@@ -144,17 +149,15 @@ Use coord_brick_flip() for horizontal bars." />
</div>
<div class="ref-description">
<p>A fixed scale coordinate system that ensures correct brick proportions are maintained regardless of device size.
Use <code>coord_brick_flip()</code> for horizontal bars.</p>
</div>
<pre class="usage"><span class='fu'>coord_brick</span>(<span class='kw'>xlim</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>expand</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>clip</span> <span class='kw'>=</span> <span class='st'>"on"</span>)
<span class='fu'>coord_brick_flip</span>(<span class='kw'>xlim</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>ylim</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>expand</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>,
<span class='kw'>clip</span> <span class='kw'>=</span> <span class='st'>"on"</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
@@ -184,18 +187,17 @@ limits, then those data points may show up in places such as the axes, the
legend, the plot title, or the plot margins.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other Graphs: <code><a href='geom_brick_col.html'>geom_brick_col</a></code>,
<code><a href='geom_brick_rect.html'>geom_brick_rect</a></code>,
<code><a href='scale_fill_brick.html'>scale_fill_brick</a></code>, <code><a href='theme_brick.html'>theme_brick</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'>#geom_brick_col should be used in conjunction with other brickr charting </span>
<span class='co'>#functions, especially coord_brick.</span>
<span class='no'>df</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/data.frame'>data.frame</a></span>(<span class='kw'>trt</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"a"</span>, <span class='st'>"b"</span>, <span class='st'>"c"</span>), <span class='kw'>outcome</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>2.3</span>, <span class='fl'>1.9</span>, <span class='fl'>3.2</span>))
<span class='no'>df</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></span>(<span class='kw'>trt</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"a"</span>, <span class='st'>"b"</span>, <span class='st'>"c"</span>), <span class='kw'>outcome</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>2.3</span>, <span class='fl'>1.9</span>, <span class='fl'>3.2</span>))
<span class='fu'>ggplot</span>(<span class='no'>df</span>, <span class='fu'>aes</span>(<span class='no'>trt</span>, <span class='no'>outcome</span>)) +
<span class='fu'><a href='geom_brick_col.html'>geom_brick_col</a></span>(<span class='fu'>aes</span>(<span class='kw'>fill</span> <span class='kw'>=</span> <span class='no'>trt</span>)) +
<span class='fu'>coord_brick</span>()</div><div class='img'><img src='coord-brick-1.png' alt='' width='700' height='433' /></div><div class='input'>
@@ -208,28 +210,30 @@ legend, the plot title, or the plot margins.</p></td>
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#see-also">See also</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,16 +43,16 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Bar charts with bricks - ggplot2 extension — geom_brick_col" />
<meta property="og:title" content="Bar charts with bricks - ggplot2 extension — geom_brick_col" />
<meta property="og:description" content="geom_brick_col() is the brickr version of ggplot2::geom_col().
Bar height is determined by values in the data using the y aesthetic. With the exception of fill, aesthetics available in ggplot2::geom_col() are generally not enabled here." />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -59,6 +63,7 @@ Bar height is determined by values in the data using the y aesthetic. With the e
<![endif]-->
</head>
<body>
@@ -75,7 +80,7 @@ Bar height is determined by values in the data using the y aesthetic. With the e
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -83,7 +88,7 @@ Bar height is determined by values in the data using the y aesthetic. With the e
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -118,11 +123,10 @@ Bar height is determined by values in the data using the y aesthetic. With the e
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -133,6 +137,7 @@ Bar height is determined by values in the data using the y aesthetic. With the e
</div><!--/.navbar -->
</header>
<div class="row">
@@ -144,17 +149,15 @@ Bar height is determined by values in the data using the y aesthetic. With the e
</div>
<div class="ref-description">
<p><code>geom_brick_col()</code> is the <code>brickr</code> version of <code><a href='https://ggplot2.tidyverse.org/reference/geom_bar.html'>ggplot2::geom_col()</a></code>.
Bar height is determined by values in the data using the <code>y</code> aesthetic. With the exception of <code>fill</code>, aesthetics available in <code><a href='https://ggplot2.tidyverse.org/reference/geom_bar.html'>ggplot2::geom_col()</a></code> are generally not enabled here.</p>
</div>
<pre class="usage"><span class='fu'>geom_brick_col</span>(<span class='kw'>mapping</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>position</span> <span class='kw'>=</span> <span class='st'>"dodge"</span>,
<span class='kw'>two_knob</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>split_bricks</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>min_radius_for_text</span> <span class='kw'>=</span> <span class='fl'>0.02</span>,
<span class='kw'>label</span> <span class='kw'>=</span> <span class='st'>"brickr"</span>, <span class='kw'>label_scale</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='no'>...</span>, <span class='kw'>width</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>na.rm</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>show.legend</span> <span class='kw'>=</span> <span class='fl'>NA</span>, <span class='kw'>inherit.aes</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
@@ -237,18 +240,17 @@ that define both data and aesthetics and shouldn't inherit behaviour from
the default plot specification, e.g. <code>borders()</code>.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other Graphs: <code><a href='coord-brick.html'>coord_brick</a></code>,
<code><a href='geom_brick_rect.html'>geom_brick_rect</a></code>,
<code><a href='scale_fill_brick.html'>scale_fill_brick</a></code>, <code><a href='theme_brick.html'>theme_brick</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='co'>#geom_brick_col should be used in conjunction with other brickr charting </span>
<span class='co'>#functions, especially coord_brick.</span>
<span class='no'>df</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/data.frame'>data.frame</a></span>(<span class='kw'>trt</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"a"</span>, <span class='st'>"b"</span>, <span class='st'>"c"</span>), <span class='kw'>outcome</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>2.3</span>, <span class='fl'>1.9</span>, <span class='fl'>3.2</span>))
<span class='no'>df</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></span>(<span class='kw'>trt</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"a"</span>, <span class='st'>"b"</span>, <span class='st'>"c"</span>), <span class='kw'>outcome</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>2.3</span>, <span class='fl'>1.9</span>, <span class='fl'>3.2</span>))
<span class='fu'>ggplot</span>(<span class='no'>df</span>, <span class='fu'>aes</span>(<span class='no'>trt</span>, <span class='no'>outcome</span>)) +
<span class='fu'>geom_brick_col</span>() +
<span class='fu'><a href='coord-brick.html'>coord_brick</a></span>()</div><div class='img'><img src='geom_brick_col-1.png' alt='' width='700' height='433' /></div><div class='input'>
@@ -263,28 +265,30 @@ the default plot specification, e.g. <code>borders()</code>.</p></td>
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#see-also">See also</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Tile charts as Bricks - ggplot2 extension — geom_brick_rect" />
<meta property="og:description" content="geom_rect, except bars look like LEGO(R) bricks." />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,9 +148,7 @@
</div>
<div class="ref-description">
<p><code>geom_rect</code>, except bars look like LEGO(R) bricks.</p>
</div>
<pre class="usage"><span class='fu'>geom_brick_rect</span>(<span class='kw'>mapping</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>data</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>stat</span> <span class='kw'>=</span> <span class='st'>"identity"</span>,
@@ -153,7 +156,7 @@
<span class='kw'>simplified_threshold</span> <span class='kw'>=</span> <span class='fl'>24</span> * <span class='fl'>24</span>, <span class='kw'>label_scale</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>use_bricks</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>linejoin</span> <span class='kw'>=</span> <span class='st'>"mitre"</span>, <span class='kw'>na.rm</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>show.legend</span> <span class='kw'>=</span> <span class='fl'>NA</span>,
<span class='kw'>inherit.aes</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
@@ -209,7 +212,7 @@ to the paired geom/stat.</p></td>
</tr>
<tr>
<th>use_bricks</th>
<td><p>Array of brick sizes to use in mosaic. Defaults to <code><a href='https://www.rdocumentation.org/packages/base/topics/c'>c('4x2', '2x2', '3x1', '2x1', '1x1')</a></code>`.</p></td>
<td><p>Array of brick sizes to use in mosaic. Defaults to <code><a href='https://rdrr.io/r/base/c.html'>c('4x2', '2x2', '3x1', '2x1', '1x1')</a></code>`.</p></td>
</tr>
<tr>
<th>linejoin</th>
@@ -236,39 +239,41 @@ that define both data and aesthetics and shouldn't inherit behaviour from
the default plot specification, e.g. <code>borders()</code>.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other Graphs: <code><a href='coord-brick.html'>coord_brick</a></code>,
<code><a href='geom_brick_col.html'>geom_brick_col</a></code>,
<code><a href='scale_fill_brick.html'>scale_fill_brick</a></code>, <code><a href='theme_brick.html'>theme_brick</a></code></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#see-also">See also</a></li>
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Create a 2D LEGO mosaic from an image array — image_to_mosaic" />
<meta property="og:description" content="Create a 2D LEGO mosaic from an image array" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,27 +148,25 @@
</div>
<div class="ref-description">
<p>Create a 2D LEGO mosaic from an image array</p>
</div>
<pre class="usage"><span class='fu'>image_to_mosaic</span>(<span class='no'>img</span>, <span class='kw'>img_size</span> <span class='kw'>=</span> <span class='fl'>48</span>, <span class='kw'>color_table</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"cie94"</span>, <span class='kw'>color_palette</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"universal"</span>, <span class='st'>"generic"</span>,
<span class='kw'>method</span> <span class='kw'>=</span> <span class='st'>"cie94"</span>, <span class='kw'>color_palette</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"universal"</span>, <span class='st'>"generic"</span>,
<span class='st'>"special"</span>), <span class='kw'>dithering</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>contrast</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>use_bricks</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='kw'>brightness</span> <span class='kw'>=</span> <span class='fl'>1</span>, <span class='kw'>warhol</span> <span class='kw'>=</span> <span class='fl'>1</span>:<span class='fl'>3</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>img</th>
<td><p>Image to convert into mosaic. Usually from <code><a href='https://www.rdocumentation.org/packages/jpeg/topics/readJPEG'>jpeg::readJPEG()</a></code> or <code><a href='https://www.rdocumentation.org/packages/png/topics/readPNG'>png::readPNG()</a></code>.</p></td>
<td><p>Image to convert into mosaic. Usually from <code><a href='https://rdrr.io/pkg/jpeg/man/readJPEG.html'>jpeg::readJPEG()</a></code> or <code><a href='https://rdrr.io/pkg/png/man/readPNG.html'>png::readPNG()</a></code>.</p></td>
</tr>
<tr>
<th>img_size</th>
<td><p>Size of output image in pixel, where one pixel = one 'brick'. Use a single value (e.g. <code>48</code>) for a square image with 48 pixels on each side.
Use an array of two values for a rectangular image <code><a href='https://www.rdocumentation.org/packages/base/topics/c'>c(width, height)</a></code>.</p></td>
Use an array of two values for a rectangular image <code><a href='https://rdrr.io/r/base/c.html'>c(width, height)</a></code>.</p></td>
</tr>
<tr>
<th>color_table</th>
@@ -174,7 +177,7 @@ See attached data <code>lego_colors</code> as examples.</p></td>
<th>method</th>
<td><p>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><a href='https://www.rdocumentation.org/packages/farver/topics/compare_colour'>farver::compare_colour</a></code>.</p></td>
See <code><a href='https://rdrr.io/pkg/farver/man/compare_colour.html'>farver::compare_colour</a></code>.</p></td>
</tr>
<tr>
<th>color_palette</th>
@@ -191,7 +194,7 @@ Use "bw" for only grayscale bricks. Ignored if a <code>color_table</code> is sup
</tr>
<tr>
<th>use_bricks</th>
<td><p>Array of brick sizes to use in mosaic. Defaults to <code><a href='https://www.rdocumentation.org/packages/base/topics/c'>c('4x2', '2x2', '3x1', '2x1', '1x1')</a></code>`.</p></td>
<td><p>Array of brick sizes to use in mosaic. Defaults to <code><a href='https://rdrr.io/r/base/c.html'>c('4x2', '2x2', '3x1', '2x1', '1x1')</a></code>`.</p></td>
</tr>
<tr>
<th>brightness</th>
@@ -199,46 +202,46 @@ Use "bw" for only grayscale bricks. Ignored if a <code>color_table</code> is sup
</tr>
<tr>
<th>warhol</th>
<td><p>Array of values <code><a href='https://www.rdocumentation.org/packages/base/topics/c'>c(1, 2, 3)</a></code> associated with R, G, B color channels. Swap values in array to swap color channels for a fun visual effect.</p></td>
<td><p>Array of values <code><a href='https://rdrr.io/r/base/c.html'>c(1, 2, 3)</a></code> associated with R, G, B color channels. Swap values in array to swap color channels for a fun visual effect.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>A list with element <code>Img_lego</code> containing a data frame of the x- &amp; y-coordinates, R, G, B channels, and mapped color of each brick (pixel).</p>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other Mosaics: <code><a href='build_mosaic.html'>build_mosaic</a></code></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
<li><a href="#see-also">See also</a></li>
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Scale an image raster array to a small number of pixels. Process into a data frame. Internal function. — image_to_scaled" />
<meta property="og:description" content="Scale an image raster array to a small number of pixels. Process into a data frame. Internal function." />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,12 +148,10 @@
</div>
<div class="ref-description">
<p>Scale an image raster array to a small number of pixels. Process into a data frame. Internal function.</p>
</div>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
@@ -159,7 +162,7 @@
<tr>
<th>img_size</th>
<td><p>Size of output image in pixel, where one pixel = one 'brick'. Use a single value (e.g. <code>48</code>) for a square image with 48 pixels on each side.
Use an array of two values for a rectangular image <code><a href='https://www.rdocumentation.org/packages/base/topics/c'>c(width, height)</a></code>.</p></td>
Use an array of two values for a rectangular image <code><a href='https://rdrr.io/r/base/c.html'>c(width, height)</a></code>.</p></td>
</tr>
<tr>
<th>brightness</th>
@@ -167,40 +170,42 @@ Use an array of two values for a rectangular image <code><a href='https://www.rd
</tr>
<tr>
<th>warhol</th>
<td><p>Array of values <code><a href='https://www.rdocumentation.org/packages/base/topics/c'>c(1, 2, 3)</a></code> associated with R, G, B color channels. Swap values in array to swap color channels for a fun visual effect.</p></td>
<td><p>Array of values <code><a href='https://rdrr.io/r/base/c.html'>c(1, 2, 3)</a></code> associated with R, G, B color channels. Swap values in array to swap color channels for a fun visual effect.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>A list with element <code>Img_scaled</code> containing a data frame of the x- &amp; y-coordinates, R, G, B channels, and hex color of each brick (pixel).</p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,13 +43,14 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Function reference" />
<meta property="og:title" content="Function reference" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -56,6 +61,7 @@
<![endif]-->
</head>
<body>
@@ -72,7 +78,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -80,7 +86,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -115,11 +121,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -130,6 +135,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -208,7 +214,7 @@
<td>
<p><code><a href="build_bricks.html">build_bricks()</a></code> </p>
</td>
<td><p>Build 3D brick model with rayshader.</p></td>
<td><p>Build 3D brick model with rgl</p></td>
</tr>
</tbody><tbody>
<tr>
@@ -301,19 +307,23 @@
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Display a brickr object as a 3D model — layer_from_bricks" />
<meta property="og:description" content="Display a brickr object as a 3D model" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,14 +148,12 @@
</div>
<div class="ref-description">
<p>Display a brickr object as a 3D model</p>
</div>
<pre class="usage"><span class='fu'>layer_from_bricks</span>(<span class='no'>brick_list</span>, <span class='kw'>brick_type</span> <span class='kw'>=</span> <span class='st'>"brick"</span>, <span class='kw'>lev</span> <span class='kw'>=</span> <span class='fl'>1</span>,
<span class='kw'>brick_res</span> <span class='kw'>=</span> <span class='st'>"sd"</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
@@ -175,39 +178,41 @@ for 60px. Enter a value for a custom resolution. High resolutions take
longer to render.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>A list with elements <code>threed_elevation</code> and
<code>threed_hillshade</code> to created 3D mosiacs with the <code>rayshader</code>
package.</p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Pipe operator — %&gt;%" />
<meta property="og:description" content="See magrittr::%&amp;gt;% for details." />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,36 +148,39 @@
</div>
<div class="ref-description">
<p>See <code>magrittr::%&gt;%</code> for details.</p>
</div>
<pre class="usage"><span class='no'>lhs</span> <span class='kw'>%&gt;%</span> <span class='no'>rhs</span></pre>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Color scales for bricks - ggplot2 extension — scale_fill_brick" />
<meta property="og:description" content="brickr counterpart to ggplot2::scale_fill_discrete() to map bar colors to the palette of LEGO mold colors." />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,20 +148,18 @@
</div>
<div class="ref-description">
<p>brickr counterpart to <code><a href='https://ggplot2.tidyverse.org/reference/scale_hue.html'>ggplot2::scale_fill_discrete()</a></code> to map bar colors to the palette of LEGO mold colors.</p>
</div>
<pre class="usage"><span class='fu'>scale_fill_brick</span>(<span class='kw'>brick_theme</span> <span class='kw'>=</span> <span class='st'>"classic"</span>, <span class='no'>...</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>brick_theme</th>
<td><p>Color palette for bricks. Same as <code><a href='theme_brick.html'>brickr::theme_brick()</a></code>. Options include:
<code><a href='https://www.rdocumentation.org/packages/base/topics/c'> c("classic", "hp", "sw_light", "sw_dark", "friends", "elves",
<code><a href='https://rdrr.io/r/base/c.html'> c("classic", "hp", "sw_light", "sw_dark", "friends", "elves",
"ninja", "classy", "city", "ocean", "movie", "space",
"jurassic", "duplo", "superhero", "80s",
"rainbow7", "rainbow13", "doublerainbow", "blue")</a></code>.</p></td>
@@ -204,19 +207,19 @@ as output</p></li>
<dt>guide</dt><dd><p>A function used to create a guide or its name. See
<code>guides()</code> for more info.</p></dd>
<dt>super</dt><dd><p>The super class to use for the constructed scale</p></dd>
</dl></td>
</tr>
</table>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other Graphs: <code><a href='coord-brick.html'>coord_brick</a></code>,
<code><a href='geom_brick_col.html'>geom_brick_col</a></code>,
<code><a href='geom_brick_rect.html'>geom_brick_rect</a></code>, <code><a href='theme_brick.html'>theme_brick</a></code></p></div>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='no'>df</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/data.frame'>data.frame</a></span>(<span class='kw'>trt</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='st'>"a"</span>, <span class='st'>"b"</span>, <span class='st'>"c"</span>), <span class='kw'>outcome</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/c'>c</a></span>(<span class='fl'>2.3</span>, <span class='fl'>1.9</span>, <span class='fl'>3.2</span>))
<pre class="examples"><div class='input'><span class='no'>df</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/data.frame.html'>data.frame</a></span>(<span class='kw'>trt</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='st'>"a"</span>, <span class='st'>"b"</span>, <span class='st'>"c"</span>), <span class='kw'>outcome</span> <span class='kw'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span>(<span class='fl'>2.3</span>, <span class='fl'>1.9</span>, <span class='fl'>3.2</span>))
<span class='no'>p</span> <span class='kw'>&lt;-</span> <span class='fu'>ggplot</span>(<span class='no'>df</span>, <span class='fu'>aes</span>(<span class='no'>trt</span>, <span class='no'>outcome</span>)) +
<span class='fu'><a href='geom_brick_col.html'>geom_brick_col</a></span>(<span class='fu'>aes</span>(<span class='kw'>fill</span> <span class='kw'>=</span> <span class='no'>trt</span>)) +
<span class='fu'><a href='coord-brick.html'>coord_brick</a></span>()
@@ -232,28 +235,30 @@ as output</p></li>
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#see-also">See also</a></li>
<li><a href="#examples">Examples</a></li>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Convert image output from scale_image() to bricks — scaled_to_colors" />
<meta property="og:description" content="Convert image output from scale_image() to bricks" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,12 +148,10 @@
</div>
<div class="ref-description">
<p>Convert image output from scale_image() to bricks</p>
</div>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
@@ -160,7 +163,7 @@
<th>method</th>
<td><p>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><a href='https://www.rdocumentation.org/packages/farver/topics/compare_colour'>farver::compare_colour</a></code>.</p></td>
See <code><a href='https://rdrr.io/pkg/farver/man/compare_colour.html'>farver::compare_colour</a></code>.</p></td>
</tr>
<tr>
<th>color_table</th>
@@ -181,37 +184,39 @@ Use "bw" for only grayscale bricks. Ignored if a <code>color_table</code> is sup
<td><p>For <code>color_palette = "bw"</code>. A value &gt;1 will increase the contrast of the image while a positive value &lt;1 will decrease the contrast.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>A list with element <code>Img_lego</code> containing a data frame of the x- &amp; y-coordinates, R, G, B channels, and mapped color of each brick (pixel).</p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#value">Value</a></li>
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -15,21 +15,25 @@
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png" />
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/all.min.css" integrity="sha256-nAmazAk6vS34Xqo0BSrTb+abbtFlgsFK7NKSi6o7Y78=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.7.1/css/v4-shims.min.css" integrity="sha256-6qHlizsOWFskGlwVOKuns+D1nB6ssZrHQrNj1wGplHc=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<!-- sticky kit -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sticky-kit/1.1.3/sticky-kit.min.js" integrity="sha256-c4Rlo1ZozqTPE2RLuvbusY3+SU1pQaJC0TjuhygMipw=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/headroom.min.js" integrity="sha256-DJFC1kqIhelURkuza0AvYal5RxMtpzLjFhsnVIeuk+U=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.4/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
@@ -39,15 +43,15 @@
<link href="../extra.css" rel="stylesheet">
<meta property="og:title" content="Brick color themes - ggplot2 extension — theme_brick" />
<meta property="og:description" content="Brick color themes - ggplot2 extension" />
<meta property="og:image" content="http://brickr.org/logo.png" />
<meta name="twitter:card" content="summary" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
@@ -58,6 +62,7 @@
<![endif]-->
</head>
<body>
@@ -74,7 +79,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">brickr</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0.9024</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.2.0</span>
</span>
</div>
@@ -82,7 +87,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home fa-lg"></span>
<span class="fas fa fas fa-home fa-lg"></span>
</a>
</li>
@@ -117,11 +122,10 @@
<a href="../news/index.html">Changelog</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://github.com/ryantimpe/brickr">
<span class="fa fa-github fa-lg"></span>
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
@@ -132,6 +136,7 @@
</div><!--/.navbar -->
</header>
<div class="row">
@@ -143,59 +148,59 @@
</div>
<div class="ref-description">
<p>Brick color themes - ggplot2 extension</p>
</div>
<pre class="usage"><span class='fu'>theme_brick</span>(<span class='kw'>brick_theme</span> <span class='kw'>=</span> <span class='st'>"classic"</span>)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>brick_theme</th>
<td><p>Color palette for bricks. Same as <code>brickr::theme_brick()</code>. Options include:
<code><a href='https://www.rdocumentation.org/packages/base/topics/c'> c("classic", "hp", "sw_light", "sw_dark", "friends", "elves",
<code><a href='https://rdrr.io/r/base/c.html'> c("classic", "hp", "sw_light", "sw_dark", "friends", "elves",
"ninja", "classy", "city", "ocean", "movie", "space",
"jurassic", "duplo", "superhero", "80s",
"rainbow7", "rainbow13", "doublerainbow", "blue")</a></code>.</p></td>
</tr>
</table>
<h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>
<div class='dont-index'><p>Other Graphs: <code><a href='coord-brick.html'>coord_brick</a></code>,
<code><a href='geom_brick_col.html'>geom_brick_col</a></code>,
<code><a href='geom_brick_rect.html'>geom_brick_rect</a></code>,
<code><a href='scale_fill_brick.html'>scale_fill_brick</a></code></p></div>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
<h2>Contents</h2>
<ul class="nav nav-pills nav-stacked">
<li><a href="#arguments">Arguments</a></li>
<li><a href="#see-also">See also</a></li>
</ul>
</ul>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Ryan Timpe.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.3.0.</p>
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.4.1.</p>
</div>
</footer>
</div>
</body>
</html>

View File

@@ -27,6 +27,9 @@
<url>
<loc>http://brickr.org/reference/build_bricks.html</loc>
</url>
<url>
<loc>http://brickr.org/reference/build_bricks_rayshader.html</loc>
</url>
<url>
<loc>http://brickr.org/reference/build_colors.html</loc>
</url>