[[Category:Graphics]]
[[Category:3D]]
[[Category:Packages]]
== Abstract ==
[[Image:Torus-pair-d-shadowed.png|right|thumb|300px|Torus pair modeled and rendered in FieldTrip]]
'''FieldTrip''' is a library for functional 3D graphics, intended for building static, animated, and interactive 3D geometry, efficient enough for real-time synthesis and display.
Our first renderer uses OpenGL, with the usual visual limitations.
Since FieldTrip is functional, it is about ''being'' rather than ''doing''.
One describes what models are, not how to render them.
FieldTrip is work-in-progress.
It's being released to show what's going on and see who's interested in collaborating on developing it further.
Besides this wiki page, here are more ways to find out about and get involved with FieldTrip:
* Join the [http://www.haskell.org/mailman/listinfo/FieldTrip FieldTrip mailing list].
* Visit the [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/FieldTrip Hackage page] for library documentation and to download & install.
* Or install with cabal install FieldTrip.
* Get the code repository: darcs get http://code.haskell.org/FieldTrip.
* Report bugs and request features on [http://trac.haskell.org/FieldTrip/ the tracker].
== Basic types ==
The basic purpose of the core FieldTrip library is to allow a user build 3D geometry, from individual simple shapes to full 3D scenes. The principal types are as follows.
; Test.hs
).
The [http://code.haskell.org/FieldTrip/doc/html/Graphics-FieldTrip-ParamSurf.html#v%3Atorus torus]
function used here is a simple wrapper around a parametric surface defined as follows:
[http://code.haskell.org/FieldTrip/doc/html/Graphics-FieldTrip-ParamSurf.html Graphics.FieldTrip.ParamSurf]
, along with other tools for shape generation.
The trick to turning this polymorphic src/Test.hs
, as follows:
~/Haskell$ cd reactive-fieldtrip/src ~/Haskell/reactive-fieldtrip/src$ ghci GHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer ... linking ... done. Loading package base ... linking ... done. Prelude> :l Test :l Test [1 of 2] Compiling FRP.Reactive.FieldTrip.Adapter ( FRP/Reactive/FieldTrip/Adapter.hs, interpreted ) [2 of 2] Compiling Test ( Test.hs, interpreted ) Ok, modules loaded: FRP.Reactive.FieldTrip.Adapter, Test.Then run the example:
*Test> anim3 (spinningG torusPair) Loading package OpenGL-2.2.1.1 ... linking ... done. Loading package syb ... linking ... done. Loading package base-3.0.3.0 ... linking ... done. [...] Loading package reactive-0.9.0 ... linking ... done. Loading package FieldTrip-0.2.2 ... linking ... done. Loading package reactive-glut-0.0.5 ... linking ... done.== Some videos == * [http://www.youtube.com/watch?v=ulPsJzUCQi8 Texture-mapped Earth.] * [http://www.youtube.com/watch?v=WNB5V9Z7Obc The torus demo running in GHCi.]