Brooklyn

This is a relatively fanciful example, based on a manipulated image of the Brooklyn Bridge by Pol Buri (or is it Pol Bury?). The idea is to cut concentric circles into the image and then rotate the resulting rings by differing amounts.

In the example below, the rings are rotated counter-clockwise increasing amounts as you move out from the center.

The whole idea is to rotate the pixels an amount given by a function of the distance of the pixel from the center. By making this function a step function, we get rings. If a continuous function is used, a more swirl-like effect results.

The right image is the result of processing the left image with the code below.


rem
rem This is an example of image manipulation software written in Basic
rem using the freeware Macintosh METAL basic interpreter.
rem 
rem This program creates an image from a given image by rotating
rem pixels an amount determined by a function of the distance from the pixel
rem to the center of the image.  A step function is used, so the result
rem has the appearance of concentric rings.
rem
rem Metal seems to have a problem with very large images, so try this on
rem relatively small ones, say 600 x 500 or smaller.
rem
rem Matthew M. Conroy, 2001.  
rem Do whatever you want to with this code, especially improve it.
rem

rem user selects image for input
file$ = open preview dialog$
get quicktime pict size file$,picW,picH

resize console 20,50,picW+20,picH+50
 load quicktime pict file$

virtu = init screen (0,0,picW+0,picH+0)
set screen to virtu
cls
copyrect 0,0,picW,picH,0,0,picW,picH,0,0,virtu

set screen to console
cls

rem radstep is the ring thickness
radstep=20

rem radfact determines how much rotation there is for each ring
radfact = 0.008

for x=0 to picW 
for y=0 to picH 

rem normalize xt and yt to the center of the image
xt = x-picW/2: yt = y-picH/2

t=atan2(yt,xt)
r = sqr(xt^2+yt^2)

rem this is the function that determines the rotation
rem notice that this is a step function; a swirl 
rem would result if t = t + r*radfact was used instead
t= t + radstep*(int(r/radstep))*radfact

rem calculate the x and y values from which to get the color for our pixel
xx=abs(picW/2+r*cos(t)) mod picW
yy=abs(picH/2+r*sin(t)) mod picH

set screen to virtu
get pixel xx,yy,red,green,blue

set screen to console
forecolor red,green,blue

plot x,y

next y
next x

back