Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Fractal

54 views
Skip to first unread message

Sharon COUKA

unread,
May 13, 2013, 11:41:51 AM5/13/13
to pytho...@python.org
Hello, I'm new to python and i have to make a Mandelbrot fractal image for school but I don't know how to zoom in my image.
Thank you for helping me.

Envoyé de mon iPad

Colin J. Williams

unread,
May 15, 2013, 8:07:03 AM5/15/13
to Sharon COUKA, pytho...@python.org
Google is your friend. Try "Mandelbrot Python"

Colin W.
>

Colin J. Williams

unread,
May 15, 2013, 8:07:03 AM5/15/13
to Sharon COUKA, pytho...@python.org
On 13/05/2013 11:41 AM, Sharon COUKA wrote:

Grant Edwards

unread,
May 15, 2013, 10:24:18 AM5/15/13
to
On 2013-05-13, Sharon COUKA <sharon...@hotmail.com> wrote:

> Hello, I'm new to python and i have to make a Mandelbrot fractal image for school but I don't know how to zoom in my image.
> Thank you for helping me.

It's a fractal image, so you zoom in/out with the following Python
instruction:

pass

;)

--
Grant Edwards grant.b.edwards Yow! I'm not available
at for comment..
gmail.com

Ian Kelly

unread,
May 15, 2013, 11:20:24 AM5/15/13
to Python
On Mon, May 13, 2013 at 9:41 AM, Sharon COUKA <sharon...@hotmail.com> wrote:
> Hello, I'm new to python and i have to make a Mandelbrot fractal image for school but I don't know how to zoom in my image.
> Thank you for helping me.

Is this a GUI application or does it just write the image to a file?
What GUI / image library are you using?

alex23

unread,
May 15, 2013, 8:00:24 PM5/15/13
to
On May 15, 10:07 pm, "Colin J. Williams" <c...@ncf.ca> wrote:
> Google is your friend.  Try "Mandelbrot Python"

My favourite is this one:
http://preshing.com/20110926/high-resolution-mandelbrot-in-obfuscated-python

Ulrich Eckhardt

unread,
May 16, 2013, 3:11:24 AM5/16/13
to
Am 16.05.2013 02:00, schrieb alex23:
> My favourite is this one:
> http://preshing.com/20110926/high-resolution-mandelbrot-in-obfuscated-python

Not only is this blog entry an interesting piece of art, there's other
interesting things to read there, too.

Thanks!

Uli


Chris Angelico

unread,
May 16, 2013, 3:24:00 AM5/16/13
to pytho...@python.org
I'm quite impressed, actually. Most people don't use Python for code
art. Significant indentation is not usually a good thing there :)

ChrisA

Ian Kelly

unread,
May 16, 2013, 11:35:43 AM5/16/13
to Python
On Thu, May 16, 2013 at 5:04 AM, Sharon COUKA <sharon...@hotmail.com> wrote:
> I have to write the script, and i have one but the zoom does not work

That doesn't answer my question. Perhaps if you would share with us
what you already have, then we could point out what you need to do and
where to get your "zoom" working.

Ian Kelly

unread,
May 16, 2013, 1:53:47 PM5/16/13
to Python
On Thu, May 16, 2013 at 10:55 AM, Sharon COUKA <sharon...@hotmail.com> wrote:
> # Register events
> c.bind('i', zoom)
> c.bind('i', unzoom)
> c.bind('i', mouseMove)

I'm not an expert at Tkinter so maybe one of the other residents can
help you better with that. The code above looks wrong to me, though.
As far as I know, 'i' is not a valid event sequence in Tkinter, and
besides you probably want to bind these functions to three *different*
events. See here for the docs on event sequences:

http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/event-sequences.html

Based on your code, it looks like you would probably want something like:

c.bind('<Button-1>', zoom)
c.bind('<Button-2>', unzoom)
c.bind('<Motion>', mouseMove)
0 new messages