Skip to content

Instantly share code, notes, and snippets.

View jeffrey-cochran's full-sized avatar

Jeffrey Cochran jeffrey-cochran

  • Cleveland, OH, USA
  • 04:26 (UTC -04:00)
View GitHub Profile

The work I contributed to Godot this summer can be summarized in two pull requests:

The first PR enables collision detection for soft-body/area interactions and modifies the soft-body code to apply changes in gravity associated with the intersecting areas. The PR has a .zip attachment that contains a Godot scene demonstrating the changes in action. In it, a cloth intersects an area which modivies the gravity vector to point straight up, as can be seen.

The second PR creates a wind force simulation that affects soft-bodies colliding with the areas that specify the wind conditions. The wind force is characterized by four parameters that determine the wind direction, the origin of the wind, the rate at which the wind dies down as it gets further from its origin, and the magnitude of the wind force at its o

@jeffrey-cochran
jeffrey-cochran / uniform_sampling.py
Created March 2, 2021 20:27
Sample from a unifrom distribution
from numpy.random import uniform
p = uniform(size=(10,))
print(p)