{"id":16147484,"url":"https://github.com/edap/ofxphyllotaxis","last_synced_at":"2025-10-11T19:14:26.723Z","repository":{"id":145594123,"uuid":"90484422","full_name":"edap/ofxPhyllotaxis","owner":"edap","description":"Phyllotaxis algorithm implementation for openFrameworks","archived":false,"fork":false,"pushed_at":"2018-12-03T08:08:26.000Z","size":665,"stargazers_count":28,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-03T19:49:08.807Z","etag":null,"topics":["addon","algorithmic-botany","botanics","openframeworks","phyllotaxis"],"latest_commit_sha":null,"homepage":"","language":"Makefile","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/edap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2017-05-06T18:55:11.000Z","updated_at":"2024-12-27T22:02:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"d164f0e5-5971-471d-bd5f-ec465d3d2934","html_url":"https://github.com/edap/ofxPhyllotaxis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/edap/ofxPhyllotaxis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edap%2FofxPhyllotaxis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edap%2FofxPhyllotaxis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edap%2FofxPhyllotaxis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edap%2FofxPhyllotaxis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edap","download_url":"https://codeload.github.com/edap/ofxPhyllotaxis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edap%2FofxPhyllotaxis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008451,"owners_count":26084459,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["addon","algorithmic-botany","botanics","openframeworks","phyllotaxis"],"created_at":"2024-10-10T00:25:27.238Z","updated_at":"2025-10-11T19:14:26.693Z","avatar_url":"https://github.com/edap.png","language":"Makefile","readme":"# ofxPhyllotaxis\n\n[![Build status](https://travis-ci.org/edap/ofxPhyllotaxis.svg?branch=master)](https://travis-ci.org/edap/ofxPhyllotaxis)\n[![Build status](https://ci.appveyor.com/api/projects/status/o55dw650w0mwohtk?svg=true)](https://ci.appveyor.com/project/edap/ofxphyllotaxis)\n\nThis addons simply consists of three static methods that implements a model that describes the arrangement of leaves on a plant stem, called \u003ca href=\"https://en.wikipedia.org/wiki/Phyllotaxis\"\u003ephyllotaxis\u003c/a\u003e.\n\n## Usage\nIt can be used to position the elements of a collection composed by 2D or 3D forms. For example, assuming you have a bunch of `ofBoxPrimitive` in a vector, it can be used in a loop like this:\n\n```cpp\n// initialize a collection\nchildren vector\u003cofBoxPrimitives\u003e;\nint nCubes = 400;\nfor (int i = 0;  i \u003c nCubes; i++) {\n    children.push_back(ofBoxPrimitive(5,5,5));\n}\n\n// iterate and position items\nfloat rad = ofDegToRad(137.5);\nfloat spread = 0.3;\nfor (int i = 0;  i \u003c nCubes; i++) {\n    glm::vec3 pos;\n    pos = ofxPhyllotaxis::simple(i, rad, spread);\n    children[i].setPosition(pos);\n}\n```\n\nIn the example application, it is used in a 3D scene. It provides 3 methods slightly differents from each other.\n\n### Simple\n\n![simple](img/1.png)\n\n```cpp\nglm::vec3 simple(const int i, const float angleInRadians, const float spread)\n```\n\n`i` is the current index in the iteration\n\n`angleInRadian` is the angle that is used in the phyllotaxis. It needs to be expressed in radians\n\n`spread` defines how much each element should be distant from the previous one\n\n## Conical\n\n![conical](img/2.png)\n\n```cpp\nglm::vec3 conical(const int i, const float angleInRadians,const float spread, const float extrude)\n```\n\nThe parameters are the same as before, except\n\n`extrude` defines how much the elements should be pushed on the `y` axis\n\n## Apple\n\nI did not find any better name, feel free to give me suggestions.\nThe following picture is taken from \"inside the apple\".\n\n![apple](img/3.png)\n\n```cpp\nglm::vec3 apple(const int i, const float angleInRadians, const float spread, const int total)\n```\n\nThe parameter `total` indicates the total number of the element in the collection.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedap%2Fofxphyllotaxis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedap%2Fofxphyllotaxis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedap%2Fofxphyllotaxis/lists"}