home dev games gallery work
Lewpen.com»Research & Development»3D Graphics»OpenGL»Reflective Sphere

Reflective Sphere

Analytical reflections in OpenGL

/ Source / common / 001 / interpolate.h

/*
  INTERPOLATION ROUTINES

  All take the form

  double interpolateWhatever( double x1, double x2, double alpha )

    if you change alpha gradually from 0 to 1 the return value will start at x1, and finish at x2

*/


#ifndef __INTERPOLATE_H__
#define __INTERPOLATE_H__





//---- INTERPOLATION FUNCTION TYPE

typedef double (*INTERPOLATION_FUNCTION)( double, double, double );





//---- INTERPOLATION FUNCTIONS

double interpolateLinear ( double x1, double x2, double a );
double interpolateSpringy( double x1, double x2, double a );  //  Has a little bounce at the end





#endif
Related Articles

Procedural city block layout

Animated 4-dimensional objects mapped down to 3D

Simulating a cloth falling and slipping over objects

Windows C++ OpenGL example

Games

The Dodge Game
Flatspace

2-Player Games:

Quake 2D
Meteora

Puzzle Games:

Mini Tetris
Sudoku Solver

Development

3D Graphics:

3D Graphics Articles
WebGL Examples
OpenGL Examples
Flash 3D Engine
Java 3D Engine

Development:

Programming Articles
Game Development Examples

Work

Portfolio
Clients
Startups & Projects
Expertise

Links

CubeLogix Studios
PHP Charts & Graphs
Local Legends Football