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:
1. Calculate target new position
2. Calculate object a new position
3. Calculate object b new position
4. If b is too close to a, recalculate the position
5. Calculate c new position
6. If c is too close to a or b, recalculate the position
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