Skip to content

Conversation

dgtized
Copy link
Contributor

@dgtized dgtized commented Mar 28, 2021

I was trying to start using the VerletPhysics routines, but ran into a problem where particles have an initial velocity.

I did some digging, and it looks like 9e0bba8 changed the initial conditions for particles to always set prev to be (vec2 0 0). Previously it set both current position and previous position to the initial position. The new behavior sets the initial velocity of a particle to (- pos (vec2 0 0)).

If the particles all start at 0,0 or very near this likely works out fine, but it seems like setting both pos and prev to the initial conditions would make more sense? Is there some other use case here I'm missing? Maybe the spring examples were in a coordinate system relative to origin?

Thank you for implementing all these geometry routines, it's been a really great & useful resource!

…tion vector

I was trying to start using the VerletPhysics routines, but ran into a problem where particles have an initial velocity.

I did some digging, and it looks like thi-ng@9e0bba8 changed the initial conditions for particles to always set `prev` to be `(vec2 0 0)`. Previously it set both current position and previous position to the initial position. The new behavior sets the initial velocity of a particle to `(- pos (vec2 0 0))`.

If the particles all start at 0,0 or very near this likely works out fine, but it seems like setting both pos and prev to the initial conditions would make more sense? Is there some other use case here I'm missing? Maybe the spring examples were in a coordinate system relative to origin?

Thank you for implementing all these geometry routines, it's been a really great & useful resource!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant