Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #21897

Re: An online circle intersection fractal...

From "Chris M. Thomasson" <no@spam.invalid>
Newsgroups comp.lang.javascript
Subject Re: An online circle intersection fractal...
Date 2013-11-04 14:03 -0800
Organization Aioe.org NNTP Server
Message-ID <l595kj$9mn$1@speranza.aioe.org> (permalink)
References <l53o4o$5r5$1@speranza.aioe.org> <935bd61f-b8bd-456a-8813-3b00b2ebddb4@googlegroups.com>

Show all headers | View raw


> "Michael Haufe (TNO)"  wrote in message news:935bd61f-b8bd-456a-8813->
> 3b00b2ebddb4@googlegroups.com...

> On Saturday, November 2, 2013 3:43:00 PM UTC-5, Chris M. Thomasson wrote:
> > The fractal is simple. Find circle intersections, draw circles at those
> > points,
> > then find all of the newly generated intersections, and repeat... You 
> > can
> > create some pretty nice fractals that way. Also, it seems as if circle
> > inter-
> > sections can be used for other applications as well...

> First off, I'm glad to see some more fractal applications
> being displayed.

Thank you.


> Being able to pass in the settings
> through url arguments would be a nice addition I think.

100% agreed!  :^)



> > I was wondering if my code is total crap or not. Please, any advise 
> > would be
> > extremely beneficial. I just hope it does not involve a complete 
> > rewrite.
> > Luckily, this software is in pre-alpha stages:

> The fact that you can produce significant results in a
> timely manner demonstrates that it wouldn't fall under
> "total crap" imo. One must be wary of letting the best
> be the enemy of the good.

> While I've yet to take much time looking at it yet, my
> first thought is to whether using polar coordinates instead
> of Cartesian would make things clearer or not. So thinking
> out loud here: A circle in cartesian "x^2 + y^2 = 1" becomes
> "r = 1" in polar. So while the representations are far
> simpler, the intersection can be a bit more difficult as
> there are infinite equivalent answers.

IMVHO, the algorithm as-is is fairly nice because it solves for the
intersection(s) of two circles using only a single sqrt operation.
So far, this is pretty good when compared to most of the other
solutions I have seen that rely on more than one sqrt and/or
trig functions.

Do you happen have something in mind that can find the true
intersection(s) of two circles that gets around any sqrt wrt polar
coordinates? I am all ears if you have something to share!   ;^)



> A requestAnimationFrame wrapper I prefer to use currently:

> window.requestAnimFrame = (function(){
>     return  window.requestAnimationFrame   ||
>         window.webkitRequestAnimationFrame ||
>         window.mozRequestAnimationFrame    ||
>         window.oRequestAnimationFrame      ||
>         window.msRequestAnimationFrame     ||
>         function(run){
>             window.setTimeout(run, 16);
>         };
> })();

> Also, I'm quite certain it will be a bit faster to render
> against the canvas image data instead of using the API.
> You'll have to roll your own circle drawing routine, but
> since this is a labor of love, I suspect you might not
> mind for the performance boost.

> clearRect(...) on the entire display can be slow. Do this instead:

> myCanvas.width = myCanvas.width

> More thoughts to come as time permits


Thank you for all of the suggestions Michael. I really do appreciate
the fact that you give a damn about fractals!

;^) 

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

An online circle intersection fractal... "Chris M. Thomasson" <no@spam.invalid> - 2013-11-02 13:43 -0700
  Re: An online circle intersection fractal... "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2013-11-03 17:55 -0800
  Re: An online circle intersection fractal... "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2013-11-03 18:55 -0800
    Re: An online circle intersection fractal... "Chris M. Thomasson" <no@spam.invalid> - 2013-11-04 14:01 -0800
      Re: An online circle intersection fractal... "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2013-11-04 18:40 -0800
        Re: An online circle intersection fractal... "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2013-11-04 18:42 -0800
        Re: An online circle intersection fractal... "Chris M. Thomasson" <no@spam.invalid> - 2013-11-05 13:05 -0800
          Re: An online circle intersection fractal... "Chris M. Thomasson" <no@spam.invalid> - 2013-11-05 14:35 -0800
            Re: An online circle intersection fractal... "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2013-11-10 23:48 -0800
        Re: An online circle intersection fractal... Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-11-06 19:41 +0000
          Re: An online circle intersection fractal... "Chris M. Thomasson" <no@spam.invalid> - 2013-11-07 12:46 -0800
    Re: An online circle intersection fractal... "Chris M. Thomasson" <no@spam.invalid> - 2013-11-04 14:03 -0800
  Re: An online circle intersection fractal... "Chris M. Thomasson" <no@spam.invalid> - 2013-11-05 22:19 -0800

csiph-web