Precise calculation, looks better
Exeptional, due to extra lines
if this is too far from a voronoi diagram, I can use a photo editor to remove all but one of the extra lines if I need to
Exeptional, because circles are still there
Exeptional, because not calculated (press r to remove circles)
Please let me know if I talked too much about my process and didn't do enough analysis, or if I went too fast, I can adjust for next time!
Learned a new program: p5
I did this because it was browser based and allowed me to integrate graphics easily. I also picked up some JavaScript in the past so it wasn't that hard to pick up
I believe if I had much more time to learn p5 and fully understand Voronoi diagrams I could do it without ai, but I didn't have time and didn't fully understand how to go about this
Without Chatgpt, I made a program on my own that finds the mid points of points selected:
https://editor.p5js.org/rosen33s/sketches/y8yxMsFuh
Then asked Chatgpt :
"Please write simple JavaScript that calculates and makes Voronoi diagrams based off of points I click on the screen. The points I click are the sites, please make code that makes the lines" and then "can you just make it JavaScript code I can plug into p5"
and got
https://editor.p5js.org/rosen33s/sketches/Op_2SPo6H
While using this Chatgpt code as a reference, I edited my original version in ways like:
used vectors, which I didn't know was in this program but have used before in a previous course
simplify stuff like use circles instead of ellipses
followed the math, added a grid like chat did to help calculate the nearest sites
does look like a copy, but re wrote the code so i could understand what chat did
I basically just used this as a reference, rebuilt it so i could understand and be able to make it "exceptional" later
I ended up with:
https://editor.p5js.org/rosen33s/sketches/fhdChHAC6
However, when working through this i ran into an error where if I didn't redraw the background every frame, the lines don't go away and we end up with an image like the one bellow, which i believe counts as exceptional because it is correct, but extra lines aren't erased
here is that code: https://editor.p5js.org/rosen33s/sketches/fGGrFmOsA
After this, I wanted to see if I could use the calculations i got from this and what we learned in class to make the Delaunay triangulation without chatpgt
But I decided to go about it a completely different way
instead of drawing by pixel, I wanted to use math to make lines
I was able to make a program(with the help of the equation from https://mathbitsnotebook.com/Geometry/Equations/EQFindCenter.html ) that makes a circle for every 3 points you click
Could not figure out presice calculations
Delaunay triangle code: https://editor.p5js.org/rosen33s/sketches/hXdkPuC9Q
I would say this is exceptional because its not directly calculated
I asked chat to generate something that makes Delaunay triangles but that code did not make sense to me -> black box
press r to remove circles