Coder Social home page Coder Social logo

tum-mlcms / crowd-simulation-and-visualization-in-unity Goto Github PK

View Code? Open in Web Editor NEW
47.0 1.0 7.0 21.18 MB

A crowd simulation and visualization demo implemented in Unity using Dijkstra Distance Field and simplified version of the Optimal Steps Model.

License: MIT License

C# 100.00%
pedestrian pathfinding unity simulation-element simulation

crowd-simulation-and-visualization-in-unity's Introduction

Visualization and Simulation of Crowds in Unity

This repository contains the implementation for the Machine Learning in Crowd Modeling & Simulation practical course in Technical University of Munich.

How to Setup the Project?

  • Install Unity 2019.4.3f1 LTS version.
  • Clone the repository
  • Open the project in Unity

Implementation

  • CameraMovement.cs -> Contains the code for camera movement.
  • Grid.cs -> Contains the code for handling transformations from Unity 3D World Space to 2D Cell Space and the other way around. Also contains mesh generation code for the plane (which is used as the grid).
  • GridElements.cs -> Enum for defining simulation elements in cell space EMPTY, OBSTACLE, TARGET.
  • LineDrawer.cs -> Constains code for drawing lines for Grid and Trajectories.
  • Pathfinding.cs -> 2D Distance field generation with Dijkstra's pathfinding algorithm.
  • Pedestrian.cs -> Component that is attached to every pedestrian to store some state.
  • Simulation.cs -> Controls the entire simulation
  • SimulationElement.cs -> Component that is attached to every simulation element.
  • SwitchScene.cs -> UI component to handle scene switches.
  • UIManager.cs -> Handles the buttons and sliders in the scene.

Images

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.