{"id":15540303,"url":"https://github.com/rm-hull/implicit-equations","last_synced_at":"2025-04-23T16:43:37.826Z","repository":{"id":145430989,"uuid":"54237516","full_name":"rm-hull/implicit-equations","owner":"rm-hull","description":"A graphing library for implicit equations, in Clojure","archived":false,"fork":false,"pushed_at":"2023-11-30T00:28:59.000Z","size":1855,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-03T12:17:49.015Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rm-hull.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-18T23:36:26.000Z","updated_at":"2023-11-30T00:20:18.000Z","dependencies_parsed_at":"2023-11-30T01:31:19.049Z","dependency_job_id":"92acc7eb-40b2-4ee8-9933-cea5def70bed","html_url":"https://github.com/rm-hull/implicit-equations","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fimplicit-equations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fimplicit-equations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fimplicit-equations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm-hull%2Fimplicit-equations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rm-hull","download_url":"https://codeload.github.com/rm-hull/implicit-equations/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250472189,"owners_count":21436091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T12:13:29.110Z","updated_at":"2025-04-23T16:43:37.818Z","avatar_url":"https://github.com/rm-hull.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Implicit Equations\n\n[![Build Status](https://github.com/rm-hull/implicit-equations/actions/workflows/clojure.yml/badge.svg)](https://github.com/rm-hull/implicit-equations/actions/workflows/clojure.yml)\n[![Coverage Status](https://coveralls.io/repos/rm-hull/implicit-equations/badge.svg?branch=main)](https://coveralls.io/r/rm-hull/implicit-equations?branch=main)\n[![Dependencies Status](https://versions.deps.co/rm-hull/implicit-equations/status.svg)](https://versions.deps.co/rm-hull/implicit-equations)\n[![Maintenance](https://img.shields.io/maintenance/yes/2023.svg?maxAge=2592000)]()\n\nIn mathematics, an implicit equation is a relation of the form\n_R(x\u003csub\u003e1\u003c/sub\u003e,...,x\u003csub\u003en\u003c/sub\u003e) = 0_, where _R_ is a function of several variables (often\na polynomial). For example, the implicit equation of the unit circle is\n_x\u003csup\u003e2\u003c/sup\u003e + y\u003csup\u003e2\u003c/sup\u003e - 1 = 0_.\n\n## Examples\n\nGiven an X/Y equation (using the [infix](https://github.com/rm-hull/infix) library):\n\n```clojure\n(use 'implicit-equations.plot)\n(use 'infix.macros)\n\n(defn quadrifolium [x y]\n  (infix (x ** 2 + y ** 2) ** 3 - x ** 2 * y ** 2))\n```\n\nBy specifying some bounds, we can now render to PNG images, with the `draw`\ncommand - this renders onto a `BufferedImage` when the equation crosses zero:\n\n```clojure\n(draw quadrifolium \"graph.png\" {:bounds 1 :line-width 4})\n```\n\nto produce:\n\n![PNG](https://rawgithub.com/rm-hull/implicit-equations/main/doc/quadrifolium.png)\n\nOther equations produce the following plots:\n\n### Knot Curve\n\n![PNG](https://rawgithub.com/rm-hull/implicit-equations/main/doc/knot-curve.png)\n\n```clojure\n(defn knot-curve [x y]\n  (infix (x ** 2 - 1) ** 2 - y ** 2 . (3 + 2 . y)))\n```\n\n### Biology\n\n![PNG](https://rawgithub.com/rm-hull/implicit-equations/main/doc/biology.png)\n\n```clojure\n(defn biology [x y]\n  (infix sin(sin x + cos y) - cos(sin(x . y) + cos x)))\n```\n\n### Chain-mesh\n\n![PNG](https://rawgithub.com/rm-hull/implicit-equations/main/doc/chain-mesh.png)\n\n```clojure\n(defn chain-mesh [x y]\n  (infix sin((x ** 2) + (y ** 2)) - cos(x . y)))\n```\n\n### Checkerboard\n\n![PNG](https://rawgithub.com/rm-hull/implicit-equations/main/doc/checkerboard.png)\n\n```clojure\n(defn checkerboard [x y]\n  (infix exp(sin x + cos y) - sin(exp(x + y))))\n```\n\n### Dizzy\n\n![PNG](https://rawgithub.com/rm-hull/implicit-equations/main/doc/dizzy.png)\n\n```clojure\n(defn dizzy [x y]\n  (infix abs(sin(x ** 2 - y ** 2)) - (sin(x + y) + cos(x . y))))\n```\n\n### Glint\n\n![PNG](https://rawgithub.com/rm-hull/implicit-equations/main/doc/glint.png)\n\n```clojure\n(defn glint [x y]\n  (infix abs(sin(x ** 2 + 2 . x . y)) - sin(x - 2 . y)))\n```\n\n### Spira\n\n![PNG](https://rawgithub.com/rm-hull/implicit-equations/main/doc/spira.png)\n\n```clojure\n(defn spira [x y]\n  (infix sin(x ** 2 + y ** 2) - sin(x ÷ y ** 2))\n```\n\n### Bands\n\n![PNG](https://rawgithub.com/rm-hull/implicit-equations/main/doc/bands.png)\n\n```clojure\n(defn bands [x y]\n  (infix sin(1 - x ** 2) . sin(2 - y ** 2) . x . y - cos (2 - y ** 2)))\n```\n\nRefined from: http://mathematica.stackexchange.com/questions/19590/what-is-a-good-way-to-plot-some-difficult-implicit-equations\n\n## References\n\n- http://www.xamuel.com/graphs-of-implicit-equations/\n- http://www.peda.com/grafeq/\n- http://www.padowan.dk/\n- http://doc.sagemath.org/html/en/reference/plot3d/sage/plot/plot3d/implicit_plot3d.html\n- http://mathematica.stackexchange.com/questions/69421/plot-of-implicit-equations\n- http://wmueller.com/precalculus/newfunc/4.html\n- https://en.wikipedia.org/wiki/Implicit_curve\n- http://www-groups.dcs.st-and.ac.uk/~history/Curves/Curves.html\n- http://www.implicitcad.org/\n- https://christopherolah.wordpress.com/2011/11/06/manipulation-of-implicit-functions-with-an-eye-on-cad/\n- https://en.wikipedia.org/wiki/Marching_squares\n\n## License\n\n### The MIT License (MIT)\n\nCopyright (c) 2016 Richard Hull\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frm-hull%2Fimplicit-equations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frm-hull%2Fimplicit-equations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frm-hull%2Fimplicit-equations/lists"}