{"id":17975282,"url":"https://github.com/chris00/rust-curve-sampling","last_synced_at":"2025-10-28T10:05:03.318Z","repository":{"id":58002092,"uuid":"490663806","full_name":"Chris00/rust-curve-sampling","owner":"Chris00","description":" Adaptive sampling of parametric curves (including graph of functions)  ","archived":false,"fork":false,"pushed_at":"2024-04-03T17:23:07.000Z","size":266,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-10T23:11:42.946Z","etag":null,"topics":["curve-tracing","plotting","plotting-functions","sampling"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Chris00.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}},"created_at":"2022-05-10T11:18:14.000Z","updated_at":"2022-12-20T00:55:34.000Z","dependencies_parsed_at":"2024-01-03T21:31:54.245Z","dependency_job_id":"6af389af-44b5-4944-bc87-ef4ee599e080","html_url":"https://github.com/Chris00/rust-curve-sampling","commit_stats":{"total_commits":73,"total_committers":1,"mean_commits":73.0,"dds":0.0,"last_synced_commit":"69c5f87a91423c4bb43ee1662c4e9e233f7e3bdd"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chris00%2Frust-curve-sampling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chris00%2Frust-curve-sampling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chris00%2Frust-curve-sampling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chris00%2Frust-curve-sampling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Chris00","download_url":"https://codeload.github.com/Chris00/rust-curve-sampling/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247098002,"owners_count":20883129,"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":["curve-tracing","plotting","plotting-functions","sampling"],"created_at":"2024-10-29T17:19:02.450Z","updated_at":"2025-10-28T10:04:58.278Z","avatar_url":"https://github.com/Chris00.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Curve Sampling\n==============\n\nThis module provide a collection of routines to perform adaptive\nsampling of curves as well as manipulating those samplings.\n\n\nUsage\n-----\n\nAdd this to your `Cargo.toml`:\n\n```\n[dependencies]\ncurve-sampling = \"0.5\"\n```\n\nSee the [documentation](https://docs.rs/curve-sampling/).\n\nExample\n-------\n\nTo sample the function x ↦ x sin(1/x) on the interval [-0.4, 0.4] with\n227 function evaluations, simply do\n\n```rust\nuse curve_sampling::Sampling;\nlet s = Sampling::fun(|x| x * (1. / x).sin(), -0.4, 0.4).n(227).build();\n```\n\nYou can save the resulting sampling to [TikZ][] with\n\n```rust\ns.latex().write(\u0026mut File::create(\"graph.tex\")?)?;\n```\n\nor to a data file (whose format is compatible with [Gnuplot][]) with\n\n```rust\ns.write(\u0026mut File::create(\"graph.dat\")?)?;\n```\n\nAsking [Gnuplot][] to draw the resulting curve (with `plot 'graph.dat'`) \nyields:\n\n![x sin(1/x)](https://user-images.githubusercontent.com/1255665/186882845-81dcbe02-808b-40d7-9fad-a838e326ce78.png)\n\nP.S. The number of evaluations (227) was chosen to match a depth 5\nrecursion for\n[Mathematica](https://github.com/Chris00/rust-curve-sampling/wiki).\n\n\n[TikZ]: https://tikz.dev/\n[Gnuplot]: http://www.gnuplot.info/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris00%2Frust-curve-sampling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchris00%2Frust-curve-sampling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris00%2Frust-curve-sampling/lists"}