home *** CD-ROM | disk | FTP | other *** search
/ PC World 1999 September / PCWorld_1999-09_cd.bin / Software / Servis / CDHIEP / Setup_IEP.EXE / GRLENS13.TXT < prev    next >
Encoding:
Text File  |  1997-10-30  |  2.3 KB  |  67 lines

  1. GRAVITATIONAL LENSER 1.3
  2. Copyright 1997 by Leos Ondra
  3.  
  4. The  Gravitational  Lenser  1.3  is a free plug-in for Adobe Photoshop
  5. (version 3.0x and above) and Windows, created with the Filter Factory.
  6. It  simulates  gravitational  lensing  by  a  point  mass in the usual
  7. weak-field,  small-angle, and thin-screen approximation. It works only
  8. with RGB (16-million-colors) images.
  9.  
  10. Compared  to  the  previous  version  (1.2) the filter is much faster,
  11. thanks to code improvements made by Kangaroo and Mario Klingemann.
  12.  
  13. Built-in sliders can be used to adjust the position of the lens within
  14. an  image,  the Einstein radius and the RGB color of the Einstein ring
  15. and the  undefined area around the lens, where the filter tries to map
  16. the region outside the image's edges.
  17.  
  18. The source code of the Gravitational Lenser 1.3:
  19.  
  20. R:
  21.  
  22. put(x-val(0,0,X),0),put(y-val(1,Y,0),1),
  23. put(get(0)*get(0)+get(1)*get(1),2),
  24. put(val(2,0,min(X/2,Y/2)),6),
  25. put(get(0)*get(6)*get(6)/get(2),3),
  26. put(get(1)*get(6)*get(6)/get(2),4),
  27. put(sqr(get(2))==get(6) || get(2)==0 || (x-get(3) > X)
  28. || (x-get(3) < 0) || (y-get(4) > Y) || (y-get(4) < 0),5),
  29. get(5) ? ctl(3+z) : src(x-get(3),y-get(4),z)
  30.  
  31. G:
  32.  
  33. get(5) ? ctl(3+z) : src(x-get(3),y-get(4),z)
  34.  
  35. B:
  36.  
  37. get(5) ? ctl(3+z) : src(x-get(3),y-get(4),z)
  38.  
  39. Slider 0 : Lens position (x)  range : [0,X]
  40. Slider 1 : Lens position (y)  range : [Y,0]
  41. Slider 2 : Einstein radius    range : [0,min(X/2,Y/2)]
  42. Slider 3 : Color (R)          range : [0,255]
  43. Slider 4 : Color (G)          range : [0,255]
  44. Slider 5 : Color (B)          range : [0,255]
  45.  
  46. where   X  and  Y  is  the  image's  width  and  height  (in  pixels),
  47. respectively.
  48.  
  49. More detailed desctiption of the Gravitational Lenser 1.3 can be found
  50. at http://www.sci.muni.cz/~ondra/grlens/grl0.html.
  51.  
  52. The archive grlens13.zip contains the following files:
  53.  
  54. 1, grlens13.txt  This file
  55. 2, grlens13.afs  The source file for the Filter Factory
  56. 3, grlens13.8bf  The filter itself, compiled for Windows
  57.  
  58. No  warranties  are given. Distribution of Gravitational Lenser 1.3 is
  59. allowed  as  long as the file grlens13.8bf is left intact and free for
  60. the  ultimate user. Commercial redistribution without prior consent of
  61. the author is forbidden.
  62.  
  63. Leos Ondra
  64. Skretova 6, 621 00 Brno, Czech Republic
  65. ondra@physics.muni.cz
  66.  
  67. October 30, 1997