Giter Club home page Giter Club logo

opencv_based_juliaset_implementation's Introduction

OpenCV_based_JuliaSet_Implementation

Plot Julia set with C++/OpenCL/CUDA/OpenMP

The output image should be the same or at least similiar for different implementation if the same parameters are used. It can be download at julia_20K.(right click on the text and Save link as...)

Result is shown below, Z = Z^2 + C, when C = -0.8 + 0.156i, display area ranging from -1.5 to 1.5 both on real axis and imaginary axis.
For detail, please go to my blog.

Full result

julia_full

Part 1
julia_part1

Part 2
julia_part1

Part 3

julia_part3

opencv_based_juliaset_implementation's People

Contributors

yeephycho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

opencv_based_juliaset_implementation's Issues

OpenMP

Hi,

Thx for the program

You put pragma inside external loop:

for (register int i = 0; i < DIM; i++) {
		register int j;
#pragma omp parallel for private(j) num_threads(6)
		for (j = 0; j < DIM; j++) {

Are you sure it?

I put it outside external loop :

// https://commons.wikimedia.org/wiki/File:Cubic_Julia_set_C_%3D-0.040000000000000036-0.78*I_with_internal_level_curves.png
int
DrawFatouImageLSM (unsigned char A[], int IterMax)
{
  unsigned int ix, iy;		// pixel coordinate 

  fprintf (stdout, "compute Fatou image LSM\n");
  // for all pixels of image 
#pragma omp parallel for schedule(dynamic) private(ix,iy) shared(A, ixMax , iyMax, uUnknown, uInterior, uExterior)
  for (iy = iyMin; iy <= iyMax; ++iy)
    {
      fprintf (stderr, " %d from %d \r", iy, iyMax);	//info 
      for (ix = ixMin; ix <= ixMax; ++ix)
	DrawFatouPointLSM (A, ix, iy, IterMax);	//  
    }

  return 0;
}

What do you think about it ?

Adam

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.