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
public class HashGrid { | |
float bucketSize; | |
int gridWidth, gridHeight, bucketLength, numberOfRows, numberOfCols; | |
Buckets[] buckets; | |
HashGrid(float bucketSize_, int gridWidth_, int gridHeight_, int bucketLength_) { | |
bucketSize = bucketSize_; | |
gridWidth = gridWidth_; | |
gridHeight = gridHeight_; | |
bucketLength = bucketLength_; // bucketLength = ceil(10 * (numOfElements / ((gridWidth * gridHeight)/ bucketSize))); |
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
int pointsNumber = 300; | |
Points[] pointsArray = new Points[pointsNumber]; | |
class Points { | |
PVector location; | |
float circleSize; | |
float gravity; | |
float lineWeight; | |
color strokeColor; | |
int docHeight = height; |
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
String[] sa1 = { "OH ", "NY ", "CA "}; | |
println(sa1); // --> OH, NY, CA | |
println(sa1.length); // --> 3 | |
sa1 = shorten(sa1); | |
println(sa1); // --> OH, NY | |
println(sa1.length); // --> 2 |
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
Points mover; | |
int docWidth, docHeight; | |
int dpi = 300; //TODO! | |
float scaleFactor = 1; | |
int arrayLength = 300; | |
float minDistance, maxDistance, lineWeightMin, lineWeightMax, circleSizeMin, circleSizeMax; | |
Points[] myArray = new Points[(arrayLength + 3)]; | |
PGraphics imageHolder; | |
void setup() { | |
docWidth = 1300; |
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
main(); | |
function main() { | |
var myIdleTask = app.idleTasks.add({ | |
name: “my_idle_task”, | |
sleep: 1000 | |
}); | |
var onIdleEventListener = myIdleTask.addEventListener(IdleEvent.ON_IDLE, onIdleEventHandler, false); | |
} | |
// SETINTERVAL DOSNT EXIST SO WE USE THE ONLY POSSIBLE WAY ONIDLE EVENT: |
NewerOlder