Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a script that will simulate RGB spheres.
3 spheres are created. Each of the 3 spheres represents one of the RGB primary colors.
During the initialization, the origin of each sphere is chosen such that they are approximately as far away from each other as possible.
Each origin will be at one of the given LED coordinates.
The sphere’s radii will increase and decrease during the animation. The initial radius is chosen at random for each sphere.
For each enlarge or shrinking cycle, the green sphere uses 120 animation frames the red sphere uses 160 frames, and the blue sphere uses 200 frames
Each RGB color component is calculated using the distance to the corresponding sphere. Specifically, the formular used is 255 * (1 - dist / max_dist) ^ 3, where max_dist is the maximum distance any of the LED can have from the sphere.
The sphere changes from enlarging to shrinking, when the current radius is approximately equal to its max_dist.
It switches back to enlarging, once its current radius is approximately 0.
I tested this already using the simulator provided in #5.