![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@thi.ng/geom
Advanced tools
This project is part of the @thi.ng/umbrella monorepo.
This package is a partial WIP port of selected features of the Clojure/ClojureScript version of thi.ng/geom, as well as c.thi.ng. Currently only 2D shapes & operations are supported.
This package will soon be replaced by the currently still unreleased @thi.ng/geom2 package
ALPHA - major breaking changes forthcoming...
yarn add @thi.ng/geom
import * as g from "@thi.ng/geom";
import * as v from "@thi.ng/vectors";
import * as h from "@thi.ng/hiccup";
import * as svg from "@thi.ng/hiccup-svg";
import * as fs from "fs";
const tintedPoly = (points) => {
const p = g.polygon2(points);
const c = p.centroid().toPolar();
p.attribs = { fill: `hsl(${v.deg(c.y)},${c.x}%,${100-c.x/2}%)` };
return p;
};
fs.writeFileSync(
"tessel.svg",
h.serialize(
svg.svg(
{
width: 1000, height: 1000,
viewBox: "-100 -100 200 200",
fill: "none",
stroke: "#000",
"stroke-width": 0.5,
},
svg.convertTree(
g.circle2(100)
.toPolygon(6)
.tessellate([g.quadFan, g.triFan, g.edgeSplit, g.quadFan])
.map((pts) => tintedPoly(pts).toHiccup())
)
)
)
);
Chaikin (closed) | Chaikin (open) |
---|---|
g.polygon2([-100,-100, 0,100, 100,-100, 0,0]).subdivide(g.CHAIKIN_CLOSED, 4);
g.polyline2([-100,100, -100,-100, 0,0, 100,-100, 100,100]).subdivide(g.CHAIKIN_OPEN, 4);
© 2013 - 2018 Karsten Schmidt // Apache Software License 2.0
FAQs
Functional, polymorphic API for 2D geometry types & SVG generation
The npm package @thi.ng/geom receives a total of 671 weekly downloads. As such, @thi.ng/geom popularity was classified as not popular.
We found that @thi.ng/geom demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.