F.O.T.N. (Fractal of the Night) 27 Jan 1998 (FractoRama)


Tonight is a first since the Fractal of the Night series started. I have lost contact with Dr. J.  No point in speculating, but I bet he is sulking or celebrating the result of the FractoBowl game yesterday. So I figured I better try to explain the formula he so easily came up with for making panorama views.  You may have seen them.  A co-worker of mine works in one of those Dilbert cubes, as I do. He, however, has set up a simulation of a corner office with window views of San Diego. It uses a panorama picture that he wraps around part of the cube. Great effect.

Back to Dr. J.  First of all I think he may have been distracted by the game, since there is an inconvenience in the formula which I can't imagine he would normally make.  Here is a quote of his remark:

>  Try this as an example, something like

>  1)   c = exp(flip(pixel))-p2

>  gives me a panorama view of your fractal from the point p2.

He got the sign incorrect for p2.  It should be

2)  c = exp(flip(pixel)) + p2.

Here, p2 is the coordinate of the view point.  Let us solve for the coordinates  of a point in the scene viewed by a pixel on your screen, as if your screen were a camera.  We solve for 'pixel' like this. Now, c is the coordinates of the scene point, pixel that of the picture coordinates.

3)   c - p2 = exp(flip(pixel))

4)   log(c-p2) = flip(pixel)

Now in complex arithmetic, the logarithm is in two parts, the real part is the log of the radius, the imaginary part is the angle. So,

5)  log(r) + i*theta = flip(pixel)

What is this flip function?   It switches the real for the imaginary part.  That gives us, in this formula, the angle, theta, for x in the picture and log(r) for the y axis in the picture.   That is, we have

6)  flip( log(r) + i*theta) = pixel.

This is close to what we get with those panorama pictures you see.  The horizontal axis is the pan angle, sweeping around left to right through most or all of the horizon. The vertical is like distance, up shows the furthest parts of the city. Along the bottom are the close up buildings.

Imagine you were in a park shaped like the Mandelbrot set. You walk over to the center of the big circle, climb a tower there and get a sweeping view of the whole set. In one direction you see the spike (toward -2). In the other, you see the cardioid. A cameraman is there also, taking one of those panorama pictures. He asks you to please move along, so you will not be in the picture. You agree, if he will give you a copy. The picture looks much like Figure 1.  The light seems going toward the (0.8,-0.6) direction.  Long shadows are cast in the fourth quadrant.  In the frm file, p1 (the light direction parameter) multiplies dz.  It is equivalent to dividing by conj(p1) or (0.8,0.6).

2-l-panx.gif

Figure 1. FractoRama of the Mandelbrot set

Enjoy
Jay


frm:Colorit-2rPanx { ; (c) Jay Hill, 1998
; p1= light angle (cos a, sin a)
; p2 = pan view point
if(p1==0)
p1=1
endif
done = 1, iter=0, z = 0, zc = 0, dz=1,
c = exp(flip(pixel))+p2
: ; initialization.
iter = iter+1 ; gotta count em
dz=2*zc*dz+1 ; derivative, dz/dc
zc=sqr(zc) + c ; standard MSet iteration
if(|zc| >= 1024) ; Bailout
z = z -8 + ((sin(2*pi*iter/256)*Real(p1*dz/zc))>0) + iter
done=-1 ; Set flag to force an exit.
endif
done >= 0 ; Continue if the flag >=0.
}


MSet2-lPanx { ; (c) Jay Hill, 1998 Lighting on MSet z=z^2+c
; Panorama view from center of circle at c=-1
reset=1960 type=formula formulaname=colorit-2rpanx
center-mag=0/0/0.417745 params=0.8/0.6/-1/0 float=y
maxiter=2560 inside=0 outside=real periodicity=0
colors=cAA08w0Ed0Hw0Ie0Pw0Mg0Yw0Rh0e\
w0Vj0nw0ZkwmUcSH0mK0U02mJ1U05nI3U07n\
H5V0AoG6V0CoF8W0FpDAW0IqCCX0KqBDX0Nr\
AFX0Pr9HY0Ss8JY0Vt6KZ0Xt5MZ0wK0mc0wK\
0mc0wK0mc0wK0mc0wL0mc1wL1mc1wL1lc1wM\
1lc1wM1lb2wM1lb2wN2lb2wN2kb2wN2kb3wO\
2kb3wO3kb3wO3kb3wP3ja4wP3ja4wP3ja4wQ\
4ja4wQ4ja5wQ4ia5wR4ia5wR4ia5wR5i`6wR\
5i`6wS5h`6wS5h`7wS6h`7wT6h`7wT6h`7wT\
6g_8wU6g_8wU7g_8wU7g_8xV7g_9xV7f_9xV\
8f_9xW8f_9xW8fZAxW8fZAxX8eZAxX9eZAxX\
9eZBxY9eZBxY9eZBxY9dZBxYAdYCxZAdYCxZ\
AdYCxZAdYDx_BdYDx_BcYDx_BcYDx`BcXEx`\
BcXEx`CcXExaCbXExaCbXFxaCbXFxbDbXFxb\
DbXFxbDaWGxcDaWGxcDaWGxcEaWGxdEaWHxd\
E`WHxdE`WHyeF`WHyfG`VIyfH`VIygJ_VIyg\
K_VJyhL_VJyhM_VJyiO_VJyiPZUKyjQZUKyj\
SZUKykTZUKxkUZULxlVYULxlXYULxmYYULxm\
ZYTMxn`YTMxnaXTMxobXTMxocXTNxpeXTNxp\
fXTNxqgWSOxqhWSPxrjWSPxrkWSQxslWSQxs\
nVTRxtoVTRxtpVTSxuqVTSxusVTTxvtVTTxv\
uUUUwwwKKKmmmUUU0Ac
savename=2-l-panx
}


Home Next