POV-Ray : Newsgroups : povray.text.scene-files : Mandelbrot Explorer Server Time
1 Nov 2024 13:20:04 EDT (-0400)
  Mandelbrot Explorer (Message 1 to 2 of 2)  
From: John VanSickle
Subject: Mandelbrot Explorer
Date: 13 Jun 2000 19:38:59
Message: <3946C5CD.33BE1D0D@erols.com>
I wrote a bit of POV scene code to help explore Mandelbrots.  The
source is at the end of this message.

The helpful part is the macro defined at the very beginning; it centers
the view around a particular point, so that there is no need to use
guess work.  Simply render, select a spot worthy of further magnification,
add in code using the Center() macro, and then add a scale transform to
zoom in.

You can also tweak the color map and the frequency setting to get a
pleasant combination of colors.

Enjoy,
John

// SCENE FILE FOLLOWS
#local SizeX=320; // the width of the preview window
#local SizeY=240; // the height of the preview window

#macro Center(pX,pY)
  translate <(SizeX-1)/2-pX,pY-(SizeY-1)/2,0>/(SizeY-1)
#end

plane 
{ -z, 0
  texture
  {
    finish { ambient 1 diffuse 0 }
    pigment 
    { mandel 4000 
      frequency 44
      ramp_wave
      color_map
      {
        [0/6 rgb <0,0,0>]
        [1/6 rgb <1,0,0>]
        [2/6 rgb <1,1,0>]
        [3/6 rgb <1,1,1>]
        [4/6 rgb <0,1,1>]
        [5/6 rgb <0,0,1>]
        [6/6 rgb <0,0,0>]
      }
// these next two lines put the mandelbrot fully into the screen
      translate x*.75
      scale .4
// from here on, use the Center() macro to center the view on a
// particular point in the preview; then use the scale transform
// to zoom in.

// for instance,
//    Center(245,56)
//    scale 10
// will center it around an interesting area, and zoom by 10
// at that spot.
    }
  }
}

camera { orthographic
  location -z
  direction z
  up y
  right x*4/3
}

// END OF SCENE FILE

-- 
ICQ: 46085459


Post a reply to this message

From: redcow
Subject: Re: Mandelbrot Explorer
Date: 13 Jun 2000 23:43:21
Message: <39470175.AACF2C62@erols.com>
wow -- this has got to be one of the coolest things i've seen done with
pov-ray!  I think this is my first visit to pts-f just because of that awesome
shot in the images group -- great work man!

-Gene


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.