spectrum.c File Reference

#include "common.h"
#include <stdio.h>
#include <math.h>
#include "machine.h"
#include "vmath.h"
#include "raytrace.h"
#include "spectrum.h"

Include dependency graph for spectrum.c:

Go to the source code of this file.

Defines

#define PLANCK_C1   37415
#define PLANCK_C2   14387.86
#define PLANCK(_w, _tempK)   (PLANCK_C1/(_w*_w*_w*_w*_w*(exp(PLANCK_C2/(_w*_tempK))-1)))

Functions

void rt_spect_make_CIE_XYZ (struct bn_tabdata **x, struct bn_tabdata **y, struct bn_tabdata **z, const struct bn_table *tabp)
void rt_spect_reflectance_rgb (struct bn_tabdata *curve, const float *rgb)
void rt_spect_black_body (struct bn_tabdata *data, double temp, unsigned int n)
void rt_spect_black_body_fast (struct bn_tabdata *data, double temp)
void rt_spect_black_body_points (struct bn_tabdata *data, double temp)

Variables

const double rt_CIE_XYZ [81][4]


Detailed Description

An application of the 'tabdata' package to spectral data.

(Note that there is also a rttherm/spectrum.c)

Author - Michael John Muuss

Source - The U. S. Army Research Laboratory Aberdeen Proving Ground, Maryland 21005-5068 USA

Inspired by - Roy Hall and his book "Illumination and Color in Computer Generated Imagery", Springer Verlag, New York, 1989. ISBN 0-387-96774-5

With thanks to Russ Moulton Jr, EOSoft Inc. for his "rad.c" module.

Definition in file spectrum.c.


Define Documentation

#define PLANCK_C1   37415
 

Definition at line 233 of file spectrum.c.

#define PLANCK_C2   14387.86
 

Definition at line 234 of file spectrum.c.

#define PLANCK _w,
_tempK   )     (PLANCK_C1/(_w*_w*_w*_w*_w*(exp(PLANCK_C2/(_w*_tempK))-1)))
 

Definition at line 240 of file spectrum.c.

Referenced by rt_spect_black_body(), rt_spect_black_body_fast(), and rt_spect_black_body_points().


Function Documentation

void rt_spect_reflectance_rgb struct bn_tabdata curve,
const float *  rgb
 

Definition at line 206 of file spectrum.c.

References BN_CK_TABDATA, BN_CK_TABLE, bn_table::nx, bn_tabdata::table, bn_table::x, and bn_tabdata::y.

void rt_spect_black_body_points struct bn_tabdata data,
double  temp
 

Definition at line 343 of file spectrum.c.

References BN_CK_TABDATA, BN_CK_TABLE, bu_debug, BU_DEBUG_TABDATA, bu_log(), data, bn_table::nx, PLANCK, and bn_table::x.

Here is the call graph for this function:


Variable Documentation

const double rt_CIE_XYZ[81][4]
 

Definition at line 67 of file spectrum.c.


Generated on Mon Sep 18 01:25:09 2006 for BRL-CAD by  doxygen 1.4.6