Embed Code

You really make a great stuff :)
It's just simple, but beautifull graphics and render.
I tried to made one, it just failed a bit, and your sketch is really great :)
Thanks, I'll soon try to make mine better :)

hello..
im new here..=)
so far i really want to know how exactly your algorithm to make steering behavioral of obstacle avoidance...
please help me to get one simple program of obstacle avoidance because i saw in your sketch there has implement it on agent.
please sir help me to making my final project work..huhu
seems i use Microsoft visual C++ and OpenGL in my program, so i really need the formula or theory to make it work.

fantastic job!
I do not code myself (a friend gave me the Processing adress) but this is the nicest thing I've seen so far. The great pleasure is to change the settings to see what happen. And changes are realy strong. It could become a great game. If you imagine that the wolves (let's call them wolves) can reproduce, can eat sheeps and need to eat sheeps not to die, and that sheep can reproduce, the game could be, (once you have choozen to be wolves or sheeps) to find the appropriated parameters to:
- get rid of wolves
- eat all the sheeps and die
- keep the best balance to have the maximum of animals together
- having the maximum of wolves without killing every one
- having the minimum of wolves without having them disapearing
the easiest parameters could maybe not be changed, like speed or so. But it could realy become a great practical exercise about group "efficiancy" (sorry but english isn't my main language...): when individualism is a force or a weakness, when a group is more a problem than a solution etc.
keep up the good job, and thanks a lot for the good time.
I send this page to coding friends.

2) I'm basing my Biology undergrad dissertation project on your model as the starting point for modifying and extending to create a model of parasitized and unparasitized sheep. Of course I'm going to acknowledge and credit you. I think I can just reference your work here and your openprocessing.org username, but I'd prefer to reference you by your real name. If you agree please could you tell me your real name and how you'd like your work to be cited? Feel free to pm me if you'd prefer.

I'm also trying to add data recording and analysis on the fly. My learning curve is near vertical and ouchy!

http://youtu.be/uGLTIWzapyg - I haven't changed much from your original code, but commented out the objects and changed the predators into parasitized boids with 50% higher weighting on the wandering function and non-parasitized have 50% more weighting on flocking. I intend to add a separate max speed on parasitized (lower) too, which I guess would increase the tendency for 'parasitized' boids to be at the peripheries and towards the back of their groups.

Other students have got GPS tracking data and faecal egg counts on sheep flocks. The practical aim eventually is to investigate whether behavioral observation of position in the flock is really (as anecdote suggests) a valid indicator of likely parasite intensity in individuals, which would help with targeted treatment and thus reduce evolution rate of anthelmintic resistance.

The measures I'm attempting to code are:

i) number of direct neighbours per boid over time steps - I expect 'parasitized' to reach an asymptotic maximum a bit slower than 'non-parasitized' and a slightly lower mean number of neighbours. I'll then take the time point at which flocking stabilises in both classes at all prevalence levels (proportion of 'parasitized' to non-) as the recording start point from then on.

ii) compare means of 20 short runs with mean of one longer run of equivalent duration to 20 short runs to check for hysteresis effects- I don't expect any in this model, but I have seen hysteresis in http://www.openprocessing.org/sketch/21385.

iii) group size per boid, including transitively associated boids - I expect parasitized to have a slightly lower mean group size. Transitive closure is a pain in the beep! I've just got the association matrix to run within the model, except I've bust flocking at the moment - I swapped dist2 in your code to dist() - the Association Matrix now runs ok but the flocking has broken - any clues? why did you define your own dist2 rather than use the in-built dist()?

v) frequency over the field as a heat map graph of the 'parasitized' vs. non-parasitized being in the front quartile of their groups - I guess I have to get the normalized vector and then declare an axis with the group centroid as 0, then do an integer matrix with grid squares of the World space as variables and add an integer to each grid square if a parasitized boid is in that square and if it is in the front quartile of its group. - This might be the most useful predictor for farmers, but I suspect I'm going to run out of time with my project and have to write up without this.

I only started learning coding this year, so I'm really out of my depth! I know I should go back and learn the basics methodically from the beginning, but I don't have time right now for my diss project.