Tyler Ben

Generation

generate functionTue, 01 Aug 2023

Make a binary star system sim 2d in p5.js

function setup() { createCanvas(windowWidth, windowHeight); } function draw() { background(0); strokeWeight(2); stroke(255); fill(0); ellipse(width/2, height/2, 50, 50); ellipse(width/2 + 100, height/2, 50, 50); strokeWeight(4); line(width/2, height/2, width/2 + 100, height/2); }

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant