Skip to content

Instantly share code, notes, and snippets.

@hellvetica42
hellvetica42 / CausticRaysCircle.pde
Created December 30, 2023 10:58
Processing Sketch of Rays bouncing inside a circle
int num_rays = 100;
PVector[] pos = new PVector[num_rays];
PVector[] vel = new PVector[num_rays];
void setup(){
size(1000, 1000);
background(20);
for(int i = 0; i < num_rays; i++){
float y = map(i, 0, num_rays, -radius+10, radius-10);
@hellvetica42
hellvetica42 / ModCircle.pde
Created November 28, 2023 23:33
Mathematical visualization in Processing
void setup(){
size(1000, 1000);
}
float c = 0.5;
float mathf(float x){
return x * c;
}
float radius = 300;