Which Haskell library for computer graphics geometry?

后端 未结 2 1189
你的背包
你的背包 2021-02-14 14:32

I would like to do some experiments in computer graphics in Haskell. This will include doing some geometry calculations and ultimately writing a ray tracer. Which library should

相关标签:
2条回答
  • 2021-02-14 14:42

    There is an interesting library called vector-space by Conal Eliott which allows you to lazily compute Taylor series of many analytic functions. See also here. Not sure about performance, though.

    0 讨论(0)
  • 2021-02-14 14:59

    For vectors and matrices that are used for transformations, vect probably is your best bet. It is optimized for fast, lower-precision (as in Double precision as opposed to Ratio precision) transformations like you described, and its role as the matrix stack in lambdacube (as an example of an application where performance is key) shows that it is fast enough for most applications.

    For data matrices - that are used for images, for example - you'd probably want to use repa, especially when doing data-parallel computations such as ray tracing.

    0 讨论(0)
提交回复
热议问题