Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samfrohlich/hypertexture
A domain specific language embedded into Haskell providing an expressive way of creating and combining Hypertextures.
https://github.com/samfrohlich/hypertexture
3d haskell
Last synced: 28 days ago
JSON representation
A domain specific language embedded into Haskell providing an expressive way of creating and combining Hypertextures.
- Host: GitHub
- URL: https://github.com/samfrohlich/hypertexture
- Owner: SamFrohlich
- License: bsd-3-clause
- Created: 2019-08-26T19:50:26.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-26T19:59:07.000Z (about 5 years ago)
- Last Synced: 2023-10-17T14:30:46.134Z (about 1 year ago)
- Topics: 3d, haskell
- Language: Haskell
- Size: 12.9 MB
- Stars: 7
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hypertexture Domain Specific Language
## Hypertexture
Hypertexture is shape description method that allows the representation of phenomena like fire or smoke. Instead of being represented as a shell 3D shapes are represented as an array of density values.
## The Code
This is a domain specific language embedded into Haskell providing an expressive way of creating and combining Hypertextures. The code includes a deep embedding that can be given different semantics by providing different instances of the `Alg` type class. Two example instances are also given:
* __Maya:__ Turns a subset of the DSL into `MEL` code that creates 3D shapes in [Maya](https://www.autodesk.co.uk)
* __Set:__ Compiles the language down to a set membership function. This function can be used to sample densities at specific points to produce cross sections or 3D renderings of Hypertexture.