Skip to content

sambolinski/SpringPhysics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Spring Physics Simulation

img This project is a 2D pixel simulation of spring connections between nodes using C++ and the olcPixelGameEngine. The original goal was to simulate rope, which was achieved by connecting many nodes closely together. Properties such as tension and stretching can be shown, furthermore, if a few nodes are connected it also simulates soft-body physics.

Features

  • Physics

    • Spring physics based off equillebroium distance between nodes.
    • Force application such as gravity.
    • Toggle air resistance
  • Interaction

    • Delect node to lock in position
    • Add to nodes and connect nodes together
    • Delete nodes
  • Graphics

    • Nodes can be drawn as circles or not drawn
    • Springs drawn as lines
    • GUI to show details such as number of nodes, whether the user is in edit mode.
  • Controls

  • Left Click: Grab node

  • Right Click: Lock node

  • Space: Toggle pause

  • A: Toggle air resistance

  • B: Toggle rendering nodes

  • Mouse Wheel Up/Down: Add to end of string / Remove from end of string

  • E: Edit Mode

    • While in edit mode
      • Left Click: Select node
      • Right Click: Add node

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages