pro.Agents

Some of the code of agents that we developed during DRL.

2 classes of agents; Parents & Childs.

Steering Behaiviour + Spring to closest parent. Bezier Lines generate connection  based in the information of the velocity vector.

pro.Agents

Download the .zip here.

Mesh STL/OBJ export

Here we implement the toxi library to store and draw the mesh. With ‘s’ key we can export to obj/stl. The information will be stored in the sketch folder.

MeshExport

Download the .zip here.

Magnets

Based on attraction/repulsion (coulombs law) we generate a field o particles that show the vector field of forces.

Magnets

Download the .zip here.

Additive Waves

2D Matrix that uses 3 nested sin waves to generate the pattern. The information of the wave controls the height of the lines.

Additive Waves

Download the .zip here.

Cellular Automata

Cellular automata in 3d using a vector position to connect with other kind of algorithm.
2 rings of neighbours are evaluated to determine state of cell. Value ‘sum’ in ca is the addition of values.
Sliders allow to increase or decrease the value provided by neighbour cells.

Cellular Automata

Download the .rar here.

Geometry 01

here we have some geometric solids. This explains the way of building your own meshes and possibly start linking geometry to sub-division operations.

geom 01

MoveNode – VectorRotation

some simple class that by pressing “t” moves forward depending on its orientation. To change its orientation, press “w”,”e” or “r” to generate a vector rotation. This was the basis for the 3d-Lsys posted.

moveNode

Steering Behaviours (Agents)

Here we have a basic flock connected by beziers trying to reach an attractor. By not refreshing the background we can track their movement. The function ‘spawn’ (off by default) allows to leave this trail as a point class to extract it or use it later.

Attraction – pro.Agents

code based on Roland Snooks kAgent

L-Systems

Not literally structured as an L-System (rule based) but its a simple way to generate recursive growth. It generates a hierarchical connection between members and vector nodes could be used to plug other algorithm…(agents,  isosurface, etc)

3d L-system

check the camera zooming, panning & rotating by peasyCam.(left,middle,right mouse buttons).

L-SYSTEM pseudo code:

coming soon…

IsoSurface

Based on ToxiClibs examples, this isoSurface relates to a vector point class, ideally for Agents or CA.

IsoSurface

Be sure to have all libraries Installed.

Virtual Ants

Langton’s Virtual ants. Agent Behaviour based on state grid rules.

Virtual Ants

Video Capture + Agent follow Color

Here we extract color of from the processing video functionality. By building a point class in a grid, we can control the resolution of the video evaluation. Also it becomes easy to generate a class interaction with agents.

Video Capture + Agent follow Color

For running in windows you will need to install WinVDIG 1.01, that can be found in the Dan Shiffman’s website.

Trail Grid + add Counter through Agents

In this example we generate a point grid that can be exported in the txt export function. the agents (well they are not agents yet) running around add a counter based on distance. This event could be something else, or u can add more counters. The counter gets expressed in the color of the points.

Trail Grid + add Counter through Agents

Grid + add Counter through Wondering Agents

Vector class in 3D + Text export

In this example we generated a very simple vector class in a 3D environment that leaves a trail. This trail we could use for exporting txt, for generating g-code for cnc milling. Also introduced the world class to administrate our arraylists.

Vector class in 3D + text export

Array vs ArrayList setup

Here we have the basic code to generate a class and use a population based on arrays or ArrayLists. ArrayLists can only contain classes and are dynamic(very handy). Arrays can contain any kind of variable(…I belive) but its more complicated to constantly add or remove items from inside.

Array Setup

ArrayList Setup


pro.Log

the.probotics@gmail.com
theprobotics.blogspot.com
---------------------------------------

//Jose Sanchez [jomasan@gmail.com]
//Knut Brunier [kbrunier@hotmail.com]
//Anica Taneja [anica.taneja@gmail.com]

pro.Delicious


Follow

Get every new post delivered to your Inbox.