Placing complex roots in the shape of words

  • 11 Replies
  • 269 Views

0 Members and 1 Guest are viewing this topic.

Offline marcm200

  • *
  • Fractal Frogurt
  • ******
  • Posts: 475
« on: October 27, 2019, 03:50:11 PM »
Shape molding for quaternions (forum link) was a bit too much for me as a start, so I tried something simpler: placing complex roots in shapes of letters to "write" into the complex plane.

Below are the first word I could write and two letters. Shown is the Newton map of the corresponding "word" polynomial in the 2-square with the roots as white exaggerated squares and the basins of attraction. Black pixels are non-root-convergent.

Most of the single letters work quite well, although they often have points which do not converge to an already found root under the current numerical circumstances (double datatype, 5000 max it, 10^-10 as epsilon for convergence), especially B and M pose big problems.

I hope a multiple precision library will help. However I'm not sure whether this is a problem of my Newton implementation - or the generation of the polynomial itself (a lot of coefficient multiplications since I need the polynomial in expanded form).

The "pi" polynomial:
Code: [Select]
p(z)=
(0.015625)*z^15
+(-0.064062499999999994449-0.0859375i)*z^14
+(-0.098281250000000014433+0.32953125000000005329i)*z^13
+(0.64270312500000004174-0.23467187499999997424i)*z^12
+(-0.788729687500000054-0.51842656250000018758i)*z^11
+(0.054111718749999843103+0.95415609375000032255i)*z^10
+(0.56395751562500029408-0.46857779687500006327i)*z^9
+(-0.42092087656250015693-0.104269839062500147i)*z^8+(0.075592569687499985842+0.18419211890625014627i)*z^7
+(0.037156137781250042629-0.06034322356250004793i)*z^6
+(-0.019305688750000018356+0.0014383954781249995263i)*z^5
+(0.0025544434762500020999+0.003048885996250002943i)*z^4
+(0.00014876758187500023012-0.0005744242729375004285i)*z^3
+(-5.6510191862500048577e-005+2.1556388850000005064e-005i)*z^2
+(3.1204198825000028417e-006+2.0838383537500023171e-006i)*z
+(-3.4114112500000060954e-009-1.0631674625000011022e-007i)




Linkback: https://fractalforums.org/share-a-fractal/22/placing-complex-roots-in-the-shape-of-words/3165/

Offline sjhalayka

  • *
  • Fractal Friend
  • **
  • Posts: 12
« Reply #1 on: October 28, 2019, 05:11:28 AM »
That's really quite amazing. Great work.

I've used the Boost multiprecision library in the past, for calculating Bezier curves of arbitrary degree.

Offline marcm200

  • *
  • Fractal Frogurt
  • ******
  • Posts: 475
« Reply #2 on: October 28, 2019, 10:11:09 AM »
Thanks! I'll then try boost and claude's qd suggestion from another thread to see which one works first/best/fastest.

Offline marcm200

  • *
  • Fractal Frogurt
  • ******
  • Posts: 475
« Reply #3 on: November 02, 2019, 10:34:40 AM »
1) A short sentence in root-placed form.

The text "Life is live.." was used to generate a polynomial of degree 80.
For that polynomial the region [-0.5..5] x [-0.5..0.75]*i, max it 1500 was used for Newton's map to find the roots.

2) And a - what some mathematicians consider the most appealing - formula:

The text "e^Ó*pi+1=0.." was used to generate a polynomial of degree 70.
Region [-0.5..3.5] x [-0.5..1.5]*i, 1500 max it for Newton

Technical details:
  • I used the boost multiprecision library with 256 decimal digits as floating data type.
  • Grey are complex numbers that do not converge to a found root. However they show a basin of attraction-like shape.
  • I implemented a speed-up that the orbit of a point converging to a root was considered to be in the basin of attraction and all its iterates (converted to screen coordinates) were colored according to number of steps needed to the root. This led to some ill-colored pixels whose precise origin is currently unclear.
  • My Newton implementation has trouble finding the rightmost placed roots. Therefore I add some easy additional characters at the end (like some dots, or "i") which often leads to detection of (most of) the roots-of-interest.


Offline gerrit

  • *
  • 3f
  • ******
  • Posts: 1831
« Reply #4 on: November 02, 2019, 07:52:23 PM »
That reads like fun! Not sure why you need to do something special with precision etc.
Tried making Arabic letters from morphed embedded Julia sets of Mandelbrot set with not much success.

Offline hgjf2

  • *
  • Fractal Friar
  • *
  • Posts: 102
« Reply #5 on: November 03, 2019, 08:01:39 AM »
Of course the basins of attraction of the Newtonian Julia sets are placed in letters, with givern coordinates.

Offline marcm200

  • *
  • Fractal Frogurt
  • ******
  • Posts: 475
