gHowl + Processing + Toxiclibs

Anyone interested in physics simulation and processing has probably heard of the amazing toxiclibs library that includes a powerful 2D and 3D physics system (among many other tasty bits and pieces). Recently I had a need to directly integrate particles and springs between processing and Rhino. Since the results were quite effective (compared to my short ventures in kangaroo) I thought I'd share my basic method. 

 

The processing example is adapted from a basic example that comes with toxiclibs and could easily be converted to 3D. It is interactive (click and drag to move the particles around) and everything works quite smoothly with 300+ particles although rhino only picks up the particles positions when gHowl ticks.

 

To run this you will need:

Grasshopper (obviously =)

gHowl http://www.grasshopper3d.com/group/ghowl

Processing http://processing.org/

Toxiclibs http://toxiclibs.org/

 

..and my zip file attached.

 

Enjoy, etc =)

 

Load Previous Replies
  • up

    Joe S.

    I think you could send multiple strings as gHowl has persistent data, just tag the beginning of each string and use that as an identifier. This would be a way to do springs or sets of points. 3-4 sets of points would be the beginning of quad meshes/4 point surfaces, alternatively a regularly spaced heightfield could feed into a surface from points component, but I imagine that would take a little longer to solve.

     

    Edit: Okay the XY example has a better way to do multiple lists

    • up

      yeliz karadayi

      are you sure this doesn't need opencv as well? i'm pretty sure it does, although i'm still in the process of downloading that. it tells me hypermedia does not exist right now.

      • up

        Ralph Zoontjens

        I installed everything but get the following errors in Processing:

        "No library found for toxi.geom

        No library found for toxi.physics2d
        No library found for toxi.physics2d.behaviors
        No library found for hypermedia.net
        Libraries must be installed in a folder named 'libraries' inside the 'sketchbook' folder."

        All the Toxiclibs folders (toxiclibs_p5, toxiclibscore, ...utils) are in this folder:

        C:\Program Files\processing-2.2.1\lib\Toxiclibs

        Does anyone know what's going on?

        1