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


Groups > comp.lang.javascript > #21913

Re: An online circle intersection fractal...

From Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid>
Newsgroups comp.lang.javascript
Subject Re: An online circle intersection fractal...
Date 2013-11-06 19:41 +0000
Organization Home
Message-ID <+SUJPfoYtpeSFw0C@invalid.uk.co.demon.merlyn.invalid> (permalink)
References <l53o4o$5r5$1@speranza.aioe.org> <935bd61f-b8bd-456a-8813-3b00b2ebddb4@googlegroups.com> <l595fc$9de$1@speranza.aioe.org> <34ae1ec8-f301-4a46-bdc1-f2c2be3d7d4a@googlegroups.com>

Show all headers | View raw


In comp.lang.javascript message <34ae1ec8-f301-4a46-bdc1-f2c2be3d7d4a@go
oglegroups.com>, Mon, 4 Nov 2013 18:40:13, "Michael Haufe (TNO)"
<tno@thenewobjective.com> posted:

>On Monday, November 4, 2013 4:01:19 PM UTC-6, Chris M. Thomasson wrote:
>>
>> 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!   ;^)
>
>I thought about it a little more, and my thought is that because you
>are creating a fractal consisting of a significant number of circles
>any form of calculation like the one you are using or the one I was
>initially thinking is going to be terrible in performance.
>
>If you instead follow my idea of directly plotting the circles on the
>pixel array itself, you could find the intersection points with no
>calculation at all:
>
>setOfIntersectPoints.concat(plotCircle(x,y,r));
>
>when you draw the circle on the pixel array, you can look at the color
>of the current pixel before you plot the point. So if the default color
>of the canvas is white, and circles are black when plotted, the
>intersection of the current circle and ALL of the relevant circles in
>the region would be where the pixel is already black.


As I understand it, the desire is to show a fractal based on exact
circles positioned in the exact intersections of exact circles, which
would require infinite-length arithmetic.

The OP's code would replace exact arithmetic with IEEE Doubles
arithmetic, resolution about 1 in 7E15, which is likely to be good
enough.

Your idea rounds the points of intersection to be integers in pixel
units; and that may not be good enough.  Additionally, one must consider
the possible cases of tangency and of almost-parallel intersection,
where many pixels may "lie on" both lines.

I recall the esteemed Fred, Head of Workshop, consulting me about a cam-
shape calculation which was going astray.  He prudently had tested it
using a graph-plotter before using the nice new numerically-controlled
milling-machine, and I was able to perceive that his code had
substantially that problem, easily enough avoided once realised.

-- 
 (c) John Stockton, nr London, UK.   E-mail, see Home Page.    Turnpike v6.05.
 Website  <http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
 PAS EXE etc. : <http://www.merlyn.demon.co.uk/programs/> - see in 00index.htm
 Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm etc.

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