Skip to content

Commit

Permalink
+ maintenance commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalpaudel committed Apr 20, 2023
1 parent 40d0c10 commit 04770c8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
Binary file removed julia_mandelbrot/gopi-sir.zip
Binary file not shown.
Binary file added julia_mandelbrot/images.zip
Binary file not shown.
Binary file removed julia_mandelbrot/main.zip
Binary file not shown.
25 changes: 16 additions & 9 deletions julia_mandelbrot/mandelbrot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ function cond(z::Complex)
end


# the function for iterating over $z_{n + 1} = f(z_{n})$
function f(z::Complex, c::Complex)
return (z)^2 + c
end


# takes in the dimensions of the array to be produced arround the given origin and for the given scale
function return_image(size, max_iter::Int=30, scale::Float64=1.0, origin::Complex=0+0im, Z0::Complex=0.0+0.0im, C::Complex=0.0+0.0im, scheme=ColorSchemes.inferno)
height = size[1]
Expand Down Expand Up @@ -104,12 +98,25 @@ function get_color(colorscheme, step, max_iter)
end


# the function for iterating over $z_{n + 1} = f(z_{n})$
function f(z::Complex, c::Complex)
return sec(z^2 - c)
end


# MAIN -----------------------------------------
size = (100000, 100000)
output = return_image(size, 25, 0.125, -1.15+0.3im)
size = (1000, 1000)
iter = 30
scale = 2.0
origin = 0.0+0.0im

Z0 = 0.0 + 0.0im
C = -1.5 + 1im

output = return_image(size, iter, scale, origin, Z0, C)
mandel = output[1]
julia = output[2]

save("test.bmp", colorview(RGB, mandel))
# save("./tanh_julia_vishal.bmp", colorview(RGB, julia))
save("test-julia.bmp", colorview(RGB, julia))

0 comments on commit 04770c8

Please sign in to comment.