CodingTrain / Suggestion-Box

A repo to track ideas for topics
571 stars 86 forks source link

Coding Challenge: Minkowski Sum to thicken convex polygons #733

Open dandersod opened 6 years ago

dandersod commented 6 years ago

I'd love to see how to implement a minkowski sum for a convex polygon and a circle so that you could thicken the polygon. Here's a youtube link with a visual description of the result. The reason that I came across this was I was trying to replicate the AMAZING work of Jessica Rosenkrantz's N-E-R-V-O-U-S geode puzzles. So you'd have to find the minkowski sum of a polygon, and then find the minkowski sum of the previous step ... .

mike239x commented 6 years ago

If you want to replicate those pictures of geode puzzles you should also take non-convex polygons. Also, I think it would be better to implement a way to make parallel curves for this task. Last but not least, I think there is a way to cheese the whole thing by changing strokeWeight --- starting with some insanely big values and changing it step by step for each layer. The problem there will be that you will also get some stuff drawn outside, but this can also be fixed.

mike239x commented 6 years ago

@dandersod Here is an example of that cheese I described. Also, here is the sourcecode. I still need to make the color palette somehow better + there are some other things in the code that I find a bit weird, but overall, it works.