O'Reilly logo

Mapping and Visualization with SuperCollider by Marinos Koutsomichalis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Model

The Model is probably the most complicated object in our project, since it holds all the custom models we will use in Snakes. We need to design two singleton objects, namely population and gestalt. Both are singleton because in Snakes we need exactly one instance of both. We also need snakeFactory to construct snake objects. However, as we have already discussed, the latter consists of several parts, therefore, we need to model each of them as well and implement all the necessary factories, since we will need more than one. Because of its complexity, we will only give excerpts of the code here; the complete Model.scd file can be found online in this book's code bundle.

Aggregates and wrappers

A snake entity is complex, or what we call ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required