TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Nice Bug

4 pointsby polycasterabout 4 years ago

1 comment

CyberRabbiabout 4 years ago
From cmcaine on lobste.rs:<p>This may occur because collisions modify a ball’s position but not its velocity. Balls are also attracted to each other more the further away they are from each other, which is wacky.<p>Here’s the most relevant code:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;johnBuffer&#x2F;NoCol&#x2F;blob&#x2F;d60bc4029186dac888a96b38a7410e81aea89471&#x2F;src&#x2F;main.cpp#L97-L123" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;johnBuffer&#x2F;NoCol&#x2F;blob&#x2F;d60bc4029186dac888a...</a><p>Dunno why that makes it converge, but those are some differences from normal elastic collision.