TraceBuddy is a general purpose ray tracer.

However, it's primary goal is to support rendering implicit functions using interval arithmetics.

Constants

EPS → double

relative accuracy for floating-point calculations

const 0.000001
MAX_DIST → double

const 999999.0

Classes

AmbientShader

A AmbientShader returns radiance based on its ambient coefficient.

BoundingBox

A 3-dimensional bounding box.

Camera

A Camera is defined by its resolution. The camera generates Rays for every pixel of the image.

CartesianCoordinateSystem

A CartesianCoordinateSystem is a special primitive, it represents the x,y and z-axes. Only one instance of the CartesianCoordinateSystem can exist per scene, therefore it is implemented as singleton.

DefaultSampler

The DefaultSampler generates one sample per pixel, which is positioned in the middel of the pixel.

IdGen

The IdGen is a simple unique ID generator. It uses sequential ids.

ImplicitFunction

A ImplicitFunction is defined by a MathFunction.

InfinitePlane

An InfinitePlane is specified by its plane equation.

Intersection

The Intersection class represents a ray/object intersection. It contains the distance to the hit point, the affected Primitive, and the hit point as Point3.

OutputMatrix

Matrix containing the output colors at every pixel of the final image set by the renderer. The color information are stored as uint8 clamped RGB<A> values, with each component in the interval 0..255.

PerspectiveCamera

The PerspectiveCamera generates rays for a perspective projection. It is defined by its center, viewing direction, up vector, vertical opening angle of the image and resolution.

PhongShader

A PhongShader uses the phong reflection model to determine the surface radiance.

PluggableShader

A PluggableShader can be used together with a primitive. It is aware of its location and its surface normal to return the proper radiance.

Primitive

A Primitive is an arbitrary object which can be part of a scene and rendered by the ray tracer.

Ray

A Ray can be represented by its origin in space, direction vector and time traveled:

RegularSampler

The RegularSampler generates multiple samples per pixel, distributed regularly.

Renderer

The Renderer takes a Sampler, Camera and Scene and can render an image based on this information.

Sample

A Sample has a position within a pixel and a weigth.

Sampler

A Sampler generates samples for a given pixel.

Scene

A Scene basically is a collection of Primitives which together form the scene to be rendered.

Shader

A Shader determines the appearance of a Primitive at a certain hit point.

Sphere

A Sphere, defined by its center point and radius.