Skip to content

bennycui99/Turtle-Physics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Turtle-Physics

A simple 2D physics engine built in NetLogo. This project demonstrates how to simulate turtle-based agents with mass, velocity, and elastic collisions in a 2D environment. It also features gravity and boundary collisions (bouncing off walls).


Table of Contents


Overview

This repository contains a NetLogo model that demonstrates basic 2D physics, focusing on:

  • Movement under velocity and gravity,
  • Collisions between turtles (elastic),
  • Boundary collisions (bouncing off walls).

It is an educational example showing how to implement a rudimentary physics engine in the NetLogo environment.


Features

  • Gravity pulling turtles downward.
  • Elastic collisions between circular turtles, with mass influencing collision outcomes.
  • Bounce off world boundaries, reversing velocity when hitting walls.
  • Configurable number of turtles, speeds, masses, etc.

Requirements

  • NetLogo (version 6.4.0 or later).
    You can download NetLogo from the official website.

Installation

  1. Clone this repository or download it as a ZIP:
    git clone https://github.com/your-username/your-repo-name.git
    
  2. Open NetLogo on your computer.
  3. Open the .nlogo file from within NetLogo (File → Open...).

About

A physics engine in Netlogo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published