Logo by mauxuam - Contribute your own Logo!
News: Visit us on facebook
 
*
Welcome, Guest. Please login or register. October 21, 2017, 11:15:26 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Mandelbrot / Julia explorer, JavaScript / Canvas  (Read 1265 times)
0 Members and 1 Guest are viewing this topic.
asimes
Fractal Lover
**
Posts: 212



asimes
WWW
« on: August 18, 2013, 06:45:23 AM »

A while back I made a Mandelbrot explorer for the web (it doesn't exist anymore). I recently remade some of my old projects and wrote this again, it can be found here: http://alexsimes.com/index.php?foo=visual%20programming&bar=mandelbrot%20set

It has been a while since I've been programming fractals, I'd appreciate any feedback (figured the opinions here are quite good for web feedback). It should run fastest in Chrome.
Logged
hsmyers
Navigator
*****
Posts: 62


Making Mandelbrots from Newtons for years


hugh.myers.75 hughsmyers
WWW
« Reply #1 on: August 18, 2013, 12:27:22 PM »

Fun! That said, at an xMin and yMin of -1.8622012645774517, -4.610046426163813e-10 and an area of 9.313225746154785e-10 image is almost completely washed out. Could you tinker with the coloring algorithm such that contrast between inner and outer is always constant? Also your text boxes need to be larger  wink

--hsm
Logged

Without tradition, art is a flock of sheep without a shepherd. Without innovation, it is a corpse. --- W. Churchill
asimes
Fractal Lover
**
Posts: 212



asimes
WWW
« Reply #2 on: August 18, 2013, 07:18:37 PM »

I actually do not know what to do to make the color constant for deeper zooms. Is the general idea to keep track of the lowest and highest number of iterations and then scale the coloring to that? I'm hoping not, I'm rendering the fractal in 16 passes and assigning pixel values as soon as I am done iterating over a pixel.

This is my color logic at the moment (n is the number of iterations):
Code:
var fn = n+1.0-Math.log(Math.log(Math.sqrt(zr*zr+zi*zi)))/Math.log(2.0);
var logVal = (Math.log(fn)/Math.log(this.maxIterations)*255.0)|0;

Some notes:
- The *255.0 gets it from (0.0 to 1.0) to (0.0 to 255.0).
- The |0 is a JavaScript trick to make it an integer.
Logged
Gluecker
Forums Newbie
*
Posts: 9


« Reply #3 on: August 18, 2013, 09:56:25 PM »

you might want to try Histogram Mapping or Rank-Order Mapping but you need to store and iterate the values then...
http://www.fractalforums.com/programming/non-parametric-color-mapping-techniques/
« Last Edit: August 18, 2013, 09:58:03 PM by Gluecker » Logged
asimes
Fractal Lover
**
Posts: 212



asimes
WWW
« Reply #4 on: August 18, 2013, 10:26:21 PM »

I was afraid of that, I liked the fractal being rendered in 16 steps as a fade in. It also helped keep the browser from freezing up on too long of a calculation (when a render that has mostly n == maxIterations). Maybe after it is done being rendered I'll make an "increase contrast" step based one the assigned values.
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Javascript Mandelbox Explorer Announcements & News joeytwiddle 0 2499 Last post June 29, 2011, 11:46:23 PM
by joeytwiddle
Mandelbrot Maps: An open-source Mandelbrot/Julia explorer for Android Smartphones / Mobile Devices withad 0 2675 Last post March 20, 2012, 07:35:07 PM
by withad
Buddhabrot renderer, JavaScript / Canvas Programming asimes 3 1946 Last post January 29, 2014, 03:47:15 PM
by asimes
Jux 1.0 Julia/Mandelbrot explorer with lighting Announcements & News « 1 2 » xenodreambuie 22 4892 Last post September 04, 2015, 02:14:08 PM
by xenodreambuie
Jux 1.2 Julia/Mandelbrot explorer Announcements & News xenodreambuie 0 792 Last post November 24, 2015, 02:13:22 AM
by xenodreambuie

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.153 seconds with 27 queries. (Pretty URLs adds 0.01s, 2q)