Index Algorithmic SketchesCAD/3DComputer GeometryDraw by ScriptingGeneral ToolsGraphOtherVisualisation +

Attraction + De-traction between types (circle objects) 2

Attract repell of abstract circle objects by types revisted in ghpython

Each circle has a sphere of influence (soi) 30units which is used to locate the other circles within (a bit of a speed up using RTree from gh)

Image shows attract and repell behaviour while avoiding overlaps (simple collision detection between circles)

3 types of circles with attract rules and repell rules between types

attract rules:
1 -(attracts)-> 2
2 -(attracts)-> 3

repell rules:
1 -(repells)-> 3

Starting condition: 20 of each type instantiated at random points (for testing only) within the polygon (black line)

Key to image
Type 1: Orange circle
Type 2: Blue circle
Type 3: Green circle
Sphere of influence: Grey circle
Attract between circles: Dotted line
Repell between circles: Red line
Direction of movement from last frame: Red Arrow

January 2021