Questions tagged [fractals]

Fractals are interesting mathematical objects with a special behaviour in a complex-plane [Re, Im], depending on their initial position ( location ). Visualised in popular media, typically as shapes with infinite dimensionality that exhibit a sort of self-similarity. Well-known fractal sets include the named Mandelbrot set, Julia sets, and Phoenix sets. Tree-like fractal drawings are also common.

Filter by
Sorted by
Tagged with
0 votes
2 answers
42 views

Koch's Snowflake using Turtle

I'm currently doing a project where I need to create Koch's Snowflake. I decided to use turtle for this assignment. The user can enter an "order" which determineres the amount of sides the ...
1 vote
0 answers
49 views

Fractal Information Dimension and Correlation Dimension

I have a task to compute fractal dimensions of a given image (of a fractal). Specifically, I want to compute the dimension of information and the dimension of correlation (Grassberger, 1983; ...
1 vote
1 answer
46 views

Tkinter images and geometry creation

I've tried to do a star fractal drawing a star using tkinter and putting an image as a background. from tkinter import * from PIL import ImageTk, Image import tkinter as tk app = Tk() app.title(&...
0 votes
0 answers
65 views

I'm trying to render a 3D Mandelbulb (in Blender) using a Python script, and it doesn't look right

Currently my code returns no errors, and generates a weird looking set of points, totally not a Mandelbulb. I've looked over the formulas multiple times and everything seems right, but I could ...
0 votes
1 answer
67 views

How to make a beautiful mesh of the Mandelbulb?

I know how to render a beautiful Mandelbulb with ray-tracing, as this one. But how to get a beautiful Mandelbulb as a 3D mesh? The Mandelbulb can be constructed as an isosurface, and I tried to do ...
0 votes
2 answers
64 views

How to extract a coastline of the lake for fractal analysis

I am new to ImageJ software. I want to extract the boundary of the lake which I am analyzing. I am outlining the method that I saw in a article. The author says: " As an example we take the ...
  • 161
0 votes
0 answers
11 views

I have an image file of fractures in the subsurface. How do I create higher order fractal images from the starting image

I have an image of subsurface fractures. How do I classify it as a fractal and how to create higher order fractal image from this image I tyried meg noah's code to see if it is a fractal. I am getting ...
0 votes
1 answer
43 views

Create a Sierpinksi Triangle using 0L-System with Python

I need to create a Sierpinksi Triangle using 0L-System with Python. See here: enter image description here I'm stuck here, I can't complete the triangle. My code: from turtle import * def sierpinksi(...
4 votes
1 answer
77 views

My Mandelbrot Set displays wrong outlines when plotting with few iterations

I'm writing a program that plots the Mandelbrot set in C. I've been able to display it and it looks fine however when I lower the number of iterations I get this effect that generates what I can only ...
  • 75
1 vote
0 answers
115 views

How to zoom/move into the mandelbrot set

I'm doing the Mandelbrot set in c as a school project.<br> This is my code: int mandelbrot(int x, int y, t_data *data) { double complex c; double complex z; double cx; ...
-2 votes
1 answer
67 views

Zooming in on mandelbrot in python

This is my current code which is currently creating two images instead of zooming in. How would I change the code to create on fractal that zooms in its self? Thank you so much! import numpy as np ...
0 votes
1 answer
57 views

Generating points within a Menger Sponge (fractal shape)

I am trying to generate a lattice of points in the shape of a Menger sponge or Sierpinski sponge. https://en.wikipedia.org/wiki/Menger_sponge This link details how the shape is mathematically ...
0 votes
0 answers
47 views

Fractal drawing not showing up in tkinter canvas

Im trying to make a program that plots different julia sets and am first trying to plot the mandelbrot set. However, when i try to plot something on the tkinter canvas nothing shows up. I've also ...
0 votes
0 answers
53 views

Merge multiple threads into one in Python

I wrote a very basic, poorly optimized fractal generator. However, it has one major flaw: the iterating function diverges() that is used to verify whether a complex number is in the Mandelbrot set or ...
  • 1
0 votes
0 answers
39 views

How to plot smaller polygons at the sides of a bigger polygon?

I am not well versed in MATLAB however I need to use it to complete a project, I need to write a code which creates a big polygon and "n" small polygons , where "n" is the number ...
1 vote
0 answers
50 views

Is there a faster way to render the Mandelbrot set for an animation?

I'm trying to code the Mandelbrot set as a fun project. I did it on my own, so it probably isn't optimized very well. I have a few questions about how to make my code better and how to add certain ...
-1 votes
1 answer
88 views

Fractal dimension (box counting) over images don´t save correctly in cvs file

I am using an algorithm to measure fractal dimention (https://francescoturci.net/2016/03/31/box-counting-in-numpy/) or box counting method over 3 images: 1 2 3 My adapted code is: ` #importing ...
1 vote
1 answer
110 views

Why does my Fractal Noise have lines outlining a grid

I will give some context to the function that I wrote: getFractalPointHeight() is a function that is supposed to return the height of the fractal noise based on the coordinates of a Perlin noise image ...
  • 75
0 votes
0 answers
16 views

Individual fractal dimention

I know it could be seen as a very basic question, but, how can I calculate the fractal dimention for individual shapes in a figure?. That is a idealised image basically genrated with cv2.fillPoly(...
1 vote
1 answer
97 views

glsl fractal shader for raylib not working correctly

https://github.com/bananaboy139/fractal/tree/OpenGL-shader https://github.com/bananaboy139/fractal/blob/OpenGL-shader/images/2.png?raw=true this is the original image I made with zig. https://github....
0 votes
0 answers
11 views

What happens if I "over specify" dimensions--that is, I provide more dimensions to a feature than expected?

Let's suppose I have a feature ComposedFeature with dimension dim_composed, and metrics dependent_dim1, dependent_dim2, metric1, metric2. Suppose ComposedFeature has two dependent features: Feature1 ...
1 vote
1 answer
86 views

how to draw image pixel by piexel in swing

I recently created a program to explore Mandelbrot's fractal and after calculated the image I drew it but in a weird way. How can I paint it in clean way? The only way I found is to override the paint ...
  • 49
0 votes
0 answers
28 views

I want to make a program that loads the pattern of binary

Binary goes 0 1 01 11 001 101 011 111 0001 If you instead replace the 1 with pixel and 0 with space, it starts to make a pattern. ⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛ ⬜⬜⬜⬜⬜⬜⬜⬛⬛⬛⬛⬛⬛⬛⬛⬜⬜⬜⬜⬜⬜⬜⬜⬛⬛⬛⬛⬛⬛⬛⬛ ⬜⬜⬜⬛⬛⬛⬛...
0 votes
1 answer
148 views

Complex number type and functions Open CL C through C# Wrapper

I am making an application in WPF C# that generates fractals. I am using this code that someone made to create a OpenCL kernel and run it in C#: https://www.codeproject.com/Articles/1116907/How-to-Use-...
0 votes
0 answers
103 views

Circle Within Circle Fractal, using recursion in processing

I'm currently somewhat new to processing and am having trouble with creating a circle fractal. I am tasked with drawing a circle and then having user input decide how many circles go inside the circle ...
  • 23
0 votes
0 answers
123 views

Why does Fractal Formula "sin(z^2)-cos(z^2)+c" work with XaoS and not UltraFractal?

While using the real-time Fractal zoomer XaoS to explore the infinite universe having user formula "sin(z^2)-cos(z^2)+c", we start out here (important for universe identification and formula ...
0 votes
0 answers
48 views

How to create a curved line vector plot of a triangle in Python?

Question Suppose one has 3 random coordinates with 3 random functions that describe the continuous lines between them*, how would one create a vector plot in Python that allows for smooth lines after ...
  • 2,005
0 votes
0 answers
442 views

Estimating the Hausdorff dimension (fractal dimension) of images in Python

I transformed a time-series into phase space using Python via the following code. import numpy as np import matplotlib.pyplot as plt Subjects = ["Subject1"] for Subject in Subjects: ...
  • 193
1 vote
1 answer
79 views

Chaos Game fractal not rendering correctly

I'm attempting to write code that will generate fractals according to the Chaos game In particular, I'm trying to debug the faulty generation/rendering of this fractal: I'm doing this with Javascript ...
0 votes
2 answers
61 views

How to fix UnboundLocalError for unassigned variable that I assigned?

I am trying to create a Koch snowflake generator in Python using the Turtle library and recursion. I have a list of strings with hex codes in them and I am using the variable color to have the pen ...
0 votes
2 answers
66 views

How does the assignment of variable works in function calls in R language?

I am trying to exercise a simulation of Sierpinski triangle in R with affine transformation and Iterated Function System (IFS). And hopefully, I can further exercise how the simulation of Barnsley's ...
  • 1
-1 votes
1 answer
44 views

Who can explain how this code is not an error? [duplicate]

I was making some exercise to train myself and the exercise asked me to do a program that calculates fractals, very simple, i've done in about 1-2 minutes and it work, but looking at his solution it ...
  • 3
1 vote
0 answers
55 views

williams fractal insted of high and low

I wrote below code in pine script in tradingview for high and low weekly candles , and now I want you help me to bring Williams fractal from weekly to daily time frame . //@version=5 indicator("...
5 votes
1 answer
271 views

JavaScript fractal generation algorithms - why is one so much faster?

I'm trying to write a JavaScript fractal generation algorithm from first principles. I'm aware that there are many examples out there but I wanted to incorporate additional functionality to support ...
1 vote
1 answer
195 views

"Big Float" Mandelbrot runs slower on GPU than CPU

I just ported over my "big float" implementation over to OpenCL, but it turns out that the GPU was slower than the CPU? That's quite surprising as I thought that Mandelbrot was an ...
1 vote
0 answers
317 views

Exact same WebGL code renders differently on different devices

I'm fairly new to shaders, just started playing with them in VisionsOfChaos for Android around a year ago. I implemented my 4D fractal viewer in it (as far as I know, a completely new approach, which ...
0 votes
1 answer
91 views

My fractal isn't printing properly, when I use the right values, it doesn't print at all

The fractal is called Vicsek fractal .When I set midpoint's x and y values to = firstDot's x and y values / 3, i get the fractal, but my fractal is very small, and off to the side. However, when I set ...
2 votes
1 answer
128 views

Implementing series approximation/perturbation theory for WebGL2 based Mandelbrot viewer application

I have started building a mandelbrot viewer application with WebGL2 and JavaScript and am trying to implement series approximation at a basic level. I'm currently getting weird/distored/incomplete ...
5 votes
3 answers
261 views

Is there a way to improve the performance of this fractal calculation algorithm?

Yesterday I came across the new 3Blue1Brown video about Newton's fractal and I was really mesmerized by his live representation of the fractal. (Here's the video link for anybody interested, it's at ...
-2 votes
1 answer
78 views

Need a help 'import random' in python [closed]

this is a translator), I need to make sure that 2 fractals (drawn with turtle) are drawn randomly when the project is opened (either the first fractal or the second), could you tell me which commands ...
0 votes
2 answers
256 views

Best way to compute a big Mandelbrot image

I try to calculate a fractal image, and as the calculation could be long as the resolution increase, I was wondering if I could use Hyper Threading to calculate "tiles" of my final image and ...
  • 11
1 vote
1 answer
50 views

about the Turtle Library codes

This is an example of tree create. To understand the code, I changed some of its numbers to understand what is each code for. Now in this code, in line 13 although I wrote lt(90), it turns to the left ...
  • 31
0 votes
1 answer
766 views

How to visualize fractals in python

This is the code for generating the fractals. import matplotlib.pyplot as plt def makes(self, fractal): if (fractal == "SierpinskiTriangle"): SierpinskiTriangle(self.dimensions)...
0 votes
1 answer
207 views

Fractals using Heiken Ashi

I try to create a fractal indicator using Heiken Ashi candles instead of Japanese candles. With HA candles, noise is removed so it's easiest to spot local high/low. The idea is : If I found 3 bullish ...
  • 3
0 votes
1 answer
156 views

Mandelbrot set rotation JS

There is a simple JS code that renders a very basic Mandelbrot fractal. let canvas = document.getElementsByTagName("canvas")[0], canvasWidth = canvas.width, canvasHeight = canvas.height, ctx ...
  • 85
0 votes
1 answer
148 views

Unable to optimize Fractal code with Numba

I am writing code to visualize Mandelbrot sets and other fractals. Below is a snippet of the code that is being run. The code runs perfectly fine as is, but I am trying to optimize it to make higher ...
3 votes
1 answer
610 views

Generating a fractal in python

I am currently working on a problem which involves plotting a fractal that has the form in the picture below I am bit unsure how the fractal generations work. I believe we start with a single square, ...
  • 31
5 votes
1 answer
2k views

How would I rotate a vector in 3D space? P5.js

This is actually my first question on stackoverflow :) Firstly, I wanted to say that I am new to coding and I am wanting to get an understanding of some syntax. Basically, I am following a tutorial by ...
  • 51
0 votes
0 answers
211 views

Mandelbrot set using normalized iteration count

I have the following Python program that endeavours to use the normalized iteration count algorithm to colour the Mandelbrot set: from PIL import Image import numpy as np from matplotlib.colors import ...
1 vote
1 answer
346 views

Need help making Sierpinski triangle with turtle

I was watching a video by Aperture on youtube: https://youtu.be/1w40fxsyraE?t=325 At the provided timestamp (5:25), he begins talking about a way to create a fractal. I tried to replicate this in a ...

1
2 3 4 5
11