function checkObstacleAvoidanceRule(boid,SpeedVector,NextBulbPosition,minDistanceLight,SpeedScale){
	// Check if the first rule is still respected
	let boidPosition = new THREE.Vector3(boid.position.x,boid.position.y,boid.position.z)
	let NextBoidPosition = boidPosition.clone().addScaledVector(SpeedVector,SpeedScale)
	return NextBoidPosition.distanceTo(NextBulbPosition)>minDistanceLight

	
}
// Check if bulb avoidance and pursuit rule is still respected
Check if bulb avoidance and pursuit rule is still respected
Check if bulb avoidance and pursuit rule is still respected
function checkObstacleAvoidanceRule(boid,SpeedVector,NextBulbPosition,minDistanceLight,SpeedScale){
	let boidPosition = new THREE.Vector3(boid.position.x,boid.position.y,boid.position.z)
	let NextBoidPosition = boidPosition.clone().addScaledVector(SpeedVector,SpeedScale)
	return NextBoidPosition.distanceTo(NextBulbPosition)>minDistanceLight
}
function checkObstacleAvoidanceRule ( boid , SpeedVector , NextBulbPosition , minDistanceLight , SpeedScale ) { let boidPosition = new THREE . Vector3 ( boid . position . x , boid . position . y , boid . position . z ) let NextBoidPosition = boidPosition . clone ( ) . addScaledVector ( SpeedVector , SpeedScale ) return NextBoidPosition . distanceTo ( NextBulbPosition ) > minDistanceLight }
Check if bulb avoidance and pursuit rule is still respected
Check if bulb avoidance and pursuit rule is still respected
// Check if the first rule is still respected