Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/javierluraschi/voxels

Interactive voxel rendering using R
https://github.com/javierluraschi/voxels

3d 3dengine interactive minecraft rstats visualization voxels

Last synced: 8 days ago
JSON representation

Interactive voxel rendering using R

Awesome Lists containing this project

README

        

---
title: "Interactive Voxels Rendering"
---

[![Build Status](https://travis-ci.org/javierluraschi/pins.svg?branch=master)](https://travis-ci.org/javierluraschi/pins) [![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/pins)](https://cran.r-project.org/package=pins) ![](https://img.shields.io/badge/lifecycle-experimental-red.svg)

The [voxels](https://github.com/javierluraschi/voxels) is under-development R package that provides interacte voxels rendering.

## Installation

Install the package as follows:

```{r eval=FALSE}
install.packages("remotes")
remotes::install_github("javierluraschi/voxels")
```

## Getting Started

You can easily launch a voxel explorer and editor,

```{r fig.height=7, fig.width=9}
voxels::voxels()
```

pass your own 3D matrix to render voxels from it,

```{r fig.width=9}
voxels::voxels(array(c(
0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1,
0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1,
0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1,
0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1,
0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1,
1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
), dim=c(19, 5, 2)), offset = c(-10, 0, 0))
```

or use many interesting R packages to perform interactive visualizations. For instance, we can add some perlin noise to simulate terrain generation:

```{r fig.width=9}
library(magrittr)
set.seed(123245)

ceiling(ambient::noise_perlin(c(20, 6, 20)) * 10) %>%
voxels::voxels(offset = c(-20, 0, -20))
```

Please note that this package is still under-development!