py5coding on Nostr: The latest version of #py5 works with #shapely objects, implicitly converting them to ...
The latest version of #py5 works with #shapely objects, implicitly converting them to Py5Shape objects & drawing them to the screen:
from shapely import Polygon
size(999,999)
stroke_weight(19)
p=Polygon([[9,9], [9,990], [990,990], [990,9]])
for _ in range(8):
shape(p:=p.buffer(-50, single_sided=True))
#genuary #genuary5
Published at
2024-01-05 21:59:14Event JSON
{
"id": "4a505a66767c223054a45db8849fef6f678bf03b55cb4c84eef3a953989978c6",
"pubkey": "84ee38e8a3fd005f79ad54ce399885a0a0493f3345fcfcdd92353994b25bc89b",
"created_at": 1704491954,
"kind": 1,
"tags": [
[
"t",
"py5"
],
[
"t",
"Shapely"
],
[
"t",
"GENUARY"
],
[
"t",
"genuary5"
],
[
"proxy",
"https://fosstodon.org/users/py5coding/statuses/111705584744945667",
"activitypub"
]
],
"content": "The latest version of #py5 works with #shapely objects, implicitly converting them to Py5Shape objects \u0026 drawing them to the screen:\n\nfrom shapely import Polygon\n\nsize(999,999)\nstroke_weight(19)\np=Polygon([[9,9], [9,990], [990,990], [990,9]])\nfor _ in range(8):\n shape(p:=p.buffer(-50, single_sided=True))\n#genuary #genuary5\n\nhttps://cdn.fosstodon.org/media_attachments/files/111/705/578/779/536/742/original/32c379cd92d743ed.png",
"sig": "309f78b7a19176a56de677acc279096fb79397e68d7447c71bc89313aa6ab5e98187c927f4550a8de21aa454d0e8929782d01b661af83c8737909b01b42c3277"
}