cosinekitty / electrons Goto Github PK
View Code? Open in Web Editor NEWSimulation of mutually repulsive particles confined to the surface of a sphere
License: MIT License
Simulation of mutually repulsive particles confined to the surface of a sphere
License: MIT License
Detect when particles have stabilized and reduce CPU usage by simulating fewer (maybe one?) step per frame instead of 10.
Currently electrons are all created with positive x and y values. Would be better to allow them to appear anywhere on the unit sphere. Prevent any two electrons from being too close together (avoid excessive forces that could wreck the simulation).
Prevent stability problems by starting out with a very slow time increment. Gradually ramp up as electrons start to settle down. Will require some experimentation.
The rotation could track the mouse position. Might be fun to even give it some momentum by dragging and "flinging" the ball.
There is no need for jQuery in this simple project. Let's make it lean and mean!
This will help recognize any patterns in the arrangement of electrons once they settle down.
The color of particles and lines should shift gradually based on how much of the sphere lies between them and the viewer.
Page should have buttons to add or delete electrons one at a time.
Remember the user's particle count (if valid) and restore it the next time the browser loads the page.
Calculate distances between all particles, just as we do now, only sort them. For any particles not connected to any other by the shortest length, draw different (?) lines to particles with second-shortest, third-shortest, etc.
The simulation did not seem to stabilize when n=149. Might need to adjust time increment based on a more sophisticated formula.
Write something that people can read to explain what the heck this thing is!
It is becoming apparent that it is a design flaw to try to hide the rotation matrix inside the Display class. I already had to expose it to Simulate.Render(), which creates redundant computation. Refactor this so that performance is better and the code is cleaner.
The buttons and the ball counter are ugly! Plus they are not very functional on iPhone. Have to keep clicking a hundred times to add a bunch of points. It would be much better to use a slider of some kind.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.