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
-
q is the number of points to plot;
-
p is the point to which point 0 is connected.
-
a defines x(i)=cos(a*2*pi*i/q);
b defines y(i)=sin(b*2*pi*i/q).
Licensing:
The information on this web page is distributed under the MIT license.
Languages:
caustic_opengl is available in
a C++ version.
Related Data and Programs:
caustic_opengl_test
opengl_test,
a C++ code which
uses opengl() to display graphic images on the screen;
Reference:
-
Edward Angel,
Interactive Computer Graphics,
a Top-Down Approach with OpenGL,
Addison-Wesley, 2000,
ISBN: 0-201-38597-X,
LC: T385.A514.
-
Renate Kempf, Chris Frazier, editors,
OpenGL Reference Manual,
Fourth Edition,
Addison-Wesley, 2004,
ISBN: 032117383X,
LC: T385.O642.
-
Mason Woo, Jackie Neider, Tom Davis,
OpenGL Programming Guide,
Addison-Wesley, 1997,
ISBN: 0-201-46138-2,
LC: T385.N435.
-
Richard Wright, Michael Sweet,
OpenGL Superbible,
Third Edition,
Sams, 2004,
ISBN: 0672326019,
LC: T385.W73.
-
https://www.opengl.org/
The official OpenGL site.
Source Code:
Last revised on 16 April 2023.