Java 3D API question for a model
I am looking to create a Java application to re-create flocking behaviour in bats using the Java 3D API. But I have a few questions before I start.
- Is it possible to define an area like a cube for my agents?
- Is it fesaible to model a flock of bats using the boids algorithm using the Java 3D API?
- And if it is could I put the behaviour in the "behaviour" part of the Java 3D API or would I have to add this additionaly outside the behaviour section?
- Is it possible to work out the distance between the agents? And could this be like a grid like structure to calculate distances etc to allow me to work out poteinal fields etc?
Thanks for any help/advice.
yes, these things can be done
- Yes, a matter of mathematica of spaces, I saw a code demonstration in Java from a Prof at UC Berkely where a 2-d space was shown to be a 3-d space with one line of mathematics. I do not have the skills to know what it it is but yes it can be done.
- This has been done, it can be done.
- This is a design issue, no simple answer. What matters is to write code you can understand.
- This is a math vector space reduction. Not hard to do, nor computationally infeasible. Actually is one line of code for 2-d vector space - 3-d is just a matter of implementin class Point as having three values.