Building a procedural art generator 🦀 Learn Rust Creatively
Channel: timClicks
Date: 20/04/2024

#rustlang  #procgen #programming #generativeart #generative 

Make some time to relax, with this Rust tutorial to build a bitfield procedural art generator, originally recorded as a live stream. I'll show you how to create a clone of Bit Art Bot (https://lnkd.in/gbcKT3U9), which generates bit-field patterns of integer functions. This will involve describing what the term "integer function" means, explaining how to use arrays in the Rust programming language and describe image formats. The core of the application be showing you how to randomly generate a tree of functions, then render them. Hopefully there will even be time to create an interactive application.

Come and learn how to program in Rust with this interactive tutorial! Support me on Patreon to enable more videos! https://www.patreon.com/timClicks

Timeline:
00:00:00 Intro and Welcome
00:06:25 Using deterministic functions
00:11:36 Idomatic Rust for creating a 2D array
00:16:40 Mapping from function space to pixel colours
00:30:35 Replicating the original image
00:35:23 Which web framework? Actix vs Axum
00:36:06 Generating more images
00:37:07 Generating Sierpinksi triangles
00:42:04 Randomly generating trees of mathematical expressions 
00:52:56 Evaluating expressions
00:55:20 Adding support for X and Y
01:00:00 Filling in the owl
01:42:54 Success! A nice procedurally generated pattern
01:43:20 Wrapping up; Inviting questions

📚 Resources:
Code: https://github.com/timclicks/tutorials

🦀 Rust resources:
https://timclicks.dev
- Rust Documentation: https://doc.rust-lang.org/book/
- Rust Playground: https://play.rust-lang.org/
- Rust in Action (Tim's book!) https://mng.bz/4MlD
- How to Learn Rust (online course!) https://learning.accelerant.dev/how-to-learn-rust

👋 Let's connect
https://www.youtube.com/c/timClicks?sub_confirmation=1
https://twitter.com/timClicks
https://github.com/timClicks
https://mastodon.nz/@timClicks
https://dev.to/timclicks/
https://www.patreon.com/timClicks
https://www.linkedin.com/in/timmcnamaranz/

🔔 Subscribe to the channel and click the bell icon to stay updated with the latest videos and live streams from timClicks: https://www.youtube.com/timClicks?sub_confirmation=1

👍 Please like this video if you found it helpful, and share it with your friends who are also interested in Rust programming.