MCPcopy Create free account
hub / github.com/TheAlgorithms/C / spirograph

Function spirograph

graphics/spirograph.c:57–68  ·  view source on GitHub ↗

Generate spirograph curve into arrays `x` and `y` such that the i^th point * in 2D is represented by `(x[i],y[i])`. The generating function is given by: * \f{eqnarray*}{ * x &=& R\left[ (1-k) \cos (t) + l\cdot k\cdot\cos \left(\frac{1-k}{k}t\right) * \right]\\ * y &=& R\left[ (1-k) \sin (t) - l\cdot k\cdot\sin \left(\frac{1-k}{k}t\right) * \right] \f} * where * * \f$R\f$ is the scaling par

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

testFunction · 0.85
test2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected