Slope Formula Tutorial for UltraFractal - Page 8

The Apollonian Gasket is probably the best known of the circle inversion fractals. It is described at the Mathworld web site and many other places on the web. It has a fractal dimension of approximately 1.3058... and corresponds to a limit set that is invariant under a Kleinian group (see the section on Kleinian Group Fractals). It is created by iteratively carrying out circle inversions on three mutually tangent circles of the same radius. There are four circles that are mutually tangent that do the inversions, three outside circles and one inner circle.

There are two Apollonian Gasket formulas that use that use the slope algorithm, one is in reb.ufm and the other is in reb.ucl. There is some redundancy between the two formulas, but both will be treated here. The two formulas are Slope Apollonian Gasket (the ufm) and Apollonian Gasket (the ucl). Both formulas require specialized gradients to get realistic ray trace-like coloring. In addition there is a transform that is intended to be used with both of these formulas that is in reb.uxf. It is also called Apollonian Gasket. The following parameters are in common with both formulas and the transform (only selected parameters are listed):

• Max Iters - This is the maximum number of circle inversion iterations.
• Smallest Circle -  This is the "bailout" for circle inversions. Iteration continues until the circle size is less than the smallest circle.
• Show Base Set - These are the three circles that are iterated through circle inversions.
• Perturb Type - This is an interesting option. With the standard Apollonian Gasket four mutually tangent circles are used as the inversion circles. The perturbations create overlap between the inversion circles. The positions of the initial circles to invert have to be adjusted so that they are still orthogonal to the inversion circles. Only certain defined amounts of overlap will still generate a fractal gasket structure.  You probably won't find anything on this anywhere on the web. If you do, please let me know.
• None - No perturbation. This is the standard Apollonian Gasket.
• Outer circles - The outer inversion circles are repositioned to create overlap.
• Inner circle -  The inner circle is resized to create overlap.
• Perturb Level - This parameter is visible only if Perturb Type is not equal to "None". Overlap of the inversion circles increases with increasing Perturb Level.
• Magnification - The magnification parameter on the Location Tab, and zooming in the fractal window do not work with these formulas. Use the Magnification parameter in the formula instead.

The following parameters are common to the ufm and the ucl:

• Solid Backgound - If checked, background color (and transparency) is controlled from the Outside Tab.
• Fill Type -  This determines the lighting shape for the iterated circles.
• Quartic1 - This is the ellipsoid lighting:
`(radiuspower - alpha*xpower - beta*ypower)1/power/gamma`
• Quartic2 - Hyperboloid lighting #1:
`(radiuspower + alpha*xpower - beta*ypower)1/power/gamma`
• Quartic3 - Hyperboloid lighting #2:
`(radiuspower + alpha*xpower + beta*ypower)1/power/gamma`
• Quartic4 - Hyperboloid lighting #3:
`(radiuspower - alpha*xpower + beta*ypower)1/power/gamma`
• Power - The power in the Quartic formulas.
• alpha - See the Quartic formulas.
• beta - See the Quartic formulas.
• gamma - See the Quartic formulas.
• global fBm weight - The two global fBm parameters are unique in that they perturb the structure of the gasket shapes and not the coloring of the shapes. They put texture on the shape surface so that light reflecting off the surface shows the texture. This parameter determines the intensity of the texture.
• global fBm scale - Determines the scale of the texture.

The following parameters are for coloring the ucl:

• color scale adj - This is an internal adjustment to how the colors in the gradient are used.
• # of colors - This determines how many colors are used to color the gasket shapes, depending upon the color method. The maximum value is 8.
• ring width - The formula can create a ring around each gasket shape.
• ring color - The color of the ring (1-8).
• color method - All of the coloring methods are done with a modulus of the # of colors.
• level - color by iteration level
• size - color by size
• number - color by index number of the gasket.
• position - color by position on the screen.

The user is encouraged to explore any parameters not listed here.

The first two images show the gradient use for the ufm and the ucl. With the ufm, all gasket shapes, in this case spheres, are colored with the same color. With the ucl, an 8 color gradient is used.

 ApolloBasic created with the ufm ApolloBasic2 created with the ucl

Because the gradients are so critical to creating these images, uprs for the two images follow:

