Hi everyone,
Well, I gave up on the video in GEM for a bit, and moved on to more productive experiments, so I can feel happy again, instead of frustrated! And, I can happily report, that GEM gives amazing performance on Windoze XP for generative graphics - I had about 12 randomly-generated-9point-polygons floating around in 3d space and it looked quite extraordinary. I guess cus it's using graphics processing, the CPU load was very low (5% maybe), I could afford to do a lot more of this stuff I guess.
So, I want to experiment more with doing some things in 3d space. Now, I've worked with movement a lot more in 2d space then 3d, and mostly in Flash ActionScript, so I'm a little new at it, and I'm trying to figure out how to do the BEST (most optimized) movement in 3d with GEM.
First, is there an external to calculate distance between 3d points? Should I just create an abstraction? I'd assume a C coded external would be most efficient for processing...
Second, and I guess this is a more math question than GEM questions, but I want objects to pick a random point in space, then fly to that point, but using a curved path rather than a straight line. What would be the simplest way to achieve this? What about a more complicated curve, that changed say 3 times in 3d space, like . start ) curve 1 ( curve 2 ) curve 3 . end
Can anybody suggest things? I guess that I just need the simple curve equation, and then: create 3 random points pick 4 control points between start and 1, 1 and 2, 2 and 3, 3 and end...
So I guess I just need the equation!
Finally, did anybody ever get flocking to work? I want to do flocking, but I think the one external mentioned before won't work, because I need to be able to change the "goal" point at any time and have the flock move towards it. For simple flocking, I guess I could create an imaginary point, not worry about direction, and only implement collision detection/reaction. Any idea best methods to do this? I think that I:
I think that, this is not completely accurate, but maybe its efficient to approximate this way. Maybe there's a better way though. Also, I don't know how I should recalculate the position if it's too close, say I get to the twelfth object and there are other objects around it? Maybe there's a better way!
Thanks, David
Hallo, cyborgk@nocturnalnoize.com hat gesagt: // cyborgk@nocturnalnoize.com wrote:
First, is there an external to calculate distance between 3d points? Should I just create an abstraction? I'd assume a C coded external would be most efficient for processing...
[expr sqrt($f1*$f4 + $f2*$f5 + $f3*$f6)]
Send it a list with "x1 y1 z1 x2 y2 z2". It's very fast.
Second, and I guess this is a more math question than GEM questions, but I want objects to pick a random point in space, then fly to that point, but using a curved path rather than a straight line. What would be the simplest way to achieve this?
[spline_path 3] or similar can do this.
Finally, did anybody ever get flocking to work? I want to do flocking, but
Maybe check out the pso externals by Ben Bogart.
Frank Barknecht _ ______footils.org_ __goto10.org__
Thanks so much for the help on the first two. As far as flocking, I checked the PD archives, and according to Ben himself, that algorithm wasn't actually made to do flocking PER SE, and has the limitation, that the flocking objects get confused if the point they are heading to changes in mid-flight.
The "boids" algorithm would be best I think... Examples already exist in C and Python, it just needs to turn into an external I guess. If I get advanced enough to do it, I'll make it myself someday.
~David
Finally, did anybody ever get flocking to work? I want to do flocking, but
Maybe check out the pso externals by Ben Bogart.
Ciao
Frank Barknecht _ ______footils.org_ __goto10.org__
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hallo, cyborgk@nocturnalnoize.com hat gesagt: // cyborgk@nocturnalnoize.com wrote:
Thanks so much for the help on the first two. As far as flocking, I checked the PD archives, and according to Ben himself, that algorithm wasn't actually made to do flocking PER SE, and has the limitation, that the flocking objects get confused if the point they are heading to changes in mid-flight.
I admit I've nevers used PSO.
The "boids" algorithm would be best I think... Examples already exist in C and Python, it just needs to turn into an external I guess. If I get advanced enough to do it, I'll make it myself someday.
Python is really cool for these things, and the integration in Pd generally works very well - once you have installed it. ;)
Frank Barknecht _ ______footils.org_ __goto10.org__
Hi,
Yes indeed PSO is not a flocking algo, but an evelutionary algo, more in common with genetic algo's than flocking.
I'd be interested in playing with a boids flocker, I looked at it a while back but never ended up writing anything.
Indeed Gem's greatest strength is graphics, as apposed to "video".
.b.
cyborgk@nocturnalnoize.com wrote:
Thanks so much for the help on the first two. As far as flocking, I checked the PD archives, and according to Ben himself, that algorithm wasn't actually made to do flocking PER SE, and has the limitation, that the flocking objects get confused if the point they are heading to changes in mid-flight.
The "boids" algorithm would be best I think... Examples already exist in C and Python, it just needs to turn into an external I guess. If I get advanced enough to do it, I'll make it myself someday.
~David
Finally, did anybody ever get flocking to work? I want to do flocking, but
Maybe check out the pso externals by Ben Bogart.
Ciao
Frank Barknecht _ ______footils.org_ __goto10.org__
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list