Points on a grid can be found by a nested loop incrementing (x, y) coordinates. To get something like the image you attached, you would use eg. (x, sin(x)) and add a fixed vertical distance for each row. You could then set body positions using those locations, presuming it's bodies that you are wanting to arrange. If I'm missing something, maybe you could give a small example of the type of result you're looking for.
For arranging vertices, you could arrange the vertices of a fixture like this:
Code: Select all
for (int i = 0; i < f.getNumVertices(); i++)
f.getVertex(i).setPos( i, sin(i) );
...or you could add new vertices like:
Code: Select all
for (int i = 0; i < 5; i++)
f.addVertex( -1, i, sin(i) );
A wobble effect like in the custom properties demo would be done by your program after loading the scene. The RUBE scene just holds the properties to define what the speed/range will be.
One of the major benefits of scripting is that very specific functionality can be added a little bit at a time, without needing any extra work on the main program itself. If there is a specific script you would like to have, let me know and I can probably sort it out for you.