# Difference between revisions of "FieldTrip"

(improving formating, adding architecture discussion) |
|||

Line 1: | Line 1: | ||

[[Category:Libraries]] |
[[Category:Libraries]] |
||

− | Field Trip is a library for describing 3D scenes declaratively |
+ | Field Trip is a library for describing 3D scenes declaratively. It is intended |

+ | as an open and machine/technology independent API for building animations as well as still life pictures. We also supply a bridge to use the OpenGL rendering engine, but other technologies are envisioned, for example a raytracing based renderer. |
||

+ | |||

+ | It is in active development by Conal Elliot and Andy Gill. |
||

== Architecture == |
== Architecture == |
||

+ | The basic purpose of the core FieldTrip library is to allow a user build a 3D scene. The principal types are as follows. |
||

+ | <dl> |
||

+ | <dt><b>data</b> Geometry3</dt> |
||

+ | <dd>A abstract type describing a number of objects in 3D space. These objects can be scaled, rotated or translated in space, as well as grouped. |
||

+ | </dd> |
||

+ | <dt><b>type</b> Surf a = (a,a) -> (a,a,a)</dt> |
||

+ | <dd> |
||

+ | Primitive Geometry3's are build from surfaces, which represented as a function from R2 to R3 - so this function maps every point on the (2D) surface onto a point in 3D. |
||

+ | </dd> |
||

+ | |||

+ | <dt>Normal and Derivatives</dt> |
||

+ | <dd>One novel feature of FieldTrip is the automation of derivative computation. We represent our surfaces using (more text) .. This design allows us to perform functions over surfaces, adding ripples and other deformities. |
||

+ | |||

+ | </dd> |
||

+ | |||

+ | <dt><b>type</b> ImageC = (a,a) -> Color</dt> |
||

+ | <dd>We represent all 2D images as straightforward functions from location (in 2D) to color (including an alpha component). |
||

+ | <dd> |
||

+ | |||

+ | </dl> |
||

+ | |||

+ | The standard way of creating basic Geometry3 uses all these architectural features, using Surf and ImageC to realize a Geometry3, as well as the derivative mechanism to compute normals for realistic lighting. |
||

+ | |||

+ | In FieldTrip we provide some basic shapes of surfaces (spheres, torus, cubes, etc) and many functions for manipulating surfaces an |
||

+ | |||

+ | |||

+ | AJG: Not sure about lines (R1 -> R3) and points (R0 -> R3). How big is a point anyway? OpenGL seems to think in terms of visible pixels here. It would help with some animations to have them, but how do you raytrace a point? Give it size, obviously. |
||

== The FieldTrip Universe == |
== The FieldTrip Universe == |
||

Line 13: | Line 40: | ||

⚫ | |||

+ | <dl> |
||

⚫ | |||

+ | <dt>FieldTrip</td> |
||

⚫ | |||

⚫ | |||

⚫ | |||

+ | </dd> |
||

⚫ | |||

+ | |||

+ | <dt>FieldTrip-OpenGL</td> |
||

⚫ | |||

+ | </dd> |
||

+ | |||

+ | <dt>FieldTrip-GLUT</td> |
||

⚫ | |||

+ | </dd> |
||

+ | |||

+ | <dt>FieldTrip-GLFW</td> |
||

⚫ | |||

+ | </dd> |
||

+ | |||

+ | <dt>FieldTrip-OSX</td> |
||

⚫ | |||

+ | </dd> |
||

+ | </dl> |

## Revision as of 03:02, 10 July 2008

Field Trip is a library for describing 3D scenes declaratively. It is intended
as an open and machine/technology independent API for building animations as well as still life pictures. We also supply a bridge to use the OpenGL rendering engine, but other technologies are envisioned, for example a raytracing based renderer.

It is in active development by Conal Elliot and Andy Gill.

## Architecture

The basic purpose of the core FieldTrip library is to allow a user build a 3D scene. The principal types are as follows.

**data**Geometry3- A abstract type describing a number of objects in 3D space. These objects can be scaled, rotated or translated in space, as well as grouped.
**type**Surf a = (a,a) -> (a,a,a)- Primitive Geometry3's are build from surfaces, which represented as a function from R2 to R3 - so this function maps every point on the (2D) surface onto a point in 3D.
- Normal and Derivatives
- One novel feature of FieldTrip is the automation of derivative computation. We represent our surfaces using (more text) .. This design allows us to perform functions over surfaces, adding ripples and other deformities.
**type**ImageC = (a,a) -> Color- We represent all 2D images as straightforward functions from location (in 2D) to color (including an alpha component).

The standard way of creating basic Geometry3 uses all these architectural features, using Surf and ImageC to realize a Geometry3, as well as the derivative mechanism to compute normals for realistic lighting.

In FieldTrip we provide some basic shapes of surfaces (spheres, torus, cubes, etc) and many functions for manipulating surfaces an

AJG: Not sure about lines (R1 -> R3) and points (R0 -> R3). How big is a point anyway? OpenGL seems to think in terms of visible pixels here. It would help with some animations to have them, but how do you raytrace a point? Give it size, obviously.

## The FieldTrip Universe

Field trip has a number of packages.

- FieldTrip</td>
- The basic library of combinators for building 3D scenes.
- FieldTrip-OpenGL</td>
- The library for rendering a scene in real time, using the OpenGL library.
- FieldTrip-GLUT</td>
- The library for opening a viewer into a FieldTrip OpenGL based scene.
- FieldTrip-GLFW</td>
- Same, for GLFW.
- FieldTrip-OSX</td>
- An alternative version of GLUT/GLFW that provides access the the OSX extensions, for example .mov file capture. </dl>