Yiannis Galidakis

Yiannis Galidakis

105 Reputation

6 Badges

5 years, 236 days
Agricultural University of Athens
Doctoral student
Athens, Greece

NULL

MaplePrimes Activity


These are replies submitted by Yiannis Galidakis

@acer thanks, I already have the evalhf version of that. It's been posted as Tetrational code viewer 1.0.1 on my profile page, since 2015.

As for the splitting into real & imaginary parts, I remember it was Robert Israel who first suggested it, back on sci.math, sometime in 1998 or thereabouts. It did work wonders with my Maple V and 9 versions back in 2000-2002 with this tetration fractal (the one we are talking about in this question), but I didn't check it on newer versions like 13 or 18. But, like you do, I like simplicity, too. The code for complexes is much more elegant than the split code for re and im. It's only useful for those readers who have older versions of Maple. If you care to show us that it does make a difference, I'd gladly revise my worksheet posted as tetrational code viewer 1.0.1 to reflect these changes.

Cheerio,

Yiannis

@acer sorry, I did remember this post after you suggested evalhf, but without reading it I recalled the first person who suggested it (Carl), - who also went into the credits for the related Julia fractal generator. I never implemented a compiler version of it, so I left that issue at that.

The expMap4 example needs evalhf. I don't see it anywhere.

The period calculation is a big issue altogether and I can't see how it can be patched into any newer versions - such as the iterative/escape versions. I just cooked up a quick and dirty solution - just checking backwards differences starting from orb[N] for similarity, but this is a very loose idea and is not guaranteed to work if eps is small and you only have a small part of the orbit (i.e. if N and eps are small). (The problem is much deeper than what it looks. I tried to see if anybody had any faster ideas for checking the period of iterated maps and I got banged with two downvotes in math.stackExchange because by question wasn't "clear". What I was looking for was addressed in the answer given, but that's a lot of research into iterated systems dynamics and after going through most of the references, I didn't find anything faster than what I have, hence the small orb loop. Wiki has some ideas about it - in the answer refs, but I coudln't see how to adapt them for exponential dynamics. And the dynamics of exp are different from the dynamics of the Mandelbrot map. The latter finds actually the PRE-period of orbits of the bulbs in the M Set - which come from convergent points, the former needs to find periods from points which converge to p separate limits OUTSIDE the region of convergence. So the implementation is bound to be different. In any case, I don't know what should be done for period checking in the iterative versions, other than through this orb[N] vector, etc)

Anyway, I am not going to bother with implementing a compiled version as of now, as I don't have the time to check it further for compatibility (I am busy resurrecting my webpage from the archive after it crashed in 2011 - and that's a lot of work). I may come back to it later, and address a revision if the need arises.

Sorry about forgetting to include you in the credits (I usually credit the first one who comes with a solution and in that case it was Carl). For this post, I link directly to it, so there's no question who's solved it. Again, my apologies, for the omission.

Cheers

Yiannis

@acer yes, this one works. The res2 call takes around 2.3 minutes on my machine. The final img command takes around 10 secs to display. You are hereby awarded the Holy Maple Guru award B^{)>. One would tend to think that you are working for MapleSoft....

Anyway, does this error mean that the compiler doesn't work correctly in my version of Maple?

Yes, please attach the iterative maps escape code as well in a subsequent post, if it's not that much of a trouble. You never know what readers may be looking for in my webpage, so it's a good idea to have all the resources in one place.

@acer Many thanks. That's some pretty nifty code. But it crashes my 18.00. The command group of statements starting with  NN:=400; N:=20; eps:=1e-2;... etc., annoys Maple which says that the connection with the Maple kernel has been lost. Restart your Maple, etc. I checked my firewall to see if Maple 18 is excluded, but it wasn't, so I added it again, and still crashes at that statement with the same error.

Anyway, i am pretty satisfied with the optimization done with evalhf, so please don't spend too much time on this. I will link to this post from my webpage to offer it as an alternative for viewers who want to see code for more accurate depictions of the graph than what I have in my page, anyway. So the entire discussion will be seen and the user will be able to download all the worksheets.

@acer your worksheet doesn't seem to run on my machine.

What's source for Tetration module? It links to something but's not visible in your previous post. Here's the output I get:


 

restart;

kernelopts(version);

`Maple 18.00, X86 64 WINDOWS, Feb 10 2014, Build ID 922027`

(1)

kernelopts(':-numcpus');

2

(2)
source for Tetration module

