home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!paladin.american.edu!auvm!FWI.UVA.NL!DOK
- Return-Path: <dok@fwi.uva.nl>
- X-Organisation: Faculty of Mathematics & Computer Science University of
- Amsterdam Plantage Muidergracht 24 NL-1018 TV Amsterdam The
- Netherlands
- X-Phone: +31 20 525 5200
- X-Telex: 16460 facwn nl
- X-Fax: +31 20 525 5101
- Message-ID: <199301220853.AA09482@larry.fwi.uva.nl>
- Newsgroups: bit.listserv.frac-l
- Date: Fri, 22 Jan 1993 09:53:19 +0100
- Sender: 'FRACTAL' discussion list <FRAC-L@GITVM1.BITNET>
- From: "P.J.van Dok W92" <dok@FWI.UVA.NL>
- Subject: Re: Speeding up Calculation of Mandelbrot Set
- Lines: 34
-
- Hi there!
-
- On the topic of speeding up calculation:
-
- As mike points out, there are two aspects to the speeding up.
-
- >1. Try to optimize the routine that calculates the dwell of a given point.
-
- If you have no knowledge of assembler, there are still ways of speeding things
- up a bit. When you check wether the point has escaped to infinity, do not
- calcu-
- late x*x and y*y seperate, but put those values in two variables, so that you
- can re-use them for the calculation of the next x-value. a
- Also, instead of : y := 2*x*y;
- do this:
- q := x*y;
- y := q+q+b;
-
- An addition is much faster than a multiplication.
- Also, if you dont test for escape from a circlelike border, but against a square
- area, an idea from mr. Pickover, I believe, which means:
-
- in stead of : if x*x+y*y > 4 then ....
- you get if abs(x) >2 or abs(y) >2 then ...
- you can reduce the multiplication by using:
- x := (x+y)*(x-y) + a;
-
- instead of the usual two squares.
-
- I will send sth about point two as well if anybody's interested.
-
- See Ya!
-
- Hans van Dok.
-