{"id":15528392,"url":"https://github.com/samdvr/l-system","last_synced_at":"2025-03-28T21:42:18.094Z","repository":{"id":70614565,"uuid":"181330679","full_name":"samdvr/L-System","owner":"samdvr","description":null,"archived":false,"fork":false,"pushed_at":"2019-04-17T15:59:09.000Z","size":6990,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-03T08:01:40.597Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samdvr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-04-14T15:38:25.000Z","updated_at":"2022-07-11T17:31:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"33f33dad-d447-4d7e-b163-4cf1392924e4","html_url":"https://github.com/samdvr/L-System","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/samdvr%2FL-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdvr%2FL-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdvr%2FL-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdvr%2FL-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samdvr","download_url":"https://codeload.github.com/samdvr/L-System/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246106668,"owners_count":20724400,"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-02T11:12:48.099Z","updated_at":"2025-03-28T21:42:18.089Z","avatar_url":"https://github.com/samdvr.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# L-System\n\n\n[L-System](https://en.wikipedia.org/wiki/L-system)\nImage generator using [Doodle library](https://github.com/creativescala/doodle).\nExample generated images are in [here](https://github.com/samdvr/L-System/tree/master/examples).\n\nSample Language and Interpreter\n\n```scala\nimport algebra._\nimport doodle.turtle._\nimport doodle.turtle.Instruction._\nimport doodle.syntax._\nimport Draw._\n\n\nobject Implicits {\n\n  object Generator extends SequenceGenerator[Language]\n\n  implicit val rule: ProductionRule[Language] = {\n    case A =\u003e List(B, TurnLeft, A, TurnLeft, B)\n    case B =\u003e List(A, TurnRight, B, TurnRight, A)\n    case TurnLeft =\u003e List(TurnLeft)\n    case TurnRight =\u003e List(TurnRight)\n  }\n\n  implicit val drawer: Drawer[Language] = new Drawer[Language] {\n    override def convert: List[Language] =\u003e List[Instruction] = _.flatMap {\n      case A =\u003e List(forward(5))\n      case B =\u003e List(forward(5))\n      case TurnLeft =\u003e List(turn(-60.degrees))\n      case TurnRight =\u003e List(turn(60.degrees))\n    }\n  }\n}\n\nobject Runner extends App {\n  override def main(args: Array[String]): Unit = {\n    import Implicits._\n    val data = Generator.sequenceNumber(List(A, B), 10)\n    drawer.convert(data).draw\n  }\n}\n\n\n``` \n\n[L-System]: https://en.wikipedia.org/wiki/L-system\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdvr%2Fl-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamdvr%2Fl-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdvr%2Fl-system/lists"}