I'm new to Javascript. I'm working on a script to display a Julia set using canvas using the external distance estimation method
This is the code I'm using to color it:
distance_estimation: function(distance, max_distance, iteration, max_iteration){
var color;
if(distance > max_distance || iteration == max_iteration){
color = "rgb(0,0,0)";
}
else{
color = "rgb(255,255,255)";
}
return color;
}
This is what I expected it to look like: http://upload.wikimedia.org/wikipedia/commons/3/3a/Demj.jpg
This is what I got: https://i.stack.imgur.com/2elYx.png
What can I do to make the script generate a picture similar to the one in the link?