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

Abstractions and models

Suppose that we really like the particular shape in the preceding screenshot and that we want to integrate it in a series of different drawings, in other words, to cast it as a sprite (that is, an independent structure integrated to a broader scheme). Of course, having to manually define the positions of the anchor points for each different case would be tedious, counterintuitive, and really shortsighted from a programmer's point of view, so we need to come up with some kind of abstraction. We could just put all the necessary instructions inside a function and make all the calculations relative to its arguments. However, this approach proves shortsighted too, as sooner or later we will encounter situations wherein we would ...

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