Nicolai Hess wrote
> This was of course wrong, I don't know what theYes i also wrote a test and i think my method is right.
> other method computes, but not the angle between two vectors.
Nicolai Hess wrote
> Now the question is, why do you think your method is wrong / the boidsWhen i use my method to calculate the field of vision the Boids always fly
> behave wrong?
from top left to down right and if i turn on the circling option, they crowd
in the bottom right quadrant.
If i give them a 360 degree field of vision by always returning true for
isInFieldOfVision they behave correctly. This means they fly in a nice
circle around the center and if circling is turned off, the swarm flies in
different directions each time you start the simulation.
Perhaps the problem is not the calculation of the angle but is in the
isInFieldOfVision: method...
--
View this message in context: http://forum.world.st/Calculate-angle-between-two-vectors-probably-Igor-tp4749351p4749697.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Free forum by Nabble | Edit this page |