css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv
CodePen probably won't work great in this browser. We generally only support the major desktop browsers like Chrome, Firefox, Safari, and Edge. Use this one at your own risk! If you're looking to test things, try looking at Pens/Projects in Debug View.
user profile image

Click to add gravity point!

I was totally inspired by Erik Terwan's Pen Shape by attraction

I just took a copy of my 400 Hearts code and instead of drawing a heart at the current position, each particle draws a line between the current and previous position. I also replaced the somewhat realistic Newton gravity with linear gravity.


  1. Hi Johan. Great work! I see you use P5 and work with vectors.

    If you're into this way of making art, I think you'll love this whole pen collection! http://codepen.io/collection/AMrBzL/ http://icosacid.deviantart.com/gallery/60280599/Gravitational


  2. You are correct! I love that collection! 😃❤️

Leave a Comment Markdown supported. Click @usernames to add to comment.

You must be logged in to comment.