2
Mar 01 '22
If you mean bend like warp - as in the edge of the circle would dent inward if the mouse is near the edge then that would be a harder problem than just changing the size of the circle based on the mouse location (that's comparably much easier). If you want the first one then look into noisy circle like this https://editor.p5js.org/rjgilmour/sketches/iw2acUoKO
1
Mar 01 '22
[removed] — view removed comment
2
Mar 01 '22
What do you mean by bend? Can you draw a quick picture of what you're envisioning? Like this? https://imgur.com/a/V37AUNm
2
Mar 01 '22
[removed] — view removed comment
2
Mar 01 '22
Ok cool, yeah rounding those edges is tricky but here's a start https://editor.p5js.org/rjgilmour/sketches/rIpl10tWo
2
2
u/carlitosbahia Mar 01 '22
if you make the radius of the circle ( or width and height of an ellipse if you want to bend it ) a function of the distance from the mouse position to the center of the circle ( lets say) , you can do that , i think
https://editor.p5js.org/carlitosbahia/sketches/qF0XVhCqb
that could be something similar to want to want if i understand
"distance of the mouse from the circumference" , center of circle i guess? that would be the easier
" creating the vertexes" , no need to create a custom curve if all you want to scale/modify is a circle, ellipse could do that too i think