Gravity Swarm (Composition by gtoledo3)

Author: gtoledo3
License: (unknown)
Date: 2010.10.20
Compatibility: 10.6
Categories:
Required plugins:
(none)

This allows one to set a point using interaction, and have other points gravitate around that point, as well as release gravity effect.

So the instructions are, move the point, watch the quads strip swarm gravitate towards the point. Hit g, watch the strips take on their own movement pattern. Release g, they gravitate again.

Quad strips are created that follow the path of the particles. Thanks@smokris for a discussion in a slightly different scenario that demonstrated how utilize an arbitrary value to be used for sorting later to help render lines or strips, and for the incidental quadmaker javascript.

I also used a xyz maker javascript of franz's because it was handy and already done. This is also a riff on some thoughts/composition that noboko posted about on twitter that used the feedback patch.

So, this is a kind of super mega alpha boid-esque thing that uses stock patches and is fairly node based. The piece I posted yesterday is probably more flexible, but doesn't render quad strips for the particle paths.

I would like to use an iterator to make the amount of strips variable, and still have them render correctly, but I'm overlooking something somewhere which makes my result inside an iterator unexpected (or there is a bug, but I think I'm need to do something to sort the structure differently, or introduce nan values if I iterate the final renderer so that it won't render as one big line.

PreviewAttachmentSize
Gravity Swarm.qtz79.8 KB

jersmi's picture
Re: Gravity Swarm (Composition by gtoledo3)

Really nice combination of approaches in this comp. Thanks again for sharing.

gtoledo3's picture
Re: Gravity Swarm (Composition by gtoledo3)

No problem! I'm not 100% (or even close) happy with the function of this particular comp, only aspects of it. However, given that Dust and Matthias were trying to get quad strip/lines going that denote the path of the particle, I thought it was possible that some principles of this method may help though it's iterator based (mainly).

dust's picture
Re: Gravity Swarm (Composition by gtoledo3)

got the paths working last night as trails by using a stock line patch. basically fed the particles current position and old position into an iterator and used old xyz for start and current xyz for line end. took out particle texture image and used mesh vertex display from a triangle strip to display the particles. I am able to do a 32 x 32 grid with the line patch in the iterator drawing the trails, which is cool but am really interested to see this patch when I get home because like you mentioned yesterday George cl doesn't necessarily mean faster. your gravitate runs smoothly at 1080i which I am unable to do with the boid in cl. so I'm thinking about trying something similar to boid without cl and see about flocking models or something in qc. I will check this patch out when I get home give you some constructive feedback. the vimeo video isn't showing up on my iPad so I can't really comment as of yet to anything specific to this swarm but am excited to see when I get home.

gtoledo3's picture
Re: Gravity Swarm (Composition by gtoledo3)

Checkout the "gravitate" path sample I uploaded as well, even though there are no trails drawn. That will show how to setup a number of gravity target points with a kind of autoqueue between all points. I feel like that is a "baseline" to getting perching going (eg. some particles land on an object, then rejoin the group after a duration).