```ApolloBasic {
fractal:
title="ApolloBasic" width=640 height=640 layers=1
gamma=1.77000000000000002 credits="Ronald Barnett;1/26/2007"
layer:
method=multipass caption="Background" opacity=100
mapping:
center=0/0 magn=1
formula:
maxiter=100 filename="reb.ufm" entry="Slope_Apollonian"
p_version=200 p_solid=yes p_applyMapping=no p_percentInc=0.0
p_level=100 p_scircle=0.0001 p_base=no p_lace=no p_ptype=None
p_pert=1 p_xfer=linear p_zscale=0.4 p_zscale2=0.025
p_fill="quartic 1" p_pwr=2 p_alpha=1 p_beta=1 p_gamma=1
p_gnoffset=0/0 p_gfbmf=0.1 p_gnscale=0 p_gfreq=1 p_giter=7
inside:
transfer=none
outside:
density=.5 transfer=linear filename="reb.ucl"
entry="3D_Texturizer_Enhanced_III" p_trap=no p_trapsum=no
p_ltype="Infinite light" p_angle=120.0 p_elevation=60.0
p_lpointx=1.5 p_lpointy=2 p_lplane=5 p_lightx=0 p_lighty=0
p_lightz=0 p_ambient=0.0 p_texture=Lattice p_gridx=1.0 p_gridy=1.0
p_dx=0.0 p_dy=0.0 p_theight=1.0 p_weight=0.0 p_blend=0.5
p_toffset=1.0 p_smooth=no p_transfer=linear p_fbm=0.2 p_fbmf=0.5
p_noffset=0/0 p_nscale=0.0 p_toffsetII=2/2 p_tweight=0.0 p_ts=5.0
p_tc=7.0 p_pwr=1E-8 p_pmix=0.0 f_fn3=sin f_fn1=sqr f_fn2=acos
index=157 color=14691209 index=167 color=16777215 index=177
color=14756745 index=-33 color=0
opacity:
smooth=no index=0 opacity=255
}```
```ApolloBasic2 {
::t7013in21VVTPOKOQ07RK/HQcfSsNfYYH5DTfZVLt7eY/D0yxYIebjh24Mdy8rfLjBSaYCnK
Xlr6VvXVWUb5CHX/H73FF5UOtkF/j+Otu7F+gSQij+UV5OzyTRRnlqmzuRTN/m0Oww+sa4tt
cG+Ali+yHJSYlVK3AL+f7McdV0LcrR6cfHfkkfkgQ0497Gr0I6tS35uKW7FtT1zHGiE8enqz
wifhLevx2dxUFH11zFK3NGGh2vrl33rMNjpLkGn0yQHRRt8Gjv3q7sQ14hqzvq8xxR9Sr4sU
8OrruOqWplGeLwar80hL1txRQds3Yx9qrS9bwdGkuYfF6nOwQHQJ4UcW5RwKvEsp73pMDqKZ
QGtczQNglpzI3vr7ibbItyI52ohOtqilSKwJpF40019jQPC9ULFGMGF382fyHeH6Lop+JMI8
qEonwpQBvJHCdMoP6b/dQlg2B84ZPUuXNCPPAHa5Plavc6zWosCYFAigwhKciPIDZq5iJre3
teJ7fA2FKozrqQycIVvlR0p7ssiQFshNI0BfIbIk3UoV9h6NN5HU/yXQe1/BbToQyXfQs6f7
XBMQHSXOQ8NLJznnpxjfaWITJQM+4+Tuna82TKg3sv5hGUZNL+jLcrTJiweZs/TLj4vnu/Mn
NTepjP2rT74glTe1dxKZ/F3B5673Grq6qvjnsvdv7B/BRGcGMcTPiCX/zwhQoTwkvybHy1Nt
tFu5QbXHIijy16lIgPnanKCYVDmTagZej9oPmZW9G70vGrZKxRyOfxQRaqtyPCqw4LI69m71
XB984ok6+CXgH9JLERwyCO9acgO9tqg0U/WtJhBPPMuRbMb4D7oFhxFdwacjlX5ncjvfuLD2
OXY6CorMVyrwDgowyVSRJNhkP7mM5GnTpUCeUamClOnRZeCGXO5OlO5GN7oclD6I1C+yx48Z
sorxa2f6ylTJJTOLp3LychLXjEmgnTFVSKW8Sun7Kswk7ghLSn9uhU40yt4jpzwhzyKp5F0l
APhaYa6DtSWeeChsAa5GQ3QQCB/Y+AoZ5FLxeCokFOOiIGl+4QdNokNzPyCNJJLgRfumSWGg
vo7KaSZxKI+2MngbN9D5VPPD3Dt87aSG8u7/BkjPbmH=
}
```

The next three images are layered images which show off some of the capabilities of the ufm, the ucl and the transform. The first, ApolloOnApollo, layer the ufm and the ucl, taking advantage of the texturing abilities of the formulas. ApolloOuter10 and ApolloInner10 show some perturbation effects, some additional parameter settings, and use of the Apollonian Gasket transform. The user should study the uprs to determine how these images where created.

 ApolloOnApollo ApolloOuter10 ApolloInner10
```ApolloOnApollo {
::oDMfmjn21aVTPutNQ07Gw/HE091mSyyyuF8QDaQhBSbBayhezgWiSmdpI5SRn1e/13hcok9u
Jb6mAUfxD589jz8sbtsaHT+Tznlk4EOJnm+LGtUq/TF+dayjiG3R66VkkjcR3RXQUyuwtD0c
vfds+eGNbRVF5ZfyTqt8Ghbgm+XaFT2k8OmVxdufObZ+6l5ESV68ZhIFyfP3dU3Q7PJdCDbY
tFCPDTH7swrPLxwt1H513T1ttJtCJXx6BgwyPs4UbfaCEH7FaqRcmL3D2Mwdp+IYiHokFkis
VZlbXCSr3CyVznJUDiGOisWmaoFylSr4znpP5+SVShizsJDapohuKvaT2WSW+mXWP1yQqjlE
GmKANkMMCHYDcf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