Miarmy Crowd Simulation Documentation (English)

Detection Range Frustum

Detection Range Frustum is useful way for finding far agent.

Any agents in current agent detection range can be detected.

Each of Miarmy agent has 2 intrinsic frustum ranges attributes and a color attribute. Selecting any agent, you may notice it is located channel box.



Frustum attributes


Each of the agents has a frustum itself. Like this, notice the green one, it is the detection range of selected agent, you can turn that on by click 



Detection Frustum Range


You can define these attribute in agent group node

The same as detection range sphere, frustum range also have some auxiliary option, like

Frustum Range

  • someone in my frustum with angle
  • someone in my frustum with distance
  • someone in my frustum and his color id

No matter what sentence you are using, before calculating, frustum sentence will first find the agents in its range, and then only calculate result based the in-range agents.

Like the picture shown blow, the current agent can only detect agent B, C and D, but cannot detect Agent A and E

And actually the frustum range is a 3D range as well as sound, means it can feel the agent in up and down of it.



Select agents in frustum range firstly


After getting the agents in the frustum range of current agent, it will test them by specific sentence and return values.

The someone in my frustum with angle will return the degree relative to the current agent. Look at the picture below,

The someone in my frustum with angle will return α degree for agent "A", γ degree for agent "B", and β degree for agent C". As for agent "D" and "E", because they are not in frustum range of agent, so, there is no return. The final result will be an array which contents are [α, β, γ]. As shown by following picture, the result approximate is [30, -15, -35].

The someone in my frustum with angle is testing others agents in horizontal space whereas the the someone in my frustum with up-down angle is testing others agents in vertical space



frustum angle example for current agent


someone in my frustum with distance sentence will return the every distances between the current agent and the others agents in frustum range.

For the following example, only the agent A, B, C can join calculation. Take a look at the example picture below, the input results should be [d1, d2, d3]



frustum distance example for current agent


someone in my frustum and his color id (color) sentence will return the each color of agent in current agent frustum range.

For the following example, the current agent can detect A, B and C, if the color of A is 0, the color of B is 2, the color of C is 3, the input results should be [0, 2, 3]



frustum can detect other agents color


You may notice, with frustum logic, we can easily get the information from far and in-front agents and response, so it's usually can use to search and chase target.

 

 

 

Basefount Technology