Today's post is an astroid,not the asteroid of Jim Muth's recent post.
From a big rock in outer space to an object on the complex plane - that's a transition! A three color range orbit trap formula by Paul Carlson. Ready made at http://maxitersfractalfollies.blogspot.com
fract461.gif { ; astroid not asteroid ; blank ; calctime 0:15:26.65 ; created Oct 06, 2010 ; Fractint Version 2004 Patchlevel 9 reset=2004 type=formula formulafile=_a.frm formulaname=Astroid_Mset passes=1 center-mag=-0.10064490259883670/+0.95634738310731750/334.5786 params=0.3/2/3/85 float=y maxiter=1500 inside=0 outside=summ colors=0z00000y00y00x00x00w00w00v00v00u00u00t00s00s00r00r00q00q00p00p00o\ 00o00n00n00m00l00l00k00k00j00j00i00i00h00h00g00f00f00e00e00d00d00c00c00b\ 00b00a00a00`00_00_00Z00Z00Y00Y00X00X00W00W00V00U00U00T00T00S00S00R00R00Q\ 00Q00P00P00O00N00N00M00M00L00L00K00K00J00J00I00H0z00z00z00z00y00y00y00x0\ 0x00x00x00w00w00w00v00v00v00u00u00u00u00t00t00t00s00s00s00r00r00r00r00q0\ 0q00q00p00p00p00o00o00o00o00n00n00n00m00m00m00m00l00l00l00k00k00k00j00j0\ 0j00j00i00i00i00h00h00h00g00g00g00g00f00f00f00e00e00e00d00d00d00d00c00c0\ 0c00b00b00b00a0000z00z00y00y00x00x00w00w00v00u00u00t00t00s00s00r00q00q00\ p00p00o00o00n00m00m00l00l00k00k00j00i00i00h00h00g00g00f00e00e00d00d00c00\ c00b00a00a00`00`00_00_00Z00Y00Y00X00X00W00W00V00U00U00T00T00S00S00R00Q00\ Q00P00P00O00O00N00M00M00L00L00K00K00J00I00I00H00H00G00F } frm: Astroid_Mset {; Copyright (c) Paul W. Carlson, 1997 ;**************************************************** ; Always use floating point math and outside=summ. ; ; Parameters: ; real(p1) = a factor controlling the width of the curves ; imag(p1) = radius of the astroid ; real(p2) = number of color ranges ; imag(p2) = number of colors in each color range ; ; Note that the equation variable is w, not z. Always ; initialize z to zero. ;**************************************************** w = 0 c = pixel z = 0 bailout = 0 iter = 0 range_num = 0 i = (0,1) r = imag(p1) ;**************************************************** ; In the accompanying par file, astmset.par, ; we have 8 color ranges with 30 colors in each range ; for a total of 240 colors. The first range starts at ; color 1. Pixels will use color 0 when |w| < 10000. ; Other values can be used here as long as the product ; of num_ranges times colors_in_range is less than 255. ; Color 0 is reserved for the background color and color ; 255 can be used for the inside color. ;**************************************************** num_ranges = real(p2) colors_in_range = imag(p2) ;**************************************************** ; Real(p1) controls the width of the curves. ; These values will usually be in the range 0.001 to 0.1 ;**************************************************** width = real(p1) index_factor = (colors_in_range - 1) / width: ;**************************************************** ; The equation being iterated. Almost any equation ; that can be expressed in terms of a complex variable ; and a complex constant will work with this method. ; This example uses the standard Mandelbrot set equation. ;**************************************************** w = w * w + c ;**************************************************** ; The orbit trap curve. This example uses an "astroid" ; curve (which has absolutely nothing to do with huge ; rocks in outer space). Any two-dimensional curve can ; be used which can be expressed in parametric form in ; terms of the angle from the origin. ;**************************************************** ang = atan(imag(w) / real(w)) astroid = r * (cos(ang)^3 + i * sin(ang)^3) ;**************************************************** ; If the orbit point is within some distance of the curve, ; set z to the index into the colormap and set the bailout ; flag. Note: the way we use the "distance" here has ; the effect of turning the curves inside-out in the image. ;**************************************************** distance = abs(|w| - |astroid|) IF (distance < width && iter > 1) z = index_factor * distance + range_num * colors_in_range + 1 bailout = 1 ENDIF ;**************************************************** ; Cycle through the range numbers (0 thru num_ranges - 1) ; With two color ranges, even iterations use color ; range 0, odd iterations use color range 1. ;**************************************************** range_num = range_num + 1 IF (range_num == num_ranges) range_num = 0 ENDIF ;**************************************************** ; Since we are using outside=summ, we have to subtract ; the number of iterations from z. ;**************************************************** iter = iter + 1 z = z - iter ;**************************************************** ; Finally, we test for bailout ;**************************************************** bailout == 0 && |w| < 1000 ;SOURCE: 98msg.frm } Roger Alexander