fractals

Fractal box-counting in R

三世轮回 提交于 2019-12-23 12:20:15
问题 I am actually not sure if I should post this here on Stackoverflow or it is better at CrossValidated but it could be moved if you think its not the right place :) Briefly, I have X, Y coordinates of data for different IDs. These are cell track data and I wanted to try to calculate the fractal dimension of each individual track per ID. My data looks like this: structure(c("482.624", "483.577", "484.634", "486.883", "488.211", "493.759", "452.133", "450.953", "450.603", "450.424", "450.518",

Mandelbrot Set through shaders in GLSL with LOVE2d renders a circle, not a fractal

[亡魂溺海] 提交于 2019-12-23 01:52:21
问题 I'm trying to render a Mandelbrot Set using GLSL, but all I get is a full circle... I have checked the maths a lot, and I simply cannot find the error, so I thought maybe the problem was semantic. Is anyone able to see what's wrong? Also, could anyone give me insights on organization, structure, etc? I'm trying to learn proper coding, but it's hard to find material on styling. Obs.: The shader can be applied over any image The idea is simple (you may skip this): checkConvergence returns true

Unit testing algorithms that involve random numbers

試著忘記壹切 提交于 2019-12-22 08:41:35
问题 I'm writting some code about fractals and random terrain generation. Specifically, I'm using the Diamond-Square algorithm as of now. For those of you who don't know, it basically obtains the average of four values, and adds a random number, every step. How wouldI go about testing the result? Should I use a known seed and calculate by hand the average plus the random value, or what? Should I, instead, calculate the result in the code, using the random numbers? Or is there another way? Also,

How to express tetration function, for complex numbers

吃可爱长大的小学妹 提交于 2019-12-21 19:56:33
问题 There do exists so-called hyperoperation sequence. It works like you construct multiplication a*b=a+a+a+a...+a with many additions of a repeated b times. Then there goes exponentiation a^b = a*a*a*a*...*a with many multiplicaitions of a repeated b times. Then, there goes tetration, expressed as a tower of exponentiations, same like a^^b == a^a^a^...^a , repeated b times. I am interested how to write this function, for floating point and complex numbers? I've alredy wrote multiplication and

Calculate Mandelbrot set for greater precision

回眸只為那壹抹淺笑 提交于 2019-12-21 05:35:17
问题 Is there any practical way to perform calculations such as those involved in generating the Mandelbrot Set for values for precise that what double or long double can provide? I was thinking of possibly having two variables(either double or long), one storing the value similar to scientific notation and the other storing the negative log10 of the value, but I'm not sure if there would actually be a way to perform the calculation like this. 来源: https://stackoverflow.com/questions/43118611

Looping through a formula that describes a spiral to generate XY coordinates

半腔热情 提交于 2019-12-20 12:25:49
问题 I'm trying to generate a spiral galaxy in the form of xy (2D) coordinates -- but math is not my strong suit. I've gleaned the following from an excellent source on spirals: The radius r(t) and the angle t are proportional for the simpliest spiral, the spiral of Archimedes. Therefore the equation is: (3) Polar equation: r(t) = at [a is constant]. From this follows (2) Parameter form: x(t) = at cos(t), y(t) = at sin(t), (1) Central equation: x²+y² = a²[arc tan (y/x)]². This question sort of

Calculate the Hilbert value of a point for use in a Hilbert R-Tree?

北城余情 提交于 2019-12-17 21:59:52
问题 I have an application where a Hilbert R-Tree (wikipedia) (citeseer) would seem to be an appropriate data structure. Specifically, it requires reasonably fast spatial queries over a data set that will experience a lot of updates. However, as far as I can see, none of the descriptions of the algorithms for this data structure even mention how to actually calculate the requisite Hilbert Value ; which is the distance along a Hilbert Curve to the point. So any suggestions for how to go about

Estimate a Fractal dimension of 2d image

笑着哭i 提交于 2019-12-12 11:26:30
问题 I want to estimate a value of Fractal dimension for some part of 2d image (photo). How can I calculate estimation of this value, e.g. for 15x15 pixel subimage with rgb colors? Thanks. 回答1: Treat the pixel data as a surface in 5-space (one dimension each for X, Y, R, G and B), then do box-counting. Update: This is a pretty clear overview of box-counting in two dimensions, but it shouldn't be hard to generalise. 回答2: A hilbert curve has a fractal dimension of 2. A peano curve also. What image

estimate the fractal dimension of a complex network, provided the nodes of edges

筅森魡賤 提交于 2019-12-12 08:33:25
问题 I'm trying to estimate the fractal dimension of a complex(real-world) network. I have the nodes of edges forming the complex network in a text file. I tried to implement the Box Counting algorithm(but didn't find an efficient implementation of the algorithm, which works better for large networks) , but later after looking @ the wiki page on Fractal dimension on networks, I found that there is another approach for this, namely the Cluster Growing Method. Is this algorithm implemented in any

Method to return a fractal sequence (1 12 123 1234 …) as a string, but last sequence is printing twice. (Java)

梦想的初衷 提交于 2019-12-12 02:49:35
问题 The point of this program is to return a "fractal sequence" up until some number, n. That sounds fancy, but all it means is that if, say, n = 4, then it would return: 1 1 2 1 2 3 1 2 3 4. (It just counts up to 1, then 2, then 3, then 4, and returns each step as it gets there.) To make it easier to see: 1 12 123 1234. The method is called "foo", and the main method must print it. So, the main method calls it by going System.out.print(foo(4)). The foo method must return a string. Loops may