TheAlgorithms/C++ 1.0.0
All the algorithms implemented in C++
|
Implementation of Spirograph More...
#include <array>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <sstream>
Go to the source code of this file.
Namespaces | |
namespace | 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) |
Implementation of Spirograph
Implementation of the program is based on the geometry shown in the figure below:
Definition in file spirograph.cpp.
#define _USE_MATH_DEFINES |
required for MSVC compiler
Definition at line 23 of file spirograph.cpp.
int main | ( | int | argc, |
char ** | argv ) |
Main function
Definition at line 268 of file spirograph.cpp.