## Interactive Julia Set viewer with shaders

Show off your games, demos and other (playable) creations.
novemberisms
Prole
Posts: 2
Joined: Tue Mar 06, 2018 10:34 am

### Interactive Julia Set viewer with shaders

Source code https://github.com/novemberisms/julia
.love file here:
julia.love
Love file
Controls

Use the mouse to control the real and imaginary parts of z
• The y position of the mouse controls the imaginary part
• The x position of the mouse controls the real part
• The origin is located at the center
What's the Mandelbrot Set doing?

Julia sets are intimately connected to the Mandelbrot set in that if you mouse-over any point inside the Mandelbrot set, the corresponding Julia set for that point will be contiguous (locally connected).

All that is to say, if you mouse-over points within the Mandelbrot set, the corresponding Julia set will look nice and connected. If you bring your mouse outside, then it will look like a sparse set of little islands.

Just play around and explore. What happens when you mouse-over each of the bulbs of the Mandelbrot set? Is there a pattern? When you mouse-over each of the chasms? Math is beautiful.
sample1.png (137.6 KiB) Viewed 853 times
sample2.png (73.52 KiB) Viewed 853 times
Last edited by novemberisms on Wed Mar 07, 2018 2:38 am, edited 2 times in total.

zorg
Party member
Posts: 2306
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

### Re: Interactive Julia Set viewer with shaders

Hi and welcome to the forums!

Finally, please allow me to nitpick one thing;

In your code, if you define the palettes above the default used, you don't need to create one palette twice with newImage (alternatively, you could set the second palette's image in the table to the already loaded one in the default variable), just for the sake of logical consistency:

Code: Select all

palettes = {
{background = {255,255,255,255}},
{background = {255,255,255,255}, palette = love.graphics.newImage("shaders/pal0.png")},
{background = {255,255,255,255}, palette = love.graphics.newImage("shaders/pal1.png")},
{background = {255,255,255,255}, palette = love.graphics.newImage("shaders/pal2.png")},
}

julia_palette = palettes[4][2]

-- or alternatively:

palettes = {
{background = {255,255,255,255}},
{background = {255,255,255,255}, palette = love.graphics.newImage("shaders/pal0.png")},
{background = {255,255,255,255}, palette = love.graphics.newImage("shaders/pal1.png")},
{background = {255,255,255,255}, palette = julia_palette},
}

Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

novemberisms
Prole
Posts: 2
Joined: Tue Mar 06, 2018 10:34 am

### Re: Interactive Julia Set viewer with shaders

Hi! Thanks for the warm welcome! I admit the lua part is terribly rushed. I was just so excited to see the shaders working that I wrote the lua part as fast as I can just so I can explore the results. I'll be cleaning it up soon. The main point of study are the .glsl files, and if you have any nitpicks on those, I'd be glad to see.

Also, I don't know how to use BBCode >.<
How do I get the images to show?

zorg
Party member
Posts: 2306
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

### Re: Interactive Julia Set viewer with shaders

novemberisms wrote:
Wed Mar 07, 2018 2:12 am
Also, I don't know how to use BBCode >.<
How do I get the images to show?
I think the bbcode you used was correct, but you used the wrong link; should have been like this:
https://raw.githubusercontent.com/novem ... ample3.png
That said, i don't know how much github tolerates hotlinking like that.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

pgimeno
Party member
Posts: 1150
Joined: Sun Oct 18, 2015 2:58 pm

### Re: Interactive Julia Set viewer with shaders

Attachments work just fine to embed images

Also, cool program!
Thrust II Reloaded - GifLoad for Löve - GSpöt GUI - My NotABug.org repositories
The Microsoft Github repositories I had have been closed after the acquisition announcement and will be removed in the near future.

### Who is online

Users browsing this forum: No registered users and 6 guests