toxi, to typescript
@toxi@mastodon.thi.ng avatar

Still only on a feature branch, but over the past few days I've been working on updating https://thi.ng/geom to add support for polygons with holes and paths with holes (or more generally support for sub-paths, e.g. multiple curves). Since both of these shape types are containers of multiple geometries and therefore require in some situations (e.g. shape conversions) different handling than the other shapes with a single boundary/geometry, adding support for these also includes updating a dozen or so polymorphic shape operators/functions and unfortunately will involve a few of breaking changes. For instance, some of these functions are returning an array of shapes now, instead of just a single one. Also related, some of the other geom support packages (e.g. https://thi.ng/geom-axidraw, https://thi.ng/geom-sdf) will have to be refactored more and partially have been already (likely only internally, though)...

As part of this work, I've also just added example #160(!!!) to demonstrate & test out some of this new functionality:

Demo:
https://demo.thi.ng/umbrella/geom-complex-poly/

Source:
https://github.com/thi-ng/umbrella/blob/feature/geom-complex-paths/examples/geom-complex-poly/src/index.ts

Commits:
https://github.com/thi-ng/umbrella/compare/feature/geom-complex-paths

I will of course send another update once this all has been merged & released...

#ThingUmbrella #Geometry #Polygons #Shapes #PoissonDisk #TypeScript #JavaScript #OpenSource

toxi, to typescript
@toxi@mastodon.thi.ng avatar

Earlier today[1], helped my son with a raycasting issue and then ended up updating/extending the 2D shape intersection function in https://thi.ng/geom, which now also supports ray intersections with nested shape groups/hierarchies (via same single function call) and a new option to return all intersection points found (rather than just the first/closest). Both of these features are shown in a new example project (forthcoming) and in the anim below...

#2D #Geometry #Shapes #Intersection #RayCasting #ThingUmbrella #TypeScript #JavaScript

[1] It also was the first day of the year for us working outside on a bench in the woods, yay!

2D line art animation showing some shapes (rectangles, circles, hexagon, wavy polyline...) and a line/ray rotating anti-clockwise. The intersection points between that ray and the static shapes are highlighted as pink dots. Each dot also has a label showing the distance from the ray origin (center of image). Depending on the angle and shapes intersected, the number of intersections varies (max. approx. 10 points)

toxi,
@toxi@mastodon.thi.ng avatar
MarieMuller, to fediverse French
@MarieMuller@mastodon.social avatar
xalieri, to DigitalArt
@xalieri@masto.ai avatar
xalieri,
@xalieri@masto.ai avatar
xalieri,
@xalieri@masto.ai avatar
xalieri, to DigitalArt
@xalieri@masto.ai avatar
xalieri,
@xalieri@masto.ai avatar
xalieri,
@xalieri@masto.ai avatar
xalieri, to DigitalArt
@xalieri@masto.ai avatar
xalieri,
@xalieri@masto.ai avatar
xalieri,
@xalieri@masto.ai avatar
xalieri, to DigitalArt
@xalieri@masto.ai avatar
xalieri,
@xalieri@masto.ai avatar
xalieri,
@xalieri@masto.ai avatar
xalieri, to DigitalArt
@xalieri@masto.ai avatar
xalieri,
@xalieri@masto.ai avatar
xalieri,
@xalieri@masto.ai avatar
NeadReport, to design
@NeadReport@vivaldi.net avatar

Shapes! Pick one, choose your colors and gradients. Download your SVG creation. No attribution required. Free.

https://www.svgshapes.in
https://tinter.uxie.io
https://meshgradient.in
https://svgwave.in

AlanC, to photography
@AlanC@pixelfed.social avatar

"At the touch of love everyone becomes a Poet" ~Plato
.

thisismyglasgow, to architecture
@thisismyglasgow@mastodon.scot avatar

The Scottish Event Campus in Glasgow just after sunset this evening. I love all those colours and shapes!

MarkMaguire, to random
mikako6, to random Japanese
@mikako6@fedibird.com avatar

Bowling alley's Orange

lacochran, to photography
  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • rosin
  • normalnudes
  • everett
  • DreamBathrooms
  • ethstaker
  • magazineikmin
  • thenastyranch
  • Youngstown
  • GTA5RPClips
  • slotface
  • khanakhh
  • vwfavf
  • kavyap
  • megavids
  • mdbf
  • Leos
  • Durango
  • tacticalgear
  • InstantRegret
  • cubers
  • osvaldo12
  • ngwrru68w68
  • anitta
  • tester
  • modclub
  • cisconetworking
  • JUstTest
  • All magazines