The Magic of Fractals

Abhishek Nandy

Abhishek Nandy

Kolkata, WB

In colloquial usage, a fractal is "a rough or fragmented geometric shape that can be subdivided in parts, each of which is (at least approximately) a reduced/size copy of the whole". The term was coined by Benoît Mandelbrot in 1975 and was derived from the Latin fractus meaning broken or fractured. ...learn more

Project status: Under Development

oneAPI, Game Development

Intel Technologies
DevCloud, oneAPI, DPC++, Intel Iris Xe, Intel Iris Xe MAX

Code Samples [1]

Overview / Usage

a fractal is "a rough or fragmented geometric shape that can be subdivided in parts, each of which is (at least approximately) a reduced/size copy of the whole". The term was coined by Benoît Mandelbrot in 1975 and was derived from the Latin fractus meaning broken or fractured.

A fractal as a geometric object generally has the following features:

  • fine structure at arbitrarily small scales
  • is too irregular to be easily described in traditional Euclidean geometric language.
  • is self-similar (at least approximatively or stochastically)
  • has a Hausdorff dimension that is greater than its topological dimension (although this requirement is not met by space-filling curves such as the Hilbert curve)
  • has a simple and recursive definition.

Due to them appearing similar at all levels of magnification, fractals are often considered to be 'infinitely complex'. Obvious examples include clouds, mountain ranges and lightning bolts. However, not all self-similar objects are fractals — for example, the real line (a straight Euclidean line) is formally self-similar but fails to have other fractal characteristics.

A variant on the M-set can be defined in straightforward fashion for any iterated function in the complex plane parameterized by a single initial value.

Some obvious patterns also emerge quickly from many variations: Real exponents alter symmetry, imaginary exponents cause asymmetric twisting, disreputable functions produce misshapen lumps like the burning ship, and so on.

Methodology / Approach

We use One API Devcloud to find different solutions to fractals

How to use it?

In the input.txt file change your paramater no.s

Its currently numbered from 1 to 10

The Ipython notebook is self explanatory run it and you will see a new fractal being created using the parameters

Just Change a number say 1 to 2... save it and run the ipython notebook

Major Fractals covered.

We have covered lots of variants of Fractal functions that are there utilizing lots of trignometric functions with different values to get the desired results in the DPC++ format.

Ran the code with Iris Max option on Devcloud

nodes=1:iris_xe_max:ppn=2

The following output was achieved.

813427.v-qsvr-1 ...ub-singleuser u58899 00:00:55 R jupyterhub
813470.v-qsvr-1 run-fractal.sh u58899 0 Q batch

Waiting for Output █████████████████████ Done⬇

########################################################################

Date: Thu 18 Mar 2021 03:21:37 PM PDT Job ID: 813470.v-qsvr-1.aidevcloud User: u58899 Resources: neednodes=1:iris_xe_max:ppn=2,nodes=1:iris_xe_max:ppn=2,walltime=06:00:00

########################################################################

u58899 is compiling Fractal DPCPP

Platform Version: 1.0 Device Name: Intel(R) Graphics [0x4905] Max Work Group: 512 Max Compute Units: 96

########################################################################

End of output for job 813470.v-qsvr-1.aidevcloud Date: Thu 18 Mar 2021 03:21:55 PM PDT

########################################################################

The functions that are used to form different Fractals

plus more....

quad Intel® Iris® Xe MAX Graphics compute node

nodes=1:iris_xe_max:dual_gpu:ppn=2

813427.v-qsvr-1 ...ub-singleuser u58899 00:01:09 R jupyterhub
813488.v-qsvr-1 run-fractal.sh u58899 0 Q batch

Waiting for Output █████████████████████ Done⬇

########################################################################

Date: Thu 18 Mar 2021 03:47:01 PM PDT Job ID: 813488.v-qsvr-1.aidevcloud User: u58899 Resources: neednodes=1:iris_xe_max:dual_gpu:ppn=2,nodes=1:iris_xe_max:dual_gpu:ppn=2,walltime=06:00:00

########################################################################

u58899 is compiling Fractal DPCPP

Platform Version: 1.0 Device Name: Intel(R) Graphics [0x4905] Max Work Group: 512 Max Compute Units: 96

########################################################################

End of output for job 813488.v-qsvr-1.aidevcloud Date: Thu 18 Mar 2021 03:47:19 PM PDT

########################################################################

Technologies Used

Intel One API

Devcloud

GPU offloading

DPC++

Repository

https://github.com/AbhiLegend/one-api-fractal-dpcpp

Collaborators

1 Result

1 Result

Comments (0)