Open dennemark opened 1 year ago
Danke, danke @dennemark! Will take a look later today and report back... ππ€©
@dennemark Sorry for the delay about getting back to you about your straight skeleton. Not forgotten about it. Also, if you're not after extracting the actual geometry of the skeleton, you might find the https://thi.ng/distance-transform package a more simple alternative approach...
πthi.ng offers too many algorithms! Super useful! Distance-transform should be combinable with geom-isolines, I guess.
My approach definitely has some weaknesses, but since I know every line, I can scale the gradient for each of them differently, allowing me to make it weighted. Though I would have to add more gradients in that case.
Hi, I am opening an issue to provide an example on how to generate a Straight-Skeleton via SVG. It does not contain the actual lines of the straight skeleton, but some tricks on how to generate it as a height map. It includes boundary as well as a hole.
Feel free to use it as a HowTo thi.ng!
Would have liked to try to use geom-isolines to get a vector representation of it, but it seems its better to use hiccup-canvas instead. So there are still possibilities to extend the example. But for the current use, it should work.
SVG Polygons Polygons with Gradients Polygons with Darken-Filter Polygons with Mask - Straight Skeleton
index.ts