見出し画像

自然とコード - THE NATURE OF CODE

Processingなどコードを使って作品を作る人々の間では超有名なDaniel Shiffmanという人が書いたThe nature of codeという本があります。自然の中で起こることをどうやってコンピュータで再現するかというテーマの本で、基礎的な物理に基づいたアニメーションの作り方からニューラルネットワークまで幅広いテーマが丁寧に説明されています。オンラインで全編読めるので是非挑戦してみましょう。

Danielは他にもプログラミングとコードを用いたアートについてのコンテンツを大量に公開しています。畳一畳くらいしかないSFPCの専用スタジオで撮られたビデオシリーズも最高です。

* Processing とはプログラミングによる表現を容易にするためのオープンソースの開発環境です。

序文

それでは序文(preface)から、この本が一体なんなのかについての部分をみてみましょう。逐語訳はしません。ざっとした解説です。

The goal of this book is simple. We want to take a look at something that naturally occurs in our physical world, then determine how we can write code to simulate that occurrence.

物理世界で自然に起こる事柄を調べて、コードでそれをシミュレートする方法を見つけ出す(determine)ことがこの本のゴールです。Determineは「決定する」と覚えている方も多いと思いますが、原因や性質などを見つけ出す、見極めるなどの意味でもよく使われます。例えばニュースではdetermine the cause of the accident(事故の原因を究明する)といったフレーズがよく使われます。

So then what is this book exactly? Is it a science book? The answer is a resounding no. True, we might examine topics that come from physics or biology, but it won’t be our job to investigate these topics with a particularly high level of academic rigor. Instead, we’re going to glance at scientific concepts and grab the parts that we need in the service of building a particular software example.

この本は科学の本ではありません。resounding noは、はっきりした否定、大声でNOです。物理や生物学の話題を詳しく取り上げますが、学術的に厳密なレベル(level of academic rigor)で研究することが目的ではなく、その代わりに科学的な概念をソフトウェアのサンプルを作るために用います。in the service ofは〜のために、ある目的の助けにするために、という感じです。

Is this an art or design book? I would also say no; after all, we are going to focus on algorithms and their affiliated programming techniques. Sure, the results will all be visual in nature (manifested as animated Processing sketches), but they will exist more as demonstrations of the algorithms and programming techniques themselves, drawn only with simple shapes and grayscale. It is my hope, however, that designers and artists can incorporate all of the material here into their practice to make new, engaging work.

アートやデザインの本でもありません。アルゴリズムと、関連するプログラミングの技術に焦点をおきます。結果はビジュアルなもの(Processingのスケッチ)になりますが、それらはあくまでアルゴリズムと技術のデモです。ただし筆者の望みはこれらの素材をデザイナーやアーティストが作品作りに活かせることです。

In the end, if this book is anything, it is really just a good old-fashioned programming book. While a scientific topic may seed a chapter (Newtonian physics, cellular growth, evolution) or the results might inspire an artistic project, the content itself will always boil down to the code implementation, with a particular focus on object-oriented programming.

結局のところこれは昔ながらのただのプログラミング本です。科学の話題(ニュートン物理学、細胞の成長、進化)を取り上げたり、芸術的なプロジェクトにインスピレーションを与えたりするかもしれませんが、突き詰めると(boil down)オブジェクト思考に焦点を置いたコードの実装の話です。

結局なんなの

で、結局なんなのという話ですが、自分なりにまとめるとこの本はコードによる表現を行うためのヒントやインスピレーションを得つつプログラミングについて学べる最高の教材です。長年教師をしてきた業界レジェンドが選りすぐったトピックがわかりやすい丁寧な解説と実際に動くサンプルがついてなんと無料(ですが読んで楽しかったら寄付をしましょう)。興味を引かれた方はぜひ。

この記事が気に入ったらサポートをしてみませんか?