►
From YouTube: Rust Linz, May 2021 - Lisa Passing - Creative Rust
Description
We use programs to automate tasks or solve specific problems for us. Too seldomly we use it to create art or simply write playful programs just for the fun of it. How do you write creative code in Rust? I'm so glad you asked! We'll take a look at some algorithms and tricks in the creative coding toolbox to get you started and use the nannou library to make them a (digital) reality.
About Lisa Passing
Lisa is a Berlin-based creative technologist, artist, and researcher. Her main obsessions are playful interactions with computers and creative uses of civic tech and data.
Rust Linz at https://rust-linz.at
Twitter: https://twitter.com/rustlinz
Speak at Rust Linz: https://sessionize.com/rust-linz
A
Okay,
so
this
is
creative
rust.
I'm
super
glad
to
be
here.
Thank
you
very
much
just
really
quickly
about
me,
because
I
actually
do
have
a
lot
of
talking
to
do,
but
when
I
get
this
out
of
the
way
I'm
lisa
or
lisless,
if
you
like,
want
to
search
for
me
online,
this
is
probably
the
name
you
want
to
search
for
and
I'm
a
creative
technologist
based
in
berlin.
What
does
creative
technologists
mean?
A
That's
a
very
good
question,
I'm
still
struggling
with
like
a
good
definition,
but
I
like
to
think
of
it
as
like,
finding
solutions
to
more
creative
problems
and
not
maybe
like
your
everyday
day-to-day
kind
of
technical
problems,
but
let's
see
how
that
goes
in
the
future.
I'm
still
pretty
new
to
it,
and
obviously
I
like
rust
and
like
these
things
together
combined,
are
more
than
enough
reason
for
me
to
talk
about
creative
coding
in
rust.
A
Since
this
is
a
rust
meetup,
I
don't
think
I
have
to
do
like
any
language
evangelism
and
instead
I
can
focus
on
creative
coding,
which
might
be
something
that
not
a
lot
of
people
are
like
everybody
is
familiar
with,
and
it's
also
like
a
very
a
broad
field.
There's
a
lot
of
things
that
go
into
it.
A
So
I
like
want
to
take
a
couple
of
minutes
in
the
beginning
to
yeah
kind
of
like
look
at
the
different
parts
that
make
up
the
world
of
creative
coding,
because
I
think
it's
super
exciting
or
like
at
least
it's
very
exciting.
To
me.
A
Let's
start
with
a
quote
or
a
definition,
because
it's
always
a
good
place
to
start
so
wikipedia
says
that
creative
coding
is
basically
about
creating
something
that
is
expressive
instead
of
something
that
is
functional,
and
I
really
really
really
like
this,
because
it
already
it
liberates
us
from
this
idea
of
that
we
have
to
code,
something
that
runs
and
that
works,
and
that,
like
it
has
to
it,
has
this
like
a
single
purpose,
and
if
the
code
doesn't
run,
it's
useless
and
creative
coding
says
like
whatever.
A
As
long
as
like
it
is
as
long
as
it
expresses
a
an
experience
or
a
feeling
or
anything
you
want
to
express,
you
have
creative
coded,
and
I
think
this
is
already
like.
Okay,
we're
free
to
do
whatever
we
want,
and
this
is,
I
can
already.
B
A
Like
I
can
like
breathe
more
freely
after
knowing
this,
so
there
are
no
mistakes.
Perfect.
Aside
from
like
this
more
like
a
headspace
that
I
really
like
about
creative
coding,
there's,
obviously
a
lot
of
very
fascinating
and
cool
technology
that
we
get
to
play
with.
If
you
want
to
like
dig
deeper
into
creative
coding,
and
I
had
a
lot
like
a
hard
time
in
the
beginning
as
well
like
wrapping
my
head
around
okay,
what
are
all
the
parts
that
make
up
creative
coding
and
what
is
all
the
things
that
interesting?
A
That
is
interesting,
and
that
is
like
interesting
for
me
specifically,
and
the
list
that
you
see
is
compiled
from
from
a
little
diagram,
but
that
I,
like
I
came
across
when
I
watched
the
webinar
by
luis
ferreira,
and
I
thought
this
is
really
cool,
because
it
kind
of
like
maps
out
the
different
areas
quite
nicely,
and
I
want
to
give
you
a
little
like
whirlwind
tour
of
the
things
here
on
the
list,
because
if
you
deal
with
creative
coding,
you
can
work
with
artificial
intelligence,
especially
like
things
like
generative,
adversarial
networks
or
gans
are
things
that,
like
constantly
blow
my
mind
like
these,
like
more
like
anatomical
like
nature,
inspired
like
things
that
sofia
crespo
generates
and
there's
this
entire
like
realm
of
physical
computing,
where
you
get
to
play
with
sensors
and
motors
like
taking
inputs
from
the
environment
and
then
like
act
out
on
the
environment
or
things
like
pen
plotters
or
anything
that
makes
like
it
makes
its
way
from
the
digital
back
into
like
the
physical
realm.
A
It's
super
exciting
electronics
is
like
a
big
part
of
like
what
I
spent
a
lot
of
my
free
time
on,
but
there's
also
like
other
cool
stuff
in
the
more
like
audio-visual,
like
actual
performance
performing
in
front
of
people
thing
as
an
example,
I
picked
like
life
coding
or
algorithm,
where
you
can
code
music,
you
can
like
have
actual
musicians
like
perform
with
you
on
stage
and
like
it's,
it's
really
so
much
to
do
and
so
much
to
see
all
the
way
up
to
to
light
art.
A
I
picked
as
an
example
projection
mapping
where
you
can
write
visuals
and
like
code
like
project
imagery
onto
buildings
or
facades
and
like
make
it
match
the
the
actual
architecture
you
can
have
this
like
animated
or
like
also
interactive,
and
it's
like
really
it's
so
cool
when
you
stand
in
front
of
it,
and
you
know
that,
like
people
made
this
and
like
interact
like
digitally
with
like
things
that
exist
in
the
real
world,
okay,
I
just
like
throw
a
lot
of
things
on
to
you.
A
So
just
you
have
like
at
least
one
image
in
your
head
for
all
of
these
points,
but
the
main
part
that
I
want
to
like
dig
a
little
bit
deeper
here
is
the
generative
art
stuff.
It's
also,
I
think,
like
the
easiest
to
get
started
with,
because
you
don't
need
a
lot
of
like
equipment
or
like
anything
else,
you
don't
need
the
hardware.
You
don't
need
buildings
to
project
things
onto
what
you
need.
A
Is
your
computer,
perfect,
so
generative
art,
so
we
from
all
of
creative
coding,
vernon
like
generative
art
and
there's
also
like
a
lot
of
stuff
like
a
lot
of
areas
within
generative
art
that
you
can
look
at
like
it's.
It's
really
just
like
it
can
be
data
driven.
It
can
be
real
time.
There's
a
lot
lots
of
things
that
are
that
are
happening,
but
it's
like
again
a
little
definition,
maybe
to
work
with
like
what
does
generative
art
even
mean
when
we
talk
about
genre
of
art.
A
We
talk
about
art
that
is
created
by
a
system
with
where
the
system
has
some
like
some
level
of
autonomy
or
like
the
the
artist,
does
not
intervene
directly
in
a
way
with
the
the
art
that
is
being
produced,
because
the
artist
in
like
the
world
of
like
janet
fart
is
the
person
that
designs
the
system
or
lays
down
the
rules
and
by
which
the
system
then
generates
the
art.
So
we
have
this
kind
of
like
rule
system
and
then
like
this
based
on
these
rules.
A
Art
is
created
and
we
define
the
rules.
So
this
is
really
cool.
Let's
look
at
some
examples,
because
generative
art
is
not
just
computer
visual
art,
the
way
that
we
will
do
it
later,
but
it
has
or
is
applied
in
lots
of
different
fields,
for
example,
architecture.
A
A
Here
I
have
an
example
from
a
french
from
a
french
collective
that
already
generated
basically
generated
a
poetry
back
in
the
60s
and
the
way
that
they
wrote,
10,
sonnets
and
but
like
cut
out
the
individual
lines
of
the
sonnet
and
put
it
in
a
in
a
book.
And
when
you
open
the
book,
the
individual
lines
in
the
port
would
like
just
like
open
in
in
a
random
way.
A
When,
once
you
open
the
book
and
what
you
get
is
a
randomly
generated
sonnet
and
since
they
had
like
10
sonnets
and
it
just
like,
varied
like
it
was
completely
random
at
which
they
and
which
order
these
lines
would
fall.
So
they
basically
already
generated
poetry
in
the
60s
without
computer
purely
like
analog,
and
I
think
this
is
really
cool,
because
we
still
have
our
within
the
realm
of
this,
where
the
artist
just
gives
to
you
the
rules.
A
And
then
the
system
follows
the
rules
and
generates
the
art
for
you.
We
also
have
like
generative
art
in
music,
maybe
most
famously
brian
eno
and
the
music
for
airports,
which
is
very
ambient,
slow,
sound.
A
But
again
he
just
said
like
the
stage
of
like
here's,
the
rules
by
which
the
system
then
determines
which
note
is
played
next,
and
this
could
actually
be
played
until
like
forever
and
ever
in
infinity,
and
this
was
like
already
in
the
70s,
which
I
also
think
is
like
cool
there's
so
much
history.
There
already
and
then,
like
a
more
recent
example
of
like
more
like
the
visual
odd
stuff
that
you
probably
like
or
maybe
see,
on
social
media
or
something
yeah.
A
I
picked
some
like
imageries
from
an
artist
called
monologue
who
posts
like
on
instagram
and
twitter.
I
think-
and
this
is
just
a
screenshot
of
his
behance
page
and
some
like
really
cool
stuff.
You
can
see
like
how
he's
like
trying
to
imitate
brush,
strokes
and
stuff,
and
it's
so
fascinating,
and
it's
really
really
cool,
and
I
thought
it's
like
this
is
like
more
into
the
direction
that
I
want
to
get,
even
though
we
will
not
get
as
fancy
sorry
time
limits
and
stuff.
A
But
I
like
chose
these
examples
to
be
a
little
bit
all
over
the
place
on
purpose
because
they
have
this.
I
wanna
get
this
feeling
across
that
we
can
definitely
like
learn
from
what
came
before
us
because
we
have
in
so
maybe
one
step
back
if
we
free
ourselves
from
this,
like
idea
that
we
write
code,
that
has
to
solve
a
specific
problem
and
it
has
to
be
functional,
we
have
to
like
think
of
like
okay.
A
It
has
to
work
now,
and
this
is
like
what
the
thing
that
we
code
for,
but
in
a
more
creative
and
expressive
environment,
we
can
maybe
say,
hey
the
output
or
the
feeling
and
the
sentiment,
and
what
we
created
is
more
important
than
the
tech
that
we
used
for
it
or
that
we
don't
have
to
ensure
that
it
keeps
running
forever
as
long
as
like
it
ran,
maybe
once
and
it
created
something
or
it
never
ends,
because
maybe
we
do
an
art
installation
about
error
messages
and
then
the
pointers
that
never
ran
or
something
along
those
lines-
and
I,
like
the
other
part,
is
that
I
think
it's
so
cool
so
like
why
I
also
picked
some
stuff
from
like
70s
or
60s.
A
Is
that
I
feel
like
there's
more
history
to
what
we
do
than
usually
in
tech?
Usually
it's
like.
Oh,
this
framework
is
already
three
years
old,
wow,
it's
so
mature,
but
like
with
art,
we
have
this
like.
We
have
this
context
of
like
yeah
culture,
in
a
way
already
that
we
can
say
it's
like.
Okay.
People
have
done
this
like
50
years
ago,
and
I
really
enjoyed
this
this
way
of
thinking
of
like
not
everything
we
do
is
new.
A
A
But
that
being
said,
I
want
to
talk
about
the
person
that
really
inspired
me
in
the
last
couple
of
weeks,
which
is
who
is
vera
monar,
and
she
gets
the
super
cool
title
on
wikipedia
whoops
pioneer
of
computer
art,
which
is
like
yes,
if
you,
if
you
get
that
title,
I'm
like
wow,
you've
done
it
and
she
is
really
cool.
A
She
was
born
in
1924
and
she's
still
alive,
and
she
is
still
working
at
like
almost
100
years
of
age,
which
is
mind-blowing,
like
definitely
life
goals
to
achieve
there,
and
she
was
born
in
hungary,
where
she
studied
like
art
and
art
history,
so
she's
like
an
actual
like
classical
or
classically
trained
artist,
but
then
in
the
50s
and
60s
she
moved
to
paris
where
she
thought
of
this.
A
The
system
by
which
she
started
to
create
art,
which
she
called
me
imaginar,
which
is
basically
exactly
generative
art,
so
she's.
First,
she
thought
of
like
a
rule
system,
for
example
a
certain
grid
and
certain
colors,
and
then
certain
rules
by
which
these
were
like
applied
and
then
created
art
based
on
the
rules
that
she
first
thought
of
so
like
basically
generative
art
except
you
didn't,
have
a
computer.
A
But
then,
once
in
the
60s
late
60s
computers
were
kind
of
more
available-ish,
at
least
to
some
people.
The
first
thing
that
she
did
was
make
art
with
it
really
really
cool
like
a
real
like
pioneer
and
what
is
also
cool,
I
think,
is
already
not
only
that
she
started
making
art
but
the
way
she
she
brought.
A
The
art,
like
the
computer
generated
stuff
back
into
the
real
world,
is
through
the
use
of
pen
plotters,
so
you
get
like
actual
pens,
drawing
the
the
generated
art
and
you
have
get
this
kind
of
like
yes,
the
computer
thought
of
these
these
forms,
but
you
get
this
like
actual
ink
on
paper
kind
of
real
world
physical,
tangible
experience,
which
is
really
really
cool
and
she's
already
like
in
this,
like,
if
you
remember
the
the
creative
coding
techniques
in
the
beginning,
she's
already
like
combining
like
the
physical
computing
part,
which
is
pen
flutters,
with
like
her
generative
art
already
crossing
through
all
the
sections
that
we
that
we
get.
A
So
this
is
already
super
exciting.
I'm
really
really
really
so
in
love
with
her
and
the
the
work
that
she
did.
Let's
look
at
some
examples,
so
one
of
her
earlier
works.
Here's
interruptions
which
already
did
in
the
late
60s
and
I
think
it's
just
super
timeless.
This
is
like
something
that
is
just
so
cool
like
the
it's
really
simple,
and
it
could
still
be
something
that
people
would
generate
today
or
think
of
like
okay.
How
can
I
like?
A
How
can
I
write
a
system
that
generates
this
kind
of
output,
very
cool?
Another
famous
one
of
her
of
her
works
is
like
is
like
is
called
disorder.
A
Sorry,
like
french
native
speakers,
which
is
like
a
series
of
like
where
she
really
looks
into
like
this
random
rectangles
on
grits
kind
of
thing-
and
this
is
also
like
a
very
famous
example
that
you
see
often
in
if
you
look
into
tutorials
on
creative
coding
or
like
where
to
get
started,
is
like
this
idea
of
figuring
out.
What's
what
people
did?
Who
who
done
this?
Who
have
done
this
like
decades
ago?
A
So
this
artist
is
a
pretty
good
one
and
then
like
from
the
80s,
there's
another
like
pen,
plotter
print.
Here,
it's
called
like
from
a
from
a
series
called
or
square
structures,
and
when
I
saw
this,
I
was
really
like.
This
is
kind
of
like
really
cool
like
it.
This
one
really
spoke
to
me
on
some
level.
I'm
not
really,
I'm
not
really
sure
why.
But
I
decided
that
this
should
be
the
piece
that
maybe
we
can
look
at
together
and
see
how
we
can
implement
something
like
that
in
rest.
A
So
now
that
I
like,
through
a
bunch
of
words
and
pictures
and
like
a
whole
lot
of
input
into
y'all's
faces,
let's
talk
a
little
about
rust
and
creative
coding
and
rust.
I
want
to
use
a
tool
or
like
a
framework
that
is
called
nanu.
A
It's
probably
the
most
mature
creative
coding
framework
written
in
rust
right
now,
at
least
that
I'm
aware
of,
and
it's
really
cool,
because
it's
it's
it's
fairly
young,
but
it
like
learned
a
lot
from,
like
the
other
creative
coding
frameworks
out
there
like
processing
or
open
frameworks,
but
also
making
some
decisions
that
are
very
like
future
oriented
in
a
way.
A
So
I'm
like
very
excited
about,
like
all
the
features
that
are
still
to
come,
but
it's
already
like
in
a
super
usable
place
right
now,
which
is
why
we're
gonna
use
it.
So
the
plan
is
taking
this
piece
square
structures
by
ramuna
and
trying
to
implement
something
like
recoded
in
the
new.
A
So
we
should
make
a
plan.
Okay,
so
let's
assume
that
we're
new
to
nanu
and
we
don't
really
know
what
we're
up
for
so.
The
first
thing
I
would
look
is
like
what
we
have.
The
new
has
a
template
that
we
can
use.
We
can
check
it
out,
get
a
little
bit
familiar
with
the
idea
and
the
structure
and
everything.
A
Then
obviously
we
have
to
find
out
or
figure
out
how
we
can
draw
a
random
rectangle,
because
this
is,
if
you
look
at
the
thing
we
have
like
recta.
If
you
look
at
the
original
image,
we
have
a
rectangle
that
is
made
up
of
a
grad
of
various
random
rectangles
and
different
colors.
A
So
first
we
figure
out
how
to
draw
one
rectangle.
Then
we
need
to
figure
out
how
to
draw
a
grid
of
random
rectangles.
I
would
choose
picking
colors
next,
but
that's
just
my
preference.
A
This
step
could
probably
also
go
at
the
beginning
or
at
the
very
end,
and
then
I
would
say
so,
assuming
that
first
we
start
just
a
grid
of
a
rectangle
each
then
assign
the
colors
and
then
per
position
in
this
grid.
I
want
to
try.
A
Oh,
I
want
to
draw
multiple
iterations
or
like
multiple
versions
of
or
like
well
just
multiple
rectangles
in
the
same
position
on
top
of
each
other,
and
then
I
actually
want
to
add
some
interactions,
because
I
really
like
playing
with
the
stuff
like
not
just
like
generated
once
the
way
you
would
do
it
and
then
print
it
or
plot
it
out,
but
we
have
like,
since
we're
staying
digital
total
for
now
have
the
opportunity
to
to
play
with
things
just
like
play
with
the
parameters
and
like
have
a
little
bit
of
fun
with
it,
because
that's
the
point
having
fun
and
learning
stuff.
A
Okay
with
that
being
said,
let's
draw
some
squares
and
I
have
a
slide
intentionally
left
blank.
So
I
have
time
to
switch
over
to
other
stuff
here.
A
Okay,
so
these
examples
that
I'm
going
to
show
you
they're
already
online
on
github
in
the
repository
that
to
get
there's
the
slides
that
I
showed
you
or
they're
already
online
and
these
examples
with
each
step
that
I'm
going
through
in
the
in
a
separate
file.
A
So
you
can
like
with
comments
and
there's
also
read
me
so
if
you
want
to
like
if
this
is
all
very
fast-
and
I
realize
it's
very
fast-
you
can
like
read
through
everything
at
your
own
pace
later
on,
and
hopefully
it
all
works
for
you.
It's
not
it's
not
rocket
science.
I
assure
you,
okay
with
that
being
said,
the
first
step
is
looking
at
what
we
have
so
the
the
code
that
you
see
here
is
the
example
app
template.
A
So
in
the
new
repository
there
is
a
folder
called
examples
and
there's
another
folder
inside.
That's
called
templates
where
you
find
the
app
template-
and
this
is
this-
is
the
entire
app
template,
and
this
is
a
fully
functional
the
new
app
if
we
run
this
now,
let's
see
so.
This
is
called
step
one
in
the
in
the
repository.
If
we
run
this,
we
get,
this
is
the
standard
template
or
the
standard
yeah
app
template.
A
It's
just
a
window
that
draws
a
circle
in
the
center
of
the
screen,
nothing
too
exciting
at
first,
but
it's
already
pretty
cool
that
with
like
really
very
little
code.
We
already
get
this
kind
of
output.
So,
let's
see
how
this
works
exactly
use
like
we
get
the
new
prelude
in
the
main
function.
We
just
like
kick
off
this
app.
We
don't
actually
have
to
look
at
this
anymore.
A
Just
like
this
is
where
things
go
together
and
then
start
up
the
most
important
or
like
the
the
things
that
are
like
interesting
to
us
are
a
struct
that
is
called
model,
a
function
that
is
called
model
a
function
called
update
and
a
function
called
view.
A
If
you
hear
the
words
like
model
and
view,
the
probably
the
association
that
you
have
first
have
is,
like
model
view
controller
and
if
that's
the
case,
you're
right
on
the
spot
or
like
just
right,
because
this
is
kind
of
like
the
the
overall
architecture
that
nanu
was
built
with
so
like
model
view
controller,
where
a
model
holds
your
state
and
vue
is
kind
of
like
just
the
the
visual
representation
of
your
state
and
but
we
don't
really
have
a
controller.
A
We
have
more
of
this,
like
the
logic
of
like
updating
the
state
as
you
go
and
then
having
the
state
represented
if
you've
maybe
like
played
with
things
like
processing
before
or
maybe
like
other
game
engines.
Even
you
might
wonder
because,
like
view
is
like
for
me,
it
was
like
a
little
bit
unusual.
A
The
view
is
usually
called
something
like
draw
just
like
making
it
clear
that
this
is
where,
like
the
drawing
happens
onto
the
screen,
but
it's
also
like
it
makes
a
lot
of
sense
if
you
think
of
it.
From
this
like
model
view
controller
perspective,
the
other
part
is
that
the
function
that
is
usually
called
setup
or
sometimes
load
so
the
first,
like
all
the
code
that
runs
once
in
the
beginning
to
set
everything
up,
is
actually
called
model
in
nano.
A
This
is
where
the
the
window
is
created
and
the
the
model
like
as
our
container
for
our
for
a
state
is,
is
initialized
or
like
is
instantiated.
I
guess
with
that
being
said.
This
is
what
we
have.
We
have
the
model
struct
that
holds
that
defines
our
app
state.
A
The
model
function
creates
the
window
initializes,
the
model
update
would
be
a
function
that
continuously
runs
to
like
update
the
model
and
view
as
a
function.
That
continuously
runs
to
draw
to
our
screen
cool.
So
this
is
what
we
start
with
and
let's
see
so
this
is
step
one
step.
A
One
is
just
like
looking
at
stuff:
let's
see
how
step
one,
how
step
two
works
so
step
two
goes
from
drawing
a
circle
to
drawing
a
random
rectangle,
this
one's
pretty
ugly,
but
this
is
what
you
get
when
you
draw
random
stuff.
Let's
run
it
again
more
like
it.
So
this
is
one
way
to
to
draw
a
rectangle
just
in
the
center
of
the
screen.
Let's
see
how
this
could
work,
or
this
could
look
like
in.
A
Let's
look
at
step,
two,
the
only
like
really
interesting
part
is-
and
I
would
just
really
superficially
run
over
the
changes.
But
there's
not
don't
worry.
If
not,
everything
like
falls
into
place
right
away
is
that
in
the
in
our
model,
struct
added
points
which
is
a
vector
of
two-dimensional
vectors,
so
like
two-dimensional,
vectors,
something
something
with
x
and
y-coordinates,
for
example.
A
So
like
a
position
in
space-
and
so
I
just
like
collect
all
these
points
and
they
will
later
make
up
the
points
that
define
the
rectangle
and
then
just
in
the
I
started
with
just
here
in
the
model
function
so
that
okay,
if
I
need
like
a
list
of
points
that
define
my
my
rectangle,
I
can
start
with
an
empty
vector,
generate
a
couple
of
points.
A
Push
them
into
the
vector,
and
that's
it
maybe
to
note
here
is
that
I
push
the
vector.
I
push
point
number
one
twice
in
there,
because
the
function
that
I
use
to
draw
the
stuff
is
called
as
a
polyline,
which
is
technically
only
a
line.
So
I
have
to
like
put
in
the
beginning
point
twice,
so
it
actually
closes
the
entire
thing.
A
But
that's
just
like
to
note
here
and
the
way
that
I
kind
of
like
distribute
the
points
and
the
rectangle
to
get
a
rectangle
rectangle
is
that
I
like
use
a
random
function,
so
in
this
case
random
float
32.
So
like
I
get
something
between
0.0
and
1.0
and
then
multiply
this
by
the
maximum
width
and
height
restrictions
that
I
want
my
rectangle
to
have
so,
let's
say
maximum
like
with
a
height
of
like
100.
A
In
this
case,
so
I
get
like
something
in
between
and
then
I
use
like
negative
values
on
the
individual
corners
to
kind
of
like
push
them
out
so
that
I
don't
get
like.
How
would
you
say
it
just
like
a
random
lump
of
points
that
doesn't
like
may
have
like
four
corners
in
a
way,
but
it's
not
really
rectangularly
shaped,
and
with
this
I
can
like
kind
of
like
pull
this
a
little
bit
out.
A
So
I
get
get
something
that
is
more
or
like
resembles
more
like
a
rectangle
that
you
would
imagine
if
you
just
think
of,
like
oh
yeah,
a
rectangle
with
that,
and
then,
let's
quickly,
look
at
like
how
we
draw
how
we
actually
draw
the
thing
I
removed
the
the
part
that
that
draws
the
ellipse
or
like
the
circle
that
we
saw
and
actually
draw
a
polyline,
give
it
a
color
and
give
it
a
weight,
which
is
the
the
the
width
or
the
the
yeah
stroke
width
of
the
lines
that
we're
drawing.
A
And
then
I
give
it
all
the
points
that
we
just
the
points
that
we
just
created.
These
are
like
in
our
model
points
vector
that
I
have
to
clone,
because
points
wants
to
take
ownership
here.
So
if
you,
if
you
run
this
and
like
maybe
like
code
it
at
some
point-
and
you
like
what
doesn't
points
like-
oh
like
I
get,
the
compiler
error-
maybe
clone
this,
because
some
of
the
functions
actually
want
to
want
to
take
ownership
and
in
the
view
we
can't.
A
Okay
with
that
being
said,
so
I'm
quickly
going
to
like
quickly
running
this
again,
so
we
now
have
like
one
random
rectangle,
even
though
this
also
looks
kind
of
like
a
triangle
because
smaller
sites,
but
that's
okay
from
here
on,
we
can
like
move
on
to
step
three,
which
is
drawing
a
grid
of
these
random
rectangles,
and
this
is
already
kind
of
like
stylish
in
its
own
way
kind
of
like
pop
art
pop
artsy.
A
Let's
see
how
we
can
do
that,
look
into
the
next
step.
This
is
step
three
I'll
define
like
a
couple
of
like
magic
numbers
that
I
need
for
the
grid
and
everything
else
on
the
top.
But
in
this
step,
what
is
kind
of,
like
the
the
biggest
part,
is
that
I
kind
of
like
started
to
abstract
like
the
or
like
introduce
more
abstract
concepts
of
like
the
way
that
I
want
to
organize
the
code.
A
A
So
in
the
end,
we
will
have
like
a
vector
of
of
square
structures
that
represent
the
grid
where
each
structure
sits
on
one
position
has
a
color
and
then
also
all
the
rectangles
that
are
drawn
on
that
position,
but
first
things.
First,
in
the
first
step,
I
just
want
to
have
the
position,
which
is
again
like
a
two
dimensional
vector
and
then
the
the
points
that
we
previously
had
accepted.
A
A
This
is
the
same
points
code
that
generates
like
a
random
rectangle,
and
then
I
calculate
the
position
based
on
the
position
in
the
grid
with
a
little
bit
of
nudging
in
the
coordinate
system
to
kind
of
center.
It
right,
let's
go
here,
write
a
little
function
and
that
it's
just
two
nested
for
loops,
because
it's
simple
and
it
just
works
over
the
ranges
that
I
want
micro
to
have.
A
I
think
I
said
in
this
case
it's
a
seven
by
nine,
generate
a
new
structure,
push
these
structures
into
a
vector,
and
then
we
can
have
this
vector
of
square
structures
in
our
model.
So
here's
where
I
call
it.
Here's
where
I
put
it
into
my
model
and
then
in
the
view
we
basically
iterate
over
the
structures
in
our
model
and
draw
this
polyline.
We
now
have
this
new
x
and
y,
where
we
actually
have
to
like
specify
the
position,
but
the
rest
pretty
much
stays.
A
The
same
cool
on
to
the
next
step,
where
I
randomly
put
color
here,
because
I
wanted
to
now
get
away
from
just
as
like
the
original
purple
and
purple
and
steel
blue,
I
think
they're
called
plum
and
steel,
steel,
blue
and
like
more
into
the
direction
of
the
colors
that
varam
used
in
her
sketch.
A
So
this
is
going
to
be
the
next
step
that
we
try,
just
like
per
each
structure
also
have
a
color,
and
this
is
pretty
straightforward.
A
I
actually
also
added
the
rand
crate,
so
I
get
like
a
nice,
a
nice
api
for,
like
choosing
a
random
thing
from
a
vector,
also
pull
in
a
new
color
and
then
on
the
square
structure.
Struct,
I
can
say
hey.
A
So
I
want
to
have
like
actually
like
a
lot
of
say
in
these
are
the
only
colors
that
I
want
to
use,
but
this
could
also
be
like
a
cool
entrance
point
for
saying,
like
playing
actually
with
the
color
composition
and
the
piece
of
saying
like
hey,
maybe
instead
of
rgb,
you
want
to
like
use
hsl
and
then
play
with,
like
maybe
the
saturation
levels
or
the
hue
anything
like
that.
A
So
this
could
be
like
a
nice
place,
but
I
chose
to
keep
it
simple
here:
just
have
predefined
colors
and
then
show
choose
a
random
color
from
there
and
then
assign
it
to
the
struct
and
then,
when
we
draw
it,
I
just
like
previously,
we
only
had
steel,
blue
and
then
say:
hey,
not
each
structure
has
its
own
color.
Please
draw
this
boom
and
this
was
it
for
color
and
we're
almost
there,
because
in
the
next
step
the
where
things
go
a
little
bit
crazier,
that's!
Where
per
each
structure.
A
We
now
not
only
draw
one
rectangle,
we
draw
multiple,
but
with
everything
like
we
already
have
like
put
in
place.
This
is
actually
quite
simple
for
us
to
achieve.
A
Okay,
let's
see
or
is
it
simple,
let's
find
out,
I
defined
another
value
up
here,
which
is
just
like
the
like
the
maximum
number
of
rectangles
I
want
to
like
or
like
squares
that
I
want
to
draw
per
per
structure
in
the
grid,
and
I
also
decided
to
add
another
layer
of
maybe
abstraction
if
you
want
added
a
new
struct
that
I
just
called
square,
which
is
just
now
holding
the
points
for
each
square
so,
like
I'm,
basically
just
pushing
around
this
the
the
initial
idea
of
how
do
I,
how
do
I
draw
a
random
rectangle
and
now
it's
it
lives
just
inside
square
and
square
structure.
A
Gets
in
turn
the
collection
of
squares,
so
the
squares
rapture
has
a
position
in
the
grid
and
a
collection
of
squares
that
are
like
drawn
on
top
of
each
other
and
they
all
share
the
same
color
cool,
which
then
in
turn
that
just
so
maybe
once
more
one
more
step
is
that
now,
when
we
we
generate
or
like
when
we
create
a
new
square
structure,
I
also
say
like
hey,
for
each
structure
fill
this
vector
with
a
new
square
and
then,
when
we
draw
it,
it's
just
another
nested
for
loop
for
drawing,
and
this
is
it,
and
that
was
actually
not
that
much
culture.
A
I
get
to
this
visual
effect
now,
because
in
the
end
it
was
fairly
simple
if
we
think
about
it,
whoop
so,
with
the
fight
were
kind
of
like
they're
ish,
I
would
say
so.
A
We
could
play
with
like
some
of
like
the
magic
numbers
that
I
defined
at
the
top
to
like,
maybe
widen
or
constrain
like
the
the
rectangles
a
little
bit
more,
maybe
the
number
of
iterations,
but
I
actually
wanted
to
have
some
sort
of
interactivity
because
there's
a
couple
of
of
things
that
I
definitely
want
to
play
with
when
when
I
saw
this
first,
which
is
for
one
changing
the
color
so
like
the
color
assignments
of
the
different
structures,
but
then
also
the
number
of
rectangles
that
I've
drawn
per
structure-
and
I
thought
like
okay,
I
kind
of
want
to
maybe
play
with
three
aspects
of
the
thing,
and
I
have
a
three
button
mouse.
A
So,
let's
like
put
some
of
like
the
events
on
on
mouse
interactions,
so
we
can
play
with
it
a
little
bit,
which
is
going
to
be
the
last
step
that
we
look
at
so
first.
It
looks
kind
of
like
the
same.
But
when
I
click
with
my
left
mouse,
I
basically
regenerate
all
the
squares
that
are
drawn,
but
the
colors
stay
the
same.
A
But
with
the
right
button
click
I
can
like
assign
the
colors
or
reassign
the
colors,
but
the
positions
stay
the
same
and
when
I
scroll
I
can
reduce
or
increase
the
the
number
of
the
rectangles
that
are
actually
drawn
or
like
the
squares
that
are
actually
drawn
per
structure
so
like.
A
If
I
go
all
the
way
down
to
one,
I
can
we're
kind
of
like
stepping
back
to
the
initial
step
that
we
had,
but
then
I
can
also
like
decide
on
like
how
many
lines
I
actually
want
to
have
like
then
show
some
choose
something
that
I
think
looks
kind
of
good.
Maybe
something
like
this,
maybe
a
little
more.
So
let's
see
how
we
can
do
this,
because
actually
events
are
handled
really
nicely
in
nanu.
A
I'm
a
big
fan,
let's
see
where
we
go.
A
Let's
go
here
in
our
model
function
where
the
in,
like
the
new
window
itself
is
created,
and
here
we
can
register
the
events
that
we
want
to
look
out
for.
I
chose
most
released
so
like
when
the
mouse
button
is
click
like
click
but
release
and
mouse
wheel,
which
is
when
you
scroll,
and
then
these
just
get
like
the
the
functions
that
should
be
called
when
these
events
happen.
A
So
let's
look
at
mouse
released,
which
is
this
one
and
the
interesting
argument
that
we
get
here
is
button
which
is
of
type
mouse
button
which
we
can
match
on.
So
we
have
a
mouse
button
left
and
mouse
left
mouse
button
left
and
mouse
button
right
and
then
I
can
just
say
I
also
have
access
to
my
model
here
we
get
a
mutable
reference
to
to
our
model
here,
so
I
can
like
also
update
my
state,
so
I
can
say
so
for
for
left
mouse
click.
A
I
iterate
over
my
structures
and
I
also
defined
a
function
that
I'm
not
especially
gonna,
look
at
here,
but
just
basically
regenerate
all
the
points
in
all
of
the
structures
so
like
the
squares
actually
and
on
the
right
button
click
I
also
iterate
over
it,
but
called
something
that
is
called
said
color,
which
just
picks
another
random
color
from
the
predefined
vector.
A
A
The
other
part,
is
here
mouse
wheel,
where
the
interesting
argument
is
dt
or
delta
kind
of
like
the
the
difference
in
like
the
mouse
mouse
scrolling
and
where
we
can
also
match
on
mouse
world
delta
line
delta,
which
is
a
a
tuple
of
like
x
and
y
so
like
because
in
theory
you
could
scroll
horizontally
and
vertically,
but
I'm
only
interested
in
the
vertical
scroll.
A
So
I'm
only
like
on
the
like,
only
like
the
structure
for
for
y
here,
and
the
other
funny
thing
is
that
y
is
either
a
negative
1.0
or
a
positive
1.0,
depending
on
whether
you
scroll
up
or
down.
So
I
have
a
little
guard
here
to
tell
me
actually
in
which
direction
are
we
now
scrolling?
A
A
This
is
just
like
a
little
property
on
the
model
that
globally
defines
globally
defines
how
many
squares
I
want
to
draw,
and
then,
as
for
the
drawing
itself
I
make,
I
can
like
make
use
of
a
nice
like
more
of
like
the
functional
features
of
rest,
because
in
the
in
the
iteration
loop,
where
I,
the
actual
squares,
are
drawn,
I
can
simply
say
like
take
and
then
the
this
global
number
of
squares
that
exist
and
just
draw
this
amount
and
don't
really
care
about
the
rest,
and
I
thought
that
was
really
cool
for
the
sake
of
time.
A
I
don't
want
to
like
get
into
some
of
the
other,
like
I
feel
like
in
this
part,
it's
really
like
cool,
like
the
the
things
that
rust
gives
us
for
like
handling
stuff
like
this,
like
especially
pattern
matching
and
some
of
the
functional
things
are
so
nice
to
work
with
and
rust,
and
if
I
think
about
like
some
of
the
stuff
that
I
did
in
processing
or
in
p5.
A
Well,
it's
like
kind
of
like
always
a
little
bit
more
complex.
I
feel
like
like
working
with
this,
and
I
know
it's
like
really.
A
A
smooth
experience,
so
that
was
really
cool,
and
that
was
a
whirlwind
tour
of
yeah
how
to
get
something
like
a
viral
nice
square
structures
thing
but
like
implement
it,
and
I
knew
just
to
give
you
a
little
bit
of
an
insight
into
how
you
could
like
plan
all
the
way
like
a
little
journey
on
where
to
go
and
like
maybe
what
to
think
of
and
then
in
the
end,
it's
really
in
small
incremental
steps
that
that
get
you
there
and
with
this
I
want
to
like
already
like
kind
of
like
go
into
like
a
little
wrap
up,
because
yeah
there's
so
much
to
talk
about
and
so
much
to
learn.
A
So
I
prepared
a
resources
slide.
I
actually
have
two
resources:
slides
one
is
just
like
rust
and
nanu,
specifically
there's
a
there's,
a
new
guide,
which
is
probably
like
also
like
a
very
good
way
to
get
familiar
with
some
of
the
concepts
behind
nanu,
especially
like
what
about
the
coordinate
system
and
how
like
drawing
works.
But
then
there's
also
like
an
another
generative
art
tutorial.
That
is
pretty
new,
where
you
recreate
gravel
or
shutter,
which
is
another
like
a
piece
that
you
maybe
have
seen.
A
It's
also
like
one
of
like
the
first
things
that
you
learn
when
you
like,
like
a
lot
of
tutorials,
take
this
on
as
like
a
first
project
for
generative
art.
So
there's
a
tutorial
for
that,
and
I
also
wanna
highlight
the
a
session
by
alexis
andre
who
did
all
the
sketches
that
are
on
the
new
website,
so
all
the
cool
animated
stuff
as
alexis
andre's
work,
and
he
gave
a
session
at
github
universe
about
menu
and
creative
coding
and
rust,
and
this
is
like
just
like
it's
30
minutes.
A
It's
very,
very
cool,
and
also
that
gives
him
gives
a
little
good
insight
into
like
how
he
thinks.
I
think
I
really
enjoyed
it
and
then
more
links,
but
I'm
not
going
to
talk
about
all
of
them.
There's
another
resources
slide
with
just
more
generative
art
things,
so
you
have
like,
if
you
plan
on
sleeping
tonight,
maybe
don't
sleep
and
breathe
through
all
this
stuff,
because
it's
it's
at
least
as
interesting
as
sleeping
and
with
that
I'm
actually.
At
the
end.
A
Thank
you
for
listening
to
me
yeah
and
that
is
it
and
then
we
can
do
questions.
I
guess.
B
Awesome,
thank
you
very
much
lisa.
It
was
an
awesome
presentation
and
I
can't
put
it
any
better
than
carl
did
on
discord.
He
wrote
I'm
really
inspired
and
now
I
have
something
to
do
for
my
vacation
next
week,
really
amazing.
So,
yes,
absolutely
it
was
a
very
good
presentation.
Thank
you
very
much.
We
have
some
questions.
In
fact,
let
me
show
you
the
first
one
this
one
now
rengare,
I'm
not
sure.
If
I
pronounce
the
name
correctly
asks
is
the
image
responsive.
That
is,
if
you
expand
or
shrink,
I
guess
he
means
the
window.
A
So
the
way
that
icon
so
good
question
the
window
itself,
you
can
just
like
resize
freely
and
the
way
that
I
coded
it
right
now.
It's
not
responsive,
but
you
do
get,
for
example,
the
way
that
I
registered
the
the
mouse
events
there's
also
an
event
called
it's
either
resize
or
window
resize,
where
you
can
actually
like
then
get
the
chance
to
update
the
like
all
of
the
measurements
in
your
sketch,
based
on
what
happens
in
this
resize.
So
you
can
the
way
I
coded
it.
B
A
Also
very
good
question,
so
the
video
parts
are
still
let's
say
in
development.
There
is
a
feature
to
like
save
images
as
like,
basically
screenshot
your
screenshot,
your
your
your
sketch.
So
like
save
what
you
have
as
a
file
that
exists,
the
video
stuff
is
it's.
A
It's
still
like
a
very
young
framework.
It's
definitely
in
there
like
the
entire,
like
range
of
video
and
then
also
video
manipulation
and
all
the
other
stuff
that
comes
with
video,
I'm
not
great
with
videos,
so
I
didn't
actually
look
like
too
much
into
it,
and
now
I
forgot
the
second
part
of
the
question.
A
About
sound
sounds
really
interesting,
so
there's
already
like
apis
for
the
oc
open,
sound
control
thing.
So
if,
like
it's
there's
no
synth,
oh
no,
I
have
to
think
I
think,
there's
no
synthesizer
or
like
anything
that
actually
synthesizes
sound
in
menu.
A
But
if
you
want
to
like,
have
your
new
sketch
interact
with
external
things
like
midi
controllers
or
anything
else
that
speaks
osc?
This
is
already
possible.
B
Interesting
next
question
we
have
from
harald.
He
asks
whether
you
know
which
graphics,
apis
or
crates
are
used
by
nanu.
In
the
background.
A
That's
a
good
question:
I'm
not
like
a
super
graphics
crack,
but
the
and
who
tries
to
like
use
the
the
most
like
advanced
or
like
state
of
the
art
kind
of
like
api,
so
they're
working
very
hard
on
the
like
vulkan
and
what's
the
new
thing
called
web
gpu
so
like,
basically,
all
like
the
new
super,
exciting
yay.
A
We
like
we
try
to
squeeze
as
much
performance
out
of
our
graphics
cards
as
possible,
also
preparing
stuff
for
like
web
assembly,
so
like
everything,
is
pulled
into
it.
They're
working
hard
on
this
they're,
also
contributing
to
like
the
web,
gpu
crate.
Again,
I'm
not
like
super
duper
into
the
graphics
stuff,
but
it's
it
should
be
fairly
cutting
edge.
B
Okay,
thank
you.
Thank
you
very
much.
The
next
question,
I'm
not
100
sure.
If
I
fully
understand
it,
the
question
was
the
backend
of
blender
3d
technique.
Shall
we
call
it
as
generative
art?
Can
you
interpret
this
question.
A
So
there
is
so
my
interpretation
of
this
question
is
you
can
do?
Can
you
do
creative
coding
with
blender?
Yes,
you
can
out
of
like
the
like.
Blender
has
like
so
many
like
functionality
around
like
generating
various
like
visual
effects
for
like
3d
stuff.
A
So
if
you're,
if
you're
talking
about
that
and
if
like,
if
you're
playing
around
with
that
and
then
like,
generate
beautiful,
like
3d
imagery
or
like
3d
models-
and
this
is
definitely
creative
coding,
because
this
is
also
like
the
the
next
step
would
be
then
like
like
for
me-
is
like
to
then
3d
print
the
stuff
or
you
know,
there's
like
so
many
things
that
where
people
like
actually
have
to
like
generate
like
models
that,
like
that,
like
you
know,
it
could
be
jewelry
could
be
installation
pieces.
B
Okay,
interesting,
I
would
like
to
ask
a
question
too:
maybe
you
have
listened
to
the
community
news
that
we
did
at
the
beginning.
So
then
you
know
that
we
do
a
lot
of
work
with
kids
and
when
we
work
with
kids
and
teach
them
the
first
steps
in
textual
programming,
we
mainly
rely
on
p5.
We
love
p5
and
the
kids
love
p5,
because
we
build
simple
games
with
them
is
nanu
a
platform
for
building
a
simple
game
like
a
classic
arcade
game,
or
something
like
this.
A
You
can
probably
I
actually
have
not
made
a
game
in
manu
yet
which
I
probably
should
do.
There's
definitely
like
there
like,
if
you
can
make
a
game
with
p5
like
nanu,
has
the
same
kind
like
the
basic
textual
things.
You
can
build
this
with
like
a
snake
game
or
tetris,
or
something
or
break
up
like
it's
break
out
the
standard
game
that,
like
just
a
little,
you
know
2d,
like
I
walk
around,
collect
things
absolutely
yeah.
B
A
Maybe
one
more
edition,
so
nano
doesn't
feature
webassembly
yet,
but
it
will
come
up
so
like
ultimately,
in
a
couple
of
months
you
will
be
able
to
like
write
it
and
then
also
have
it
run
in
the
browser.
And
then
I
don't
know
I
don't
like.
I
also
really
like
p5
but
like
maybe
you
don't
need
p5
anymore
yeah.
B
Okay,
I
will
definitely
do
that.
Thank
you
very
much
lisa.
I
would
like
to
close
with
one
important
information
that
I
would
like
to
first
give
you
or
ask
you:
have
you
ever
been
in
linz
before.