Haskell-Things / Haskell-Things/ImplicitCAD

Generalize core primitives to abstract number type

Open
#447 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.6k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

We can turn `circle :: ℝ -> SymbolicObj2` into e.g. `circle :: Num a => a -> SymbolicObj2 a`.

That would allow us to use different numerical types instead of being fixed on `Doubles`. Some fun examples include
- discrete type like `Integer`
- arbitrarily precise `CReal` from https://hackage.haskell.org/package/exact-real
- symbolic `Sym` from https://hackage.haskell.org/package/numbers-3000.2.0.2/docs/Data-Number-Symbolic.html
- `ℝ` from https://github.com/Haskell-Things/ImplicitCAD/pull/225
- types with dimensions (`units` or `dimensional`)

It would also open a lot of doors to other backends like `accelerate` or `GLSL`, where symbolic objects could be represented as, well.. symbolic functions.

Also an analytical simplification step could be implemented before actual discretization and evaluation which could drastically improve performance for some cases.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.