caustic_opengl


caustic_opengl, a C++ code which computes a caustic curve based on user input, and uses OpenGL to display it.

The user specifies a value Q, the number of points, a value P which controls which points will be connected, and values A and B which determine the curve on which the points lie.

The program then plots Q points along the curve

x(I) = cos ( A * 2 * i * pi / Q )
y(I) = sin ( B * 2 * i * pi / Q )
and connects each point I to point I+P, using modular arithmetic where necessary.

Usage:

caustic_opengl q p a b
where

Licensing:

The computer code and data files described and made available on this web page are distributed under the MIT license

Languages:

caustic_opengl is available in a C++ version.

Related Data and Programs:

caustic_opengl_test

fern_opengl, a C++ code which uses OpenGL to display the Barnsley fractal fern.

life_opengl, a C++ code which simulates a version of John Conway's "Game of Life", displaying the results using OpenGL.

lights_out_opengl, a C++ code which sets up a "Lights Out" game and allows the user to solve it, using the OpenGL graphics window.

lissajous_opengl, a C++ code which computes a Lissajous figure and displays it using OpenGL.

opengl_test, C++ codes which illustrate the use of the OpenGL graphics library;

OBJ2OPENGL, a PERL script which converts OBJ files of 3D data into C include files, which can then be used in an OpenGL program to display the object.

POLYGONAL_SURFACE_DISPLAY_OPENGL, a C++ code which displays a surface in 3D described as a set of polygons, using OpenGL.

ROTATING_CUBE_DISPLAY_OPENGL, a C++ code which displays a rotating color cube in 3D, using OpenGL;

SCREENSHOT_OPENGL, a C++ code which shows how a program using the OpenGL graphics library can save a screenshot of the graphics being displayed.

SPHERE_XYZ_DISPLAY_OPENGL, a C++ code which reads XYZ information defining points in 3D, and displays a unit sphere and the points, using OpenGL.

TET_MESH_DISPLAY_OPENGL, a C++ code which reads a pair of files defining a tetrahedral mesh and displays an image using OpenGL.

TRI_SURFACE_DISPLAY_OPENGL, a C++ code which displays the 3D graphics information in a TRI_SURFACE file using OpenGL.

TRIANGULATION_DISPLAY_OPENGL, a C++ code which reads a pair of files defining a triangulation and displays an image using OpenGL.

XY_DISPLAY_OPENGL, a C++ code which reads an XY file of 2D point coordinates, and displays an image of those points using OpenGL.

XYL_DISPLAY_OPENGL, a C++ code which reads XYL information defining points and lines in 2D, and displays an image using OpenGL.

XYZ_DISPLAY_OPENGL, a C++ code which reads an XYZ file of 3D point coordinates, and displays an image of those points using OpenGL.

Reference:

  1. Edward Angel,
    Interactive Computer Graphics, a Top-Down Approach with OpenGL,
    Addison-Wesley, 2000,
    ISBN: 0-201-38597-X,
    LC: T385.A514.
  2. Renate Kempf, Chris Frazier, editors,
    OpenGL Reference Manual,
    Fourth Edition,
    Addison-Wesley, 2004,
    ISBN: 032117383X,
    LC: T385.O642.
  3. Mason Woo, Jackie Neider, Tom Davis,
    OpenGL Programming Guide,
    Addison-Wesley, 1997,
    ISBN: 0-201-46138-2,
    LC: T385.N435.
  4. Richard Wright, Michael Sweet,
    OpenGL Superbible,
    Third Edition,
    Sams, 2004,
    ISBN: 0672326019,
    LC: T385.W73.
  5. http://www.opengl.org/
    The official OpenGL site.

Source Code:


Last revised on 16 April 2023.