« Reply #6 on: November 03, 2019, 11:22:12 AM »
That reads like fun! Not sure why you need to do something special with precision etc.
Tried making Arabic letters from morphed embedded Julia sets of Mandelbrot set with not much success.
Below are the C++ double results - only a few roots were actually found correctly, for single letters it works mostly. I have to use quite a high epsilon of 10^-10 for convergence in an orbit, so I guess it prematurely gets stuck at wrong points. Using a lower value (10^-15 around machine epsilon) only finds a handful of roots.
For the decimal-256 datatype I used 10^-20 (lower values might even be better, but rigorous testing would take too much time).

Morphed embedded Julia sets is a nice extension, I hope you have success.

I'll try the Quaternion approach next.

Of course the basins of attraction of the Newtonian Julia sets are placed in letters, with givern coordinates.
That was precisely the goal of this experiment - placing roots and finding computational conditions able to rediscover them on a way to more complicated settings like in the Quaternion article.

What exactly are you criticising?


Online claude

  • *
  • 3f
  • ******
  • Posts: 1261
    • mathr.co.uk
« Reply #7 on: November 03, 2019, 01:17:29 PM »
If the roots are known, single precision should be enough to find the basins. If you do something like multiplying out to a polynomial, then try to find roots again, more precision might be necessary. But I suggest keeping a representation as roots is more productive, and is what the quaternion paper does.

 
Quote
5.2. Limitations and Future Work
Limitations: Our main limitation is that 80-bit precision is
needed to resolve the large rational division. Even then, the
optimization can run out exponent bits.
« Last Edit: November 03, 2019, 01:34:32 PM by claude »

Offline marcm200

  • *
  • Fractal Frogurt
  • ******
  • Posts: 475
« Reply #8 on: November 03, 2019, 03:26:14 PM »
If the roots are known, single precision should be enough to find the basins. If you do something like multiplying out to a polynomial, then try to find roots again, more precision might be necessary.
Yes, keeping it in root-form would have saved me a lot of multiplications and kept precision high, but my polynomial class currently only works with the coefficient form (and it was easier to calculate the derivative), so I used that. And it was fun having two programs battle against each other: one hiding a small message in a polynomial, so that it cannot be seen directly, and the other trying to decipher it - like AlphaGo playing against itself, just without the neural network part.

Offline gerrit

  • *
  • 3f
  • ******
  • Posts: 1831
« Reply #9 on: November 03, 2019, 06:49:57 PM »
Yes, keeping it in root-form would have saved me a lot of multiplications and kept precision high, but my polynomial class currently only works with the coefficient form (and it was easier to calculate the derivative), so I used that. And it was fun having two programs battle against each other: one hiding a small message in a polynomial, so that it cannot be seen directly, and the other trying to decipher it - like AlphaGo playing against itself, just without the neural network part.
f/f' has a very simple stable expression in terms of roots. If you want to input only poly coefficients (the decoding fun idea) perhaps you can evaluate f/f' in a stable manner, whereas f and f' may easily overflow. I assume you use Horners method to evaluate polynomial from coefficients now?

Offline marcm200

  • *
  • Fractal Frogurt
  • ******
  • Posts: 475
« Reply #10 on: November 06, 2019, 10:04:23 AM »
I calculated a bit and came up with f/f' = 1 / ( 1/(z-root1) + 1/(z-root2) ... ). Not sure that is correct (I did not check it symbolically), but it reproduces close enough the e^pi-formula and Life is live in only seconds using plain double precision.

Quite a speed-up! (credit to gerrit for suggesting this!, and, yes, I use the Horner scheme). So I keep that in mind for the next project which uses Newton maps.

But waiting 2 hours (that's how long e^pi took with multiple precision) was definitely worth it (and I wanted to install the multiprecision library).



Offline gerrit

  • *
  • 3f
  • ******
  • Posts: 1831
« Reply #11 on: November 06, 2019, 04:49:30 PM »
I calculated a bit and came up with f/f' = 1 / ( 1/(z-root1) + 1/(z-root2) ... ). Not sure that is correct
Yes, see Newton-Hines thread for more details. There is a similar expression for f/f' for rational functions which I think I posted there.


clip
strange shape for especially complex function sums

Started by hgjf2 on Fractal Mathematics And New Theories

5 Replies
240 Views
Last post July 07, 2019, 11:23:20 AM
by hgjf2
question
New Theory of Super-Real and Complex-Complex Numbers and Aleph-Null

Started by M8W on Fractal Mathematics And New Theories

2 Replies
454 Views
Last post January 06, 2018, 08:40:15 AM
by M8W
clip
Roots of polynomials

Started by Ebanflo on Fractal Mathematics And New Theories

3 Replies
285 Views
Last post March 26, 2018, 10:20:28 PM
by claude
xx
Finding all roots of a polynomial with mathematical guarantee

Started by marcm200 on Fractal Mathematics And New Theories

32 Replies
720 Views
Last post October 30, 2019, 09:21:33 AM
by marcm200
xx
Cross Complex

Started by Dinkydau on Fractal Image Gallery

0 Replies
187 Views
Last post October 22, 2017, 11:31:41 PM
by Dinkydau