[[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 just a toy / early release at this point, 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].
* Peruse [http://code.haskell.org/FieldTrip/doc/html/ the library documentation].
* Install [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/FieldTrip from Hackage].
* Download the code repository: '''darcs get http://code.haskell.org/FieldTrip'''. Patches welcome.
* Report bugs and request features on [http://trac.haskell.org/fieldtrip/ the tracker].
* Examine the [[FieldTrip/Versions| version history]].
== 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.]