By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,121 Members | 1,008 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,121 IT Pros & Developers. It's quick & easy.

generalised polynomials visualised

P: n/a

you will fall in love

!! these are the cutest critters !!

3-ary polynomial:

4-ary polynomial:

5-ary polynomial:

6-ary polynomial:

7-ary polynomial:

these are plots
of the class of generalised polynomials
i have been playing with

2 pi i / n
w = e

2 3 n-1
w_n w_n w_n w_n
y = x + x + x + x + ... + x

i coded the poynomials
in my openGL simulations engine
and color mapped the absolute value
over a part of the complex plane centered at the origin
x axis real positive to right
y axis imaginary positive up

there are a lot of immediate conjectures to make
but they are also tantalisingly difficult to prove

the zeroes (black) appear to have
some interesting number theoretic information

but above all they are adorable

the surfaces are fascinating
with the symmetries of their ripples
and the intricacies of their "mouths"

has their tale already been told?
or is this one those stories
that still needs to be written?


for those interested in the simulation
the behavior is coded as c++ or OCaml
( this particular class of functions in c++ )

first i define omega (w above)
or pull it from my library
something like

std::complex<doubleconst nthRoot(std::exp(2. * pi * i /
std::complex<double>(n, 0.)));

now i was using runtime variation of arity
but i also have a compiletime version as well
to unroll the loops
remove loop counter
and other optimisations

but it didn't make much a difference in time
having to compile so often

std::complex<doublerootOfUnityGeneralisedPolynomia l(unsigned n,
std::complex<doubleconst& z)
std::complex<doublesum(0., 0.);

for (unsigned termIndex(0); termIndex < n; ++termIndex)
std::complex<doubleterm(std::exp(std::pow(nthRoot, termIndex) *
sum += term;

//std::cout << "current term: " << term << std::endl;
//std::cout << "running sum: " << sum << std::endl;

return sum;

the simulator has visualisers for the complex plane

so i ran these through the engine
and colored it pretty!

galathaea: prankster, fablist, magician, liar
Dec 21 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.