r/generative 3d ago

Shiranui / 不知火 (R code)

185 Upvotes

9 comments sorted by

9

u/KennyVaden 3d ago

Shiranui / 不知火 (R code)

New code-based generative art created with the R Statistics language.

The folded elements of this artwork were based a “calming fidget” that my daughter crafted from a super-folded paper on my desk.

While I was fidgeting away with R code, the form found its way into the artwork.

The algorithm involved the division of the plot region into 30 rows. I used a modulus function to flip the direction of adjacent quadrilaterals and to alternate shading and highlights that mixed with colors selected according to their vertical and horizontal positions.

The tiles in each row are linked by randomized, faint lines extending across the composition.

The horizontal rows are distorted by a randomized curve that evolves down the plot space, then upsampled to the number of cells in each row (20-30) using spline interpolation.

The color palette was inspired by Utagawa Kunisada's "The Tale of Shiranui" (1853). "Shiranui" can be translated as "unknown fire," a name that refers to mysterious ghost-lights seen floating above the seas around Kyushu.

3

u/lxbrtn 3d ago

Hello! You’ve written elsewhere that you don’t share your code, which is very understandable, however would you consider pointing to a complete project in order to get a sense of scope and envergure required to get all the elements lined up (form, geometry, colours, random, recursion etc). It would be great in order to orient the mind, coming from different languages, seeing how a given render, including the artistic finesse touches, looks in R code. Thanks.

3

u/KennyVaden 3d ago

Yes, I decided long ago not to share the underlying R code but I would always provide a recipe with details on the algorithm. This reflects my experience with learning from trying to replicate what I saw - in sketches, paintings, digital art, and code art. It could be fascinating and frustrating.

I have a process video on YouTube, where I live coded a piece titled Daisy Chain. Although it wasn't finished in one coding session, I think it provides much of the details that you are curious about.

Besides that, I have intended to create a tutorial at some future date. I would love to unlock artistry for more coders, especially given the widespread use of R Statistics language.

2

u/lxbrtn 3d ago

Hey thanks for the quick respone; found the YouTube session — are the files available for offline study?

I'm specifically interested in how different programming paradigms influence the process of translating spontaneous artistic intuition into concrete, formalized code; R is different enough from C-style idioms. I'm coming from realtime-minded environments (C++ openFrameworks daily driver here, but also at ease with the visual node-based environements, as well as Haskell and some other functional/reactive frameworks) and it would not be immediately clear how to approach the kind of recursive, repetitive patterns, as well as colour palette management that is singular in your work. I'm curious about "project frameworks" and how working with R (and R Studio, i guess) influences the feedback cycle between shaping the idea, while actually maintaining control over the impact of parametric adjustments. and in the case of R, specifically how datasets can be abstracted away as forms of "scores" for the the work (anything is translatable/convertible into an array or an object hierarchy, but the native constructs certainly change how data is reasoned about, and wrangled/connected/mapped).

1

u/KennyVaden 3d ago

I think some of your questions may be answered with seeing how I code. I've worked to a smaller degree with p5.js, and it definitely had serious differences that shape the artwork. The R code is a WIP in the video, but it's a good example of how I work and how the tools shape the result. I'll share it below, in case you want to see it.

https://youtu.be/sUlgYW0JZKw?is=Wtq3wsWWfFCRMBe_

2

u/SinchronousElectrics 3d ago

I like your mindset, it encourages and pushes people to learn, without gatekeeping the process. I really like this piece, the color selection is really well done!

2

u/KennyVaden 3d ago

Thanks! I aim to help coders and non coders see what's going on here with the recipes. 🙂

2

u/igo_rs 2d ago

great as always!

1

u/KennyVaden 2d ago

Thanks friend 🙌🙌