Skip to content

A workshop in Rust programming using the graphics library Nannou

Notifications You must be signed in to change notification settings

Kodeworks/rust-nannou-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workshop in Rust using Nannou

Welcome to our workshop in Rust and graphics programming with Nannou! 😀

Rocket option

First of all: In the workshop material in this repo there is a lot of written material and a set of exercises. We don't expect you read every single thing written in this material. Neither we don't expect you to solve every exercise.

In fact, we would rather you skip over explanations the moment you feel that it is too much, and jump onto the next exercise. The explanation are there for you, only if it is interesting for you to understand the concepts that are explained.

If you are stuck an exercise, just go ahead and look at the suggestion for solving it.

If not, just røcket-øutta-there and continue onto what you find is more fun.

🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀

The documents, recurrent symbols, emojis and their meanings

The text and exercises are written in Markdown. We reccomend that you read them either using preview mode in VSCode, or reading them on the Github webpage. If some links are not working, or something is wrong somewhere somehow for some reason, please let us know and we'll help you.

You will see many places that text is hidden with the symbol ►. This is used to hide tips, long sections of text, and answers/suggestions to the exercises.

Click here to reveal... ㊙㊙㊙...the secrets within...㊙㊙㊙

🎯 Learning goal

📜 Exercises

💡 Tips for solving exercises

📎 A helpful note

🙈 Suggestion for solutions to exercises

🎉 A cause for celebration! Pat your self on the shoulder, you have completed an exercise and hopefully learned somthing new, while having fun.

Your task

Today your task will be one thing and one thing only: To have fun with Rust and graphics programming.

We'll try our best to make this happen.

If you are experienced with graphics programming or Rust, or if this is the first time you have ever set your eyes on either of these topics, we will try to create a space for you too learn, play around and experiment. We want to fascilitate an open and inclusive learning environment, so no questions are stupid and too simple.

The library we will be using today is Nannou, a graphics library that is comparable to projects such as Processing, openFrameworks, and p5.js. The goal of these types of libraries is to make it easier to get up and running with graphics programming. Setting up a graphics systems can be quite complex, involving hundreds of lines of configuring your graphics pipeline before you can get that first triangle onto the screen. Sometimes you just want to sketch out some ideas and have fun with it, and this is where libraries like these come in handy.

The Nannou library is most used for digital art, such as the animations you see below. As the graphics programming world is huge and complex, with 2D, 3D, modelling, shaders, physics models etc. etc. we of course won't have time to cover the whole spectrum of things. So our focus will be on 2D graphics, based on some basic techniques that--when combined--can create surprinsingly complex results. But if you have questions regarding other possibilities with graphics programming we are more than happy to discuss that. At Kodeworks we have a lot of different areas of expertice among the developers working here, so we'll try our best to give you pointers, suggestions, and answers should something come up in our discussions.

Outline of the workshop

Today we will go through three sketches in Nannou and build them step-by-step. Along the way we will touch upon several topics about the Rust programming language. Some of these topic can be quite challenging to wrap your head around in the beginning, so don't worry if you struggle with the concepts. If something is not completely clear, feel free to move on to the next.

  • 🌐 Part 1: Basic graphics with circles and lines
    • We will recreate a classic generative art work by John Whitney, as seen in this video
  • ❄️ Part 2: Veiled kaleidoscope
    • Kaleidoscope effects is an effective way to create interesting symmetric structures. By mirroring shapes and colors along angles you get images that can be quite interesting.
  • 🌊 Part 3: Perlin noise flow fields
    • Perlin noise is a very interesting noise type that is used a lot in computer graphics and digital computer art. With this you can create natural-looking flow patterns, reminiscent of how fluids and gases disperse.

What can happen during the workshop

As we are churning through the material, you may find yourself wanting to do one or more of these things:

  • Go through the sketches and do the exercises one by one.
    • 👌 This is a good thing!
  • Stick to one of the sketches and play around with it. Testing out your own ideas, changing parameters, adding elements etc.
    • 👌 This is a good thing!
  • Ween of into a rabbit hole-like quest into how do something completely different than what's in the workshop material.
    • Either you have gotten a specific idea that you want to implement using Rust and Nannou, or you have found another example in the list of official examples that you find interesting.
    • 👌 This is a good thing!
  • Go into full blown Rust programming fascination-mode and try to find out something about a language related topic.
    • 👌 This is a good thing!
  • Immerse yourself in the official examples that come with the Nannou repo.
    • 👌 This is a good thing!

All good things, just remember your main task: To have fun! 😎

Let's get started! Full steam ahead to: Part 1: Basic graphics with circles and lines 🚂

About

A workshop in Rust programming using the graphics library Nannou

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages