Super edit: I fixed it. I hate everything just to make sure I just added and extra vertex at where it should end and where the function should be already plotting a vertex just to be safe. Turns out that was it just adding another point manually at the end point where I know it should be fixes it. I don't know why it wasn't being plotted there before but just adding vertex(-this.radius*2,0); fixed it. I hate custom shapes in processing and want to die.
https://www.openprocessing.org/sketch/725104
The custom heart shape I made has some aliasing/not connecting/it looks bad problems. I commented the code before posting so hopefully you can parse it the relevant code is probably in draw(rate){ in the Heart class at the bottom.
It seems to me that either the aliasing is wrong (idk about rendering) or my shapes just aren't connecting properly. Note: The two functions I defined for the heart are from https://www.quora.com/What-is-the-equation-that-gives-you-a-heart-on-the-graph The second post by annonymous or just look at this.
The modifications I made to the heart to fix it for variable sizes do line up in desmos. You can test it by multiplying the functions by size/radius and diving the input by size/radius. Those are the changes I made and it does work in desmos in that they always line up exactly as can be seen here:https://www.desmos.com/calculator/nm2q4is6t9
With the R slider
Edit: noSmooth() and smooth() look the same.
submitted by
/u/CthulhuLies [link] [comments]