lissajous, a C++ code which computes a Lissajous figure based on user input, and uses OpenGL to display it.
The user specifies information about the number of points, and the form of the two sine curves involved. Depending on these parameters, the resulting shape may or may not be a closed curve. The user also specifies a range for the underlying T parameter. Again, depending on the parameters, this value may result in a closed curve being drawn several times, or a closed curve being only partially drawn.
The program plots N points along the curve
t(i) = i * T2 / ( N - 1 )for 0 <= I <= N - 1.
x(i) = R1 * sin ( ( A1 * t(i) + B1 ) * 2 * pi )
y(i) = R2 * sin ( ( A2 * t(i) + B2 ) * 2 * pi )
The user specifies N, T2, A1, B1, A2 and B2. The parameters R1 and R2 are currently fixed at 1.
lissajous n t2 a1 b1 a2 b2where
The information on this web page is distributed under the MIT license.
lissajous is available in a C++ version and a MATLAB version and an Octave version and a Python version.
caustic_opengl, a C++ code which computes a caustic curve and displays it using OpenGL.
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.
opengl_test, a C++ code which illustrates the use of the OpenGL graphics library;
obj2opengl, a perl code 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;
ppma, a data directory which describes the ASCII Portable Pixel Map (PPM) format, which is a possible means of storing the graphics information displayed by OpenGL. One of the example programs shows how this can be done.
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.