Tutorial: Agent-based portrait
Time needed: 48 min (1:25 youtube speed)
In this tutorial we will construct an agent-based framework for generative portrait creation. We will introduce local behaviours of the agents and will connect them to an image source.
Software: Rhino/ Grasshopper + image sampler (built-in component)
Plugins used: Culebra 2.1
What is agent-based?
An agent-based model (ABM) is a computational model for simulating the actions and interactions of autonomous agents (both individual or collective entities such as organizations or groups) in order to understand the behaviour of a system and what governs its outcomes. (thanks wiki)
In simple words, you only control some global constraints and local rule-sets of each agent and you see the emergence of something new with their interaction. In our case the result of their interaction will be a portrait.
As an illustration here you see the example of flocking behaviour that could be seen in the flock of birds (we use flocking in our framework as well). The swarm is shaped by individual local rule-sets such as Cohesion, Alighnment and Separation. The image is borrowed from this publication.
Step-by-Step:
1/ Selecting the image that would be the base of your portrait and check the dimensions
I use the portrait of Jakoba Mulder, an important Dutch architect and urban planner. If you want to use the same image download it here: Jakoba Mulder portrait.
2/ In rhino and grasshopper construct a grid of points with the same size as your portrait
(we use expression in count x*0.1 to make the grid smaller)
3/ Connect it to image sampler
4/ Separate points based on white and black intensity values
5/ Introduce a curve that frames the face and dispatch points with values based on it
6/ Select the points where we will spawn (initiate) our agents
7/ Create spawn settings in Culebra
8/ Create attraction points
9/ From “dark” points we create a polyline - that would be a polyline for the agents to follow
10/ Create local behaviours: Multi-path tracking and flocking
11/ Combine behaviours, add some custom preview and connect to the engine.
12/ Enjoy the simulation and agents drawing your portrait
Watch the tutorial on our youtube channel
Download the gh file here
Developed as a part of Computational Design Elective at Amsterdam Robot Lab (Amsterdam University of Applied Sciences)
Follow for more