This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
CircleMutualAttraction (v2.3.8) | |
by Speykious (2017-Jun-27) | |
mod GoToLoop (2017-Jun-29) | |
https://Forum.Processing.org/two/discussion/23226/ | |
new-python-example-for-the-fisica-library#Item_2 | |
https://Gist.GitHub.com/GoToLoop/1861619991354ed7d063026658270689 | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Resize the image to a new width and height using nearest neighbor algorithm. | |
* To make the image scale proportionally, | |
* use 0 as the value for the wide or high parameters. | |
* For instance, to make the width of an image 150 pixels, | |
* and change the height using the same proportion, use resize(150, 0). | |
* Otherwise same usage as the regular resize(). | |
* | |
* Note: Disproportionate resizing squashes "pixels" from squares to rectangles. | |
* This works about 10 times slower than the regular resize. |