NN := 400: N := 20: eps := 1e-2: ct := 1e6: maxiter := 100:
(a,b,c,d) := -4.0,4.0,-4.0,4.0:

res := CodeTools:-Usage( Tetration( NN, a, b, c, d, N, maxiter, ct, eps ) );

memory used=0.79KiB, alloc change=0 bytes, cpu time=0ns, real time=0ns, gc time=0ns

 

Tetration(400, -4.0, 4.0, -4.0, 4.0, 20, 100, 0.1e7, 0.1e-1)

(3)

img := Array(1..op([1,1],res),1..op([1,2],res),1..3,1.0,datatype=float[8],order=C_order):
img[..,..,1] := 360*((ImageTools:-FitIntensity(res))):
RGBimg := ImageTools:-HSVtoRGB(img):
ImageTools:-Embed(RGBimg);

Error, improper op or subscript selector

 

Error, invalid input: ImageTools:-FitIntensity expects its 1st argument, img, to be of type Image, but received Tetration(400, -4.0, 4.0, -4.0, 4.0, 20, 100, 0.1e7, 0.1e-1)

 

Error, invalid input: HSVtoRGB:-HSVtoRGB expects its 1st argument, img, to be of type {ColorAImage, ColorImage}, but received img

 

Error, invalid input: ImageTools:-Embed expects its 1st argument, imgarg, to be of type {Image, list({Image, list(Image)})}, but received RGBimg

 

 

#PLOT3D(GRID(c..d,a..b,res),
#       SHADING(ZHUE), STYLE(PATCHNOGRID), LIGHTMODEL(NONE), SCALING(CONSTRAINED),
#       ORIENTATION(180., 0., 180.0), AXESLABELS(x, y, iter), AXESSTYLE(BOX)
#       ,ROOT(BOUNDS_X(0), BOUNDS_Y(0), BOUNDS_WIDTH(ceil(1.5*op([1,2],res))),
#             BOUNDS_HEIGHT(ceil(1.5*op([1,1],res))))
#);

#ImageTools:-Preview(RGBimg);

 

NN := 1000; N := 100; eps := 5e-2; ct := 1e6; maxiter := 400;
#(a,b,c,d) := -4.5,3.3,-2.9,2.9;
(a,b,c,d) := -3.5,3.3,-2.9,2.9;

res2 := CodeTools:-Usage( Tetration( NN, a, b, c, d, N, maxiter, ct, eps ) );

1000

 

100

 

0.5e-1

 

0.1e7

 

400

 

-3.5, 3.3, -2.9, 2.9

 

memory used=0.79KiB, alloc change=0 bytes, cpu time=0ns, real time=0ns, gc time=0ns

 

Tetration(1000, -3.5, 3.3, -2.9, 2.9, 100, 400, 0.1e7, 0.5e-1)

(4)

img := Array(1..op([1,1],res2),1..op([1,2],res2),1..3,1.0,datatype=float[8],order=C_order):
fitres2 := ImageTools:-FitIntensity(res2):
img[..,..,1] := 360*fitres2:
#img[..,..,2] := 1-~(res2):
#img[..,..,3] := (fitres2):
#img[..,..,2] := map[evalhf](x->`if`(x=0.0,0.0,1.0),res2):
img[..,..,3] := map[evalhf](x->`if`(x=0.0,0.0,1.0),res2):
RGBimg := ImageTools:-HSVtoRGB(img):
ImageTools:-Embed(RGBimg);

Error, improper op or subscript selector

 

Error, invalid input: ImageTools:-FitIntensity expects its 1st argument, img, to be of type Image, but received Tetration(1000, -3.5, 3.3, -2.9, 2.9, 100, 400, 0.1e7, 0.5e-1)

 

Error, invalid input: HSVtoRGB:-HSVtoRGB expects its 1st argument, img, to be of type {ColorAImage, ColorImage}, but received img

 

Error, invalid input: ImageTools:-Embed expects its 1st argument, imgarg, to be of type {Image, list({Image, list(Image)})}, but received RGBimg

 

 

 

NULL


 

Download parTet.mw

@acer That's terrific. I suppose the call that makes the difference is evalhf. The whole thing took ~25 secs with your code, for 200 iterations at each point. I had the same problem with other tetration fractals and it was suggested that I use evalhf, after which performance was tremendously improved. I can now see how I can tweek p so I can get a wider palette. I also used a larger eps=0.1, so the period checker is more easily satisfied. The white pixels do nor disappear altogether, but are constrained a lot.

