spirograph.cpp File Reference

Implementation of Spirograph More...

`#include <array>`
`#include <cmath>`
`#include <cstdlib>`
`#include <ctime>`
`#include <fstream>`
`#include <iomanip>`
`#include <iostream>`
`#include <sstream>`
Include dependency graph for spirograph.cpp:

## Namespaces

| spirograph

## Macros

#define | _USE_MATH_DEFINES

## Functions

template<std::size_t N>
void | spirograph::spirograph (std::array< std::pair< double, double >, N > *points, double l, double k, double rot)
void | spirograph::test ()
| Test function to save resulting points to a CSV file.
int | main (int argc, char **argv)

## Detailed Description

Implementation of Spirograph

Author
  Krishna Vedala

Implementation of the program is based on the geometry shown in the figure below:

## Macro Definition Documentation

## _USE_MATH_DEFINES

#define _USE_MATH_DEFINES

required for MSVC compiler

## Function Documentation

## main()

int main | ( | int | argc,
|  | char ** | argv
| ) |  |

Main function

{
spirograph::test();
#ifdef USE_GLUT
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
glutCreateWindow("Spirograph");
glutInitWindowSize(400, 400);
// glutIdleFunc(glutPostRedisplay);
glutTimerFunc(spirograph::animation_speed, spirograph::timer_cb, 0);
glutKeyboardFunc(spirograph::keyboard_cb);
glutDisplayFunc(spirograph::test2);
glutMainLoop();
#endif
return 0;
}
test2
void test2(const std::string &text)
Self test 2 - using 8x8 randomly generated key.
Definition: hill_cipher.cpp:505
spirograph::test
void test()
Test function to save resulting points to a CSV file.
Definition: spirograph.cpp:93
Here is the call graph for this function: