Results 1 to 2 of 2
  1. #1
    Mr.Beans's Avatar
    Mr.Beans is offline Senior Member
    Join Date
    Apr 2009
    Location
    Virginia Beach, Virginia
    Posts
    149
    Rep Power
    0

    Default Zooming in on fractal

    I'm trying to create an animated fractal generating program. However I've run into a bit of a roadblock when it comes to animating the fractals. I'm trying to create a colored animation of the Mandelbrot set.

    The following picture is simply panning to the left and zooming in.



    I don't see how I can zoom in when the coordinate plane can only consist of integers.
    Even if I had a coordinate plane made of rational numbers, I could't zoom but so much. How can I get around to being able to infinitely zoom. Any ideas?

    Thank you for your time and effort,

    Mr. Beans
    Last edited by Mr.Beans; 04-18-2009 at 05:38 AM.

  2. #2
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Location
    Cambridge, UK
    Posts
    838
    Rep Power
    6

    Default

    Firstly, you must remember to distinguish between the fractal coordinate plane and the image coordinate plane. Each pixel (denoted by integers) maps to a point in the fractal, which will be some real-valued coordinate. When you zoom, you change this mapping. The image coordinates always stay the same.

    For example, in a 64x64 pixel image you can map 0 to -2 and 63 to 2 with 1 pixel = 0.625 to show the whole fractal, or zoom in by mapping 0 to -0.2 and 63 to -0.1 with 1 pixel = 0.0015625.

    You can never zoom infinitely - even if you used BigDecimal you would eventually run out of memory. The animation above uses the fact that the fractal repeats itself and just loops roughly 12 frames.
    Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
    How To Ask Questions The Smart Way

Similar Threads

  1. Zooming Canvas Area
    By Raghavansat in forum AWT / Swing
    Replies: 0
    Last Post: 02-04-2009, 09:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •