C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

generalised polynomials visualised

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
galathaea
Guest





PostPosted: Thu Dec 21, 2006 10:10 am    Post subject: generalised polynomials visualised Reply with quote



you will fall in love

!! these are the cutest critters !!

3-ary polynomial:
http://i10.tinypic.com/2hwlir6.png

4-ary polynomial:
full
http://i13.tinypic.com/47u0yfm.png
close
http://i14.tinypic.com/2heajo5.png

5-ary polynomial:
full
http://i18.tinypic.com/2cifxja.png
close
http://i16.tinypic.com/2wcr9js.png

6-ary polynomial:
full
http://i14.tinypic.com/4fy3wd3.png
close
http://i17.tinypic.com/48zmlbl.png

7-ary polynomial:
full
http://i18.tinypic.com/2dalt9l.png
close
http://i10.tinypic.com/2j4rc7o.png

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

2 pi i / n
w = e
n

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

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<double> const 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<double> rootOfUnityGeneralisedPolynomial(unsigned n,
std::complex<double> const& z)
{
std::complex<double> sum(0., 0.);

for (unsigned termIndex(0); termIndex < n; ++termIndex)
{
std::complex<double> term(std::exp(std::pow(nthRoot, termIndex) *
std::log(z)));
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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.