thanks again,

Yiannis

@acer writes:

>It would also be straightforward to adjust the intensity component of the "HSV" Color call, say by the taking complex modulus of the value via the abs command.

Wouldn't that be equivalent to plotting via 'complexplot3d(f,-1-I..1+I);' and looking at the graph from above (except that the grid lines wouldn't match)?

 

@acer Thanks. As I suspected Bau appears to be using the inverse transformation for a given f, hence my confusion. Your shading scheme is also much more interesting than my plain gray plots. I am linking to this page as a reference.

 

PS: btw, Your HSV coloring scheme doesn't work with version 18. I get only two colors, like this: 

 

(If you can find a way to make it work with 18, I will delete this  comment)

 

Ah, excellent!

 

Robert is the answer to the question "what would Gauss be able to do if he had Maple, today".

 

Btw, can I add this as an application file like Robert's or are such examples added automatically?

 

Many thanks,

 

Yiannis

@acer I am only trying to export the given orientation as an. eps picture for use with LaTeX, but as indicated, the export to .eps menu creates a blank graph with only the axes, opening with GSView 5.0.

 

When the image is not passed through the transform 1/z, it works, but sometimes it also doesn't work. Maybe it has to do with memory?

 

thanks,

--

Yiannis

@acer I think a small additional adjustment needs to be made, to allow you to zoom-in at different numbers.

 

You have:

    PPtab[k] := display(transf(plot(select(proc (u) options operator, arrow;

    Ox-w <= u[1][1] and u[1][1] <= Ox+w end proc, F),

    Ox-w .. Ox+w, Oy .. Oy+2*w, color = black, axes = none)),

    textplot([0, -0.5e-1, evalf[3](Ox-w)]), #

    textplot([.5, -0.5e-1, evalf[3](Ox)]), ##

   textplot([1, -0.5e-1, evalf[3](Ox+w)]), ###

   view = [0 .. 1, -.1 .. 1], ####

   gridlines = false)

 

For zooming at a different point than (1/2,0), the following works a little better:

(For example, try Ox:=evalf(Pi-3);Oy=0;)

    PPtab[k] := display(transf(plot(select(proc (u) options operator, arrow;

    Ox-w <= u[1][1] and u[1][1] <= Ox+w end proc, F),

    Ox-w .. Ox+w, Oy .. Oy+2*w, color = black, axes = none)),

    textplot([Ox-1/2, -0.5e-1, evalf[3](Ox-w)]), #

    textplot([Ox, -0.5e-1, evalf[3](Ox)]), ##

    textplot([Ox+1/2, -0.5e-1, evalf[3](Ox+w)]), ###

    view = [Ox-w .. Ox+w, -.1 .. Oy+2*w], ####

    gridlines = false)

 

Thanks again,

--

Yiannis

using @acer 's tremendous code,

this is Euclid's Orchard, with zooming-in ability.

http://mathworld.wolfram.com/EuclidsOrchard.html

https://en.wikipedia.org/wiki/Euclid%27s_orchard

 

Euclid's Orchard is a fractal. I would rate it as the most "elementary" fractal.

It is basically just a listing of the Farey sequence of (all irreducible) fractions for the unit interval, with height equal to 1/denom(F[k]), of level N, so it is related to Dirichlet's funtion.

https://en.wikipedia.org/wiki/Farey_sequence

http://mathworld.wolfram.com/DirichletFunction.html

 

The graphic displays a subset of all Detekind cuts of the unit interval. For example, (eventually) white points on the x-axis are the irrational limits of some appropriate convergent sequence of Farey fractions.

 

If you set for example,

 

Ox:=evalf(sqrt(2)-1);Oy=0;

 

then the zoom function will converge to the irrational 0.414213562, and the central point will indeed be blank on the x-axis.

 

Because one can only list all Farey fractions of a finite order (N), all blank spaces are basically (a finite number of) open covers of irrationals.

 

Thank you to all who read and contributed.

--

Yiannis

@acer yes, many thanks. That's it!

--

Yiannis

@Markiyan Hirnyk thanks. The size of the final animation seems to indeed present a problem.

--

Yiannis

@acer  thanks for replying. Yes, the alternate interpretation is what I am thinking of. Full first frame and then restricted (but full size) frames on the rest.

If that doesn't work, I will try saving each individual frame as a .bmp and the use bmp2avi to stitch all of them together, using either exportplot or write.

--

Yiannis 

1 2 Page 1 of 2