POV-Ray : Newsgroups : povray.unofficial.patches : Fractal patch? : Re: Fractal patch? Server Time
2 Nov 2024 11:24:07 EDT (-0400)
  Re: Fractal patch?  
From: Thomas Willhalm
Date: 17 Nov 1999 11:59:39
Message: <qqmhfilnjes.fsf@goldach.fmi.uni-konstanz.de>
Peter Popov <pet### [at] usanet> writes:

> On 17 Nov 1999 05:57:46 -0500, Nieminen Juha
> 
> BTW I spent three days searching for info on how to raise a complex
> number to a complex power. I found no explanation, anywhere, though I
> did find some commercial C and Python libraries for doing it. For now,
> I'll just consider it impossible.

This is not too diffucult. You probably know the equations for real numbers:
a^c = exp(log(a^c)) = exp(c*log(a))
We use this to define a it for complex numbers:
(a+ib)^(c+id) := exp( (c+id)*log(a+ib))
Of course, you must also know how to calculate the definition of the complex 
exponentional function:
exp(a+ib) = exp(a) * exp(ib) = exp(a) * ( cos b + i sin b )
The problem is the definition of the complex logarithm. It is not possible
to define it as a continuous function. You can however define it for all 
complex numbers except real ones that are lower or equal zero. As formula:
C \ { a+ib | a,b in R, a<=0 and b=0 }
Every such number can be described as r*exp(i*p) with 
  r in ]0;infinity[ being sqrt(a*a+b*b)
  p in ]-pi,pi[     being the angle (1,0) (0,0) (a,b)
Now, the (or more precisely a) complex logarithm can be defined as:
  log(r) + i*p

Play around with these formulas to find an efficient way to calculate the
complex power function.

I hope this helps.

Thomas

P.S.: I'm sure that there're others who know much more about this subject
than I do.

-- 
http://thomas.willhalm.de/
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2i

mQCNAzgBwGkAAAEEAKx6RGDGAhjwr2kEv7Z2oxx2SoYBpMWCN2M76HE0GLHRvvto
RMfuLp+ECPoyutG9DnrwpLGNKwntY10qsWNPZNHZ9obZOtQcZf+hYs+A/283l7Iv
EKtKsggRATbd44NECkkKLuWZzuklNaoSAN7SOnmG94ZpcjZTfIwTzXgp3F/9AAUR
tCRUaG9tYXMgV2lsbGhhbG0gPHRob21hc0B3aWxsaGFsbS5kZT4=
=UScf
-----END PGP PUBLIC KEY BLOCK-----


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.