{"id":48338869,"url":"https://github.com/arran4/heatplot","last_synced_at":"2026-04-05T04:01:32.326Z","repository":{"id":335209366,"uuid":"437437090","full_name":"arran4/heatplot","owner":"arran4","description":"This program takes a formula and plots the \"heat\" for any particular location","archived":false,"fork":false,"pushed_at":"2026-04-04T07:19:59.000Z","size":36086,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-04T08:28:07.428Z","etag":null,"topics":["experiment","golang","graph","heatplot","maths","plot","testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"afl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arran4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-12-12T02:45:23.000Z","updated_at":"2026-03-30T23:41:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/arran4/heatplot","commit_stats":null,"previous_names":["arran4/heatplot"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/arran4/heatplot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arran4%2Fheatplot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arran4%2Fheatplot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arran4%2Fheatplot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arran4%2Fheatplot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arran4","download_url":"https://codeload.github.com/arran4/heatplot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arran4%2Fheatplot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31423887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T02:22:46.605Z","status":"ssl_error","status_checked_at":"2026-04-05T02:22:33.263Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["experiment","golang","graph","heatplot","maths","plot","testing"],"created_at":"2026-04-05T04:00:43.606Z","updated_at":"2026-04-05T04:01:32.308Z","avatar_url":"https://github.com/arran4.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# heatPlot\n\n`heatPlot` is a Go tool for generating animated heatmaps (GIFs) from mathematical functions. It parses mathematical expressions involving variables `x`, `y`, and `t` (time), and renders them as a heatmap.\n\n## Installation\n\nEnsure you have Go installed (Go 1.22+ recommended).\n\nClone the repository and install the dependencies:\n\n```bash\ngit clone https://bitbucket.org/arran4/heatplot.git\ncd heatplot\ngo mod tidy\n```\n\n## Usage\n\nThere are three main commands available in the `cmd` directory:\n\n### 1. heatPlot\n\nGenerates a heatmap GIF from a provided mathematical formula.\n\n**Build:**\n\n```bash\ngo build -o heatPlot cmd/heatPlot/main.go\n```\n\n**Run:**\n\n```bash\n./heatPlot [flags] \"formula\"\n```\n\n**Flags:**\n\n- `-hcc`: Heat colour count (default 126).\n- `-speed`: Duration between frames (default 100ms).\n- `-pointSize`: Scale of x/y steps (default 0.1).\n- `-scale`: Magnification (default 2).\n- `-tlb`: Time lower bound (start T, default 0).\n- `-tub`: Time upper bound (end T, default 100).\n- `-size`: Cartesian plane size (default 100, i.e., -100 to 100).\n- `-outputFile`: Output filename (default \"./out.gif\").\n- `-footerText`: Footer text (default \"http://github.com/arran4/\").\n\n**Example:**\n\n```bash\n./heatPlot -outputFile=\"example.gif\" \"y = x * sin(t/10)\"\n```\n\n### 2. heatPlotRandom\n\nGenerates random functions and renders one that meets certain \"interestingness\" criteria (complexity, movement).\n\n**Build:**\n\n```bash\ngo build -o heatPlotRandom cmd/heatPlotRandom/main.go\n```\n\n**Run:**\n\n```bash\n./heatPlotRandom [flags]\n```\n\n**Flags:**\n\nSimilar to `heatPlot`, with additional criteria for random generation.\n\n### 3. whatFunctions\n\nLists all available single and double parameter functions supported by the parser.\n\n**Build:**\n\n```bash\ngo build -o whatFunctions cmd/whatFunctions/main.go\n```\n\n**Run:**\n\n```bash\n./whatFunctions\n```\n\n## Formula Syntax\n\nThe parser supports:\n- Variables: `x`, `y`, `t`\n- Constants: Numbers\n- Operators: `+`, `-`, `*`, `/`, `%` (modulus), `^` (power)\n- Functions: `sin`, `cos`, `tan`, `abs`, `max`, `min`, `pow`, etc. (See `whatFunctions` for full list)\n- Grouping: `()`\n\nThe parser generally expects an equation, often in the form `LHS = RHS`. The heatmap value is calculated as `RHS - LHS`.\n\n## Examples\n\n### Sine Wave\n\n`y = x * sin(t/10)`\n\n![Sine Wave](example_sin.gif)\n\n### Complex Interaction\n\n`y = x * sin(t/10) + y * cos(t/10)`\n\n![Complex Interaction](example_complex.gif)\n\n### Ripple\n\n`y = sin(sqrt(x^2 + y^2) - t/5)`\n\n![Ripple](example_ripple.gif)\n\n### Interference\n\n`y = sin(x/10) + cos(y/10) * sin(t/10)`\n\n![Interference](example_interference.gif)\n\n## Development\n\n### Prerequisites\n\n- Go 1.22 or later\n- Make\n\n### Building\n\nTo regenerate the parser from `calc.y`:\n\n```bash\nmake setup\nmake yacc\n```\n\n### Testing\n\nRun the tests:\n\n```bash\ngo test ./...\n```\n\n## License\n\nThis project is licensed under the Academic Free License version 3.0 (AFL-3.0) - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farran4%2Fheatplot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farran4%2Fheatplot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farran4%2Fheatplot/lists"}