{"id":15049257,"url":"https://github.com/casensiom/metaballs","last_synced_at":"2026-03-27T04:02:32.293Z","repository":{"id":202997057,"uuid":"708575888","full_name":"casensiom/metaballs","owner":"casensiom","description":"Header only 3d metaballs generator in C99","archived":false,"fork":false,"pushed_at":"2023-11-26T22:40:44.000Z","size":1018,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-29T19:33:36.498Z","etag":null,"topics":["3d","3d-graphics","3d-mesh-generation","c","c99","metaball","metaballs"],"latest_commit_sha":null,"homepage":"","language":"C","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/casensiom.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":"2023-10-23T00:02:17.000Z","updated_at":"2025-05-07T14:28:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"256ed080-7514-4507-a30a-e29afd40a0ad","html_url":"https://github.com/casensiom/metaballs","commit_stats":null,"previous_names":["casensiom/metaballs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/casensiom/metaballs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casensiom%2Fmetaballs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casensiom%2Fmetaballs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casensiom%2Fmetaballs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casensiom%2Fmetaballs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/casensiom","download_url":"https://codeload.github.com/casensiom/metaballs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/casensiom%2Fmetaballs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31018544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T03:51:26.850Z","status":"ssl_error","status_checked_at":"2026-03-27T03:51:09.693Z","response_time":164,"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":["3d","3d-graphics","3d-mesh-generation","c","c99","metaball","metaballs"],"created_at":"2024-09-24T21:19:19.272Z","updated_at":"2026-03-27T04:02:32.270Z","avatar_url":"https://github.com/casensiom.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Metaballs\r\n\r\n![Thumbnail](./thumbnail.jpg)\r\n\r\nHeader only 3d metaballs generator in C99\r\n\r\n## About\r\n\r\n[![Build Status](https://github.com/casensiom/metaballs/actions/workflows/cmake-multi-platform.yml/badge.svg)](https://github.com/casensiom/metaballs/actions)\r\n\r\nThis library computes 3d metaballs in pure C99.\r\n\r\n![Thumbnail](./thumbnail.gif)\r\n\r\nThere are optimizations yet to be done.\r\n\r\nThe example uses [raylib](https://www.raylib.com) as a render engine.\r\n\r\n## How to use\r\n\r\nThis library follows [single-file C/C++ public domain libraries](https://github.com/nothings/single_file_libs) rules.\r\n\r\nInclude the header file and the definition to include the implementation code in just one of the includes.\r\n\r\n```c\r\n#define METABALLS_IMPLEMENTATION\r\n#include \"metaballs.h\"\r\n``` \r\n\r\nRefer the [examples](https://github.com/casensiom/metaballs/examples/exmaple0.c) to see the library usage.\r\n\r\n### Create\r\n\r\nCreates the metaballs workspace\r\n```c\r\nIndex3d count = {.x = 10, .y = 10, .z = 10};\r\nVector3d size = {.x = 2, .y = 2, .z = 2};\r\nVector3d pos = {.x = 0, .y = 0, .z = 0};\r\nGrid grid = metaball_grid_create(count, size, pos);\r\n```\r\n\r\n### Generate mesh\r\nBuilds up the mesh to render the metaballs\r\n```c\r\nmetaball_generate_mesh(\u0026grid, balls);\r\n```\r\n\r\n### Destroy\r\nDestroys the metaballs workspace\r\n```c\r\nmetaball_grid_destroy(\u0026grid);\r\n```\r\n\r\n## Features\r\n- **Iteration**: Added a method to visit only valid neighbors.\r\n- **Optimization**: A rudimentary cache system is included.\r\n- **Color**: Added color per ball.\r\n- **Texture mapping**: Generate and upload mesh to GPU, texture mapping is available.\r\n- **Control**: Added mouse and keyboard control.\r\n\r\n## TODO\r\n - Code clean: Add prefix to library methods and structures. (Avoid name collision)\r\n - Known issue: The spheric texture mapping doesn't close correctly.\r\n - Performance: Avoid repeat vertex on mesh generation.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasensiom%2Fmetaballs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcasensiom%2Fmetaballs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcasensiom%2Fmetaballs/lists"}