Skip to content

Commit 74b70bd

Browse files
committed
have basecode, some tiles were created, gui, Cell class
1 parent 131472a commit 74b70bd

28 files changed

+81
-165544
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 Aman Sachan
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1 @@
1-
# BioCrowds
2-
Biocrowds is a crowd simulation algorithm based on the formation of veination patterns on leaves. It prevents agents from colliding with each other on their way to their goal points using a notion of "personal space". Personal space is modelled with a space colonization algorithm. Markers (just points) are scattered throughout the simulation space, on the ground. At each simulation frame, each marker becomes "owned" by the agent closest to it (with some max distance representing an agent's perception). Agent velocity at the next frame is then computed using a sum of the displacement vectors to each of its markers. Because a marker can only be owned by one agent at a time, this technique prevents agents from colliding.
3-
4-
## Agent Representation (15 pts)
5-
Create an agent class to hold properties used for simulating and drawing the agent. Some properties you may want to consider include the following:
6-
- Position
7-
- Velocity
8-
- Goal
9-
- Orientation
10-
- Size
11-
- Markers
12-
13-
## Grid/Marker Representation (25 pts)
14-
Markers should be scattered randomly across a uniform grid. You should implement an efficient way of determining the nearest agent to a given marker. Based on an marker's location, you should be able to get the nearest four grid cells and loop through all the agents contained in them.
15-
16-
## Setup (10 pts)
17-
- Create a scene (standard, with camera controls) and scatter markers across the entire ground plane
18-
- Spawn agents with specified goal points
19-
20-
## Per Frame (35 pts)
21-
- Assign markers to the nearest agent within a given radius. Be sure that a marker is only assigned to a single, unique agent.
22-
- Compute velocity for each agent
23-
- New velocity is determined by summing contributions from all the markers the agent "owns". Each marker contribution consists of the displacement vector between the agent and the marker multiplied by some (non-negative) weight. The weighting is based on
24-
- Similarity between the displacement vector and the vector to agent's goal (the more similar, the higher the weight. A dot product works well)
25-
- Distance from agent (the further away, the less contribution)
26-
Each contribution is normalized by the total marker contributions (divide each contribution by sum total)
27-
- Clamp velocity to some maximum (you probably want to choose a max speed such that you agent will never move further than its marker radius)
28-
- Move agents by their newly computed velocity * time step
29-
- Draw a ground plane and cylinders to represent the agents.
30-
- For a more thorough explanation, see [HERE](http://www.inf.pucrs.br/~smusse/Animacao/2016/CrowdTalk.pdf) and [HERE](http://www.sciencedirect.com/science/article/pii/S0097849311001713) and [HERE](https://books.google.com/books?id=3Adh_2ZNGLAC&pg=PA146&lpg=PA146&dq=biocrowds%20algorithm&source=bl&ots=zsM86iYTot&sig=KQJU7_NagMK4rbpY0oYc3bwCh9o&hl=en&sa=X&ved=0ahUKEwik9JfPnubSAhXIxVQKHUybCxUQ6AEILzAE#v=onepage&q=biocrowds%20algorithm&f=false) and [HERE](https://cis700-procedural-graphics.github.io/files/biocrowds_3_21_17.pdf)
31-
32-
## Two scenarios
33-
- Create two different scenarios (initial agent placement, goals) to show off the collision avoidance. Try to pick something interesting! Classics include two opposing lines of agents with goals on opposite sides, or agents that spawn in a circle, which each agent's goal directly across.
34-
- Provide some way to switch between scenarios
35-
36-
## Deploy your code! (5 pts)
37-
- Your demo should run on your gh-pages branch
38-
39-
## Extra credit
40-
- Add obstacles to your scene, such that agents avoid them
1+
# Interesting Level Generator

0 commit comments

Comments
 (0)