Re: Fractal Dimension Computation in Python Code

2019-05-02 Thread tiwari . ram77
On Friday, September 29, 2000 at 12:45:00 PM UTC+5:45, Mike Brenner wrote:
> Myk> ... Has anyone got a fast routine for calculating the fractal
> dimension of a set of points in 2 or 3D space?  Thanks.
> 
> According to the inventor of fractals (Hausdorff in the year 1899), you
> can place the set of 2D points next to a wall and shine light through
> them, and the fractal dimension is the percentage of shadow on the wall. 
> 
> If the points are not dense anywhere, then the fractional dimension will
> be zero. But if parts of them are filled in, then they will cast a
> shadow.
> 
> Same with the 3D points, just put them next to a four dimensional wall
> and shine a four dimensional light through them (the way you measure the
> amount of holes in a Swiss Cheese :).
> 
> To do this in Python, you would have to define "dense" as being points
> that are within a certain distance of each other according to some
> cohesion metric, and then add up all the parts according to their
> topological coupling. The algorithm in outline would be something like
> this:
>
>   dimension=2
>   total_area = point_set.integrate_area(dimension,metric)
>   area = 0
>   coupling = neural_net.cluster(point_set,dimension,metric)
>   for connected_part in coupling:
>   area = area + connected_part.integrate_area(dimension,metric)
>   fractional_dimension = dimension * (total_area - area) / total_area
> 
> To make this work for real, just program the three missing functions:
> 
>   METRIC  computes the distance between two points
> 
>   INTEGRATE_AREA  integrates over point sets to get their area
> 
>   CLUSTER divides the set into independent connected point sets
> 
> If you don't have a neural net available to do the clustering, you can
> use a genetic algorithm or an annealing algorithm, all of which are
> equivalent. 
> 
> You could do this in an analog fashion by using a CRT projector onto the
> wall of a dark room and a sensitive light meter feeding into a ADC
> connected to your RS-232 or parallel or IEEE or Firewire port. Draw the
> point set on the screen and have the computer read the light meter, then
> draw an all white screen and read the light meter again, and take the
> ratio. Here is the code:
> 
>   graphics.init()
>   graphics.open()
>   dimension = 2
>   graphics.fill_screen(black)
>   black_area = firewire.read_ADC_voltage()
>   graphics.fill_screen(white)
>   white_area = firewire.read_ADC_voltage()
>   for point in point_set:
>   graphics.draw_point(point,black)
>   area = firewire.read_ADC_voltage()
>   denominator = white_area - black_area
>   numerator = area - black_area
>   fractional_dimension = dimension * numerator - denominator
> 
> This code requires you install a graphic capability, a firewire
> capability, a light sensitive meter, an analog-to-digital converter, a
> firewire driver for the ADC. To do a 3D point set this way, would
> probably involve techniques such as a tomograph machine to do one slice
> at a time.
> 
> Mike Brenner
> mikethemathematic...@ieee.org

hello sir
my name is Ramkrishna tiwari,assistant proessor of physics in tribhuvan 
university of nepal. Currently i am in a phd project  and needs to calculate 
box counting dimension from earthquake data(lon,lat,mag,depth) etc.i am using 
python and don't get any clue at all.would you please help me out by explaining 
the technique.
sincerely
Ramkrishna tiwari
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Writing a program to illustrate a fractal

2018-08-26 Thread Richard Damon
On 8/26/18 5:40 PM, Dennis Lee Bieber wrote:
>   But their definition is still confusing as it is formulated with a
> expression as the argument to a().
>
>   Taken literally, it says for n+4 to call a() with an argument of 8 (2n)
> AND to call it with an argument of 7 (2n-1) (returning two values) 

I have seen that sort of notation before for defining sequences (which
is what he was doing). Yes, it is not very useful for actually
implementing a function to compute the values, but if a was stored in an
array it makes some sense, as you make a loop that runs n, and compute
the various elements. The one confusion with how it was defined was that
the recursive definition starts at n=2, but for that value you only
compute the even value, as 2*n-1 = 3 which has already been defined, and
that definition would reference a(0) which hasn't been defined.

This is one reason I presented what I say as the 'normalized' equations
which are what would be more needed to actually compute as a function.

-- 
Richard Damon

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Writing a program to illustrate a fractal

2018-08-26 Thread Musatov
On Sunday, August 26, 2018 at 3:13:00 PM UTC-5, Oscar Benjamin wrote:
> On Sun, 26 Aug 2018 at 20:52, Musatov  wrote:
> >
> > Thank you, Richard. If anyone is interested further, even in writing a 
> > Python code to generate the sequence or further preparing of an animation I 
> > would be delighted.
> 
> It would not take long to write code to plot your sequence if you
> first cover the basics of Python. What have you tried so far?
> 
> Have you read the python.org tutorial? Here's a page from there that
> mentions the Fibonacci sequence incidentally:
> https://docs.python.org/3/tutorial/modules.html
> 
> For plotting I suggest matplotlib:
> https://matplotlib.org/users/pyplot_tutorial.html
> 
> --
> Oscar

I have some learning to do, but if I get stuck I'll write back on this thread.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Writing a program to illustrate a fractal

2018-08-26 Thread Oscar Benjamin
On Sun, 26 Aug 2018 at 20:52, Musatov  wrote:
>
> Thank you, Richard. If anyone is interested further, even in writing a Python 
> code to generate the sequence or further preparing of an animation I would be 
> delighted.

It would not take long to write code to plot your sequence if you
first cover the basics of Python. What have you tried so far?

Have you read the python.org tutorial? Here's a page from there that
mentions the Fibonacci sequence incidentally:
https://docs.python.org/3/tutorial/modules.html

For plotting I suggest matplotlib:
https://matplotlib.org/users/pyplot_tutorial.html

--
Oscar
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Writing a program to illustrate a fractal

2018-08-26 Thread Musatov
On Sunday, August 26, 2018 at 2:35:13 PM UTC-5, Richard Damon wrote:
> On 8/26/18 1:58 PM, Musatov wrote:
> > On Sunday, August 26, 2018 at 12:49:16 PM UTC-5, Richard Damon wrote:
> >> On 8/26/18 12:48 PM, Dennis Lee Bieber wrote:
> >>>> The sequence is defined by:
> >>>>
> >>>> For 1 <= n <= 3, a(n) = n; thereafter, a(2n) = a(n) + a(n+1), a(2n-1) = 
> >>>> a(n) + a(n-2).
> 
> >>> I am not sure what 'fractal' property this sequence has that he
> >>> wants to 
> >> display.
> > I'm sorry, let me try to explain:
> >
> > Here is my output:
> > 1, 2, 3, 5, 4, 8, 7, 9, 7, 12, 13, 15, 11, 16, 17, 16, 14, 19, 21, 25, 20, 
> > 28, 27, 26, 24, 27, 31, 33, 28, 33, 32, 30, 31, 33, 35, 40, 35, 46, 44, 45, 
> > 41, 48, 53, 55, 47, 53, 54, 50, 51, 51, 53,
> >
> > It is an OEIS sequence. 
> >
> > I was told this image of the scatterplot emphasizes the 'fractal nature' of 
> > my sequence:
> >
> > https://oeis.org/A292575/a292575.png
> 
> Something is wrong with that image compared to the sequence, as the
> sequence is always positive, and in fact the lowest the sequence can get
> to is always increasing (as it starts always positive, and each term is
> the sum of two previous terms),while the graph is going negative.
> 
> (actually going to the definition of the sequence, the plot isn't of
> a(n) but a(n)-n, which can go negative)
> 
> I normally think for fractals as a sequence of patterns of increasing
> complexity, or a pattern looked at with increasing resolution revealing
> the growth pattern. This sequence isn't quite like that, but I suppose
> if you think of the sequence a(n) in the interval m <= n <= 2*m, and
> then the interval 2*m <= n <= 4*m, that second interval is somewhat like
> the first with some recursively added pattern (especially if you include
> the -n in the sequence).
> 
> That graph is probably the best way to show that pattern.
> 
> One thing that might help, is to clean up the definition of a(n) to be
> more directly computable, and  maybe even include the subtraction of n.
> 
> A rewriting of your rules would be:
> 
> a(n)
> 
> n=1,2,3:    a(n) = n
> 
> n>3, and even: a(n) = a(n/2) + a(n/2+1)
> 
> n>3 and odd: a(n) = a((n+1)/2) + a(n-3)/2)
> 
> If I have done my math right, this is the same sequence definition, but
> always defining what a(n) is equal to.
> 
> If we want to define the sequence b(n) = a(n) - n, we can transform the
> above by substitution
> 
> b(n)
> 
> n=1,2,3: b(n) = 0
> 
> n>3 and even: b(n) = a(n/2)+a(n/2+1)-n
> 
>     = b(n/2)+b(n/2+1) + n/2 + n/2+1 -n
> 
>     = b(n/2) + b(n/2+1) + 1
> 
> n>3 and odd: b(n) = a((n+1)/2) + a((n-3)/2) - n
> 
>     = b((n+1)/2) + b((n-3)/2) + (n+1)/2 + (n-3)/2 -n
> 
>     = b((n+1)/2) + b((n-3)/2) -1
> 
> -- 
> Richard Damon

Thank you, Richard. If anyone is interested further, even in writing a Python 
code to generate the sequence or further preparing of an animation I would be 
delighted.

Musatov
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Writing a program to illustrate a fractal

2018-08-26 Thread Richard Damon
On 8/26/18 1:58 PM, Musatov wrote:
> On Sunday, August 26, 2018 at 12:49:16 PM UTC-5, Richard Damon wrote:
>> On 8/26/18 12:48 PM, Dennis Lee Bieber wrote:
>>>> The sequence is defined by:
>>>>
>>>> For 1 <= n <= 3, a(n) = n; thereafter, a(2n) = a(n) + a(n+1), a(2n-1) = 
>>>> a(n) + a(n-2).

>>> I am not sure what 'fractal' property this sequence has that he
>>> wants to 
>> display.
> I'm sorry, let me try to explain:
>
> Here is my output:
> 1, 2, 3, 5, 4, 8, 7, 9, 7, 12, 13, 15, 11, 16, 17, 16, 14, 19, 21, 25, 20, 
> 28, 27, 26, 24, 27, 31, 33, 28, 33, 32, 30, 31, 33, 35, 40, 35, 46, 44, 45, 
> 41, 48, 53, 55, 47, 53, 54, 50, 51, 51, 53,
>
> It is an OEIS sequence. 
>
> I was told this image of the scatterplot emphasizes the 'fractal nature' of 
> my sequence:
>
> https://oeis.org/A292575/a292575.png

Something is wrong with that image compared to the sequence, as the
sequence is always positive, and in fact the lowest the sequence can get
to is always increasing (as it starts always positive, and each term is
the sum of two previous terms),while the graph is going negative.

(actually going to the definition of the sequence, the plot isn't of
a(n) but a(n)-n, which can go negative)

I normally think for fractals as a sequence of patterns of increasing
complexity, or a pattern looked at with increasing resolution revealing
the growth pattern. This sequence isn't quite like that, but I suppose
if you think of the sequence a(n) in the interval m <= n <= 2*m, and
then the interval 2*m <= n <= 4*m, that second interval is somewhat like
the first with some recursively added pattern (especially if you include
the -n in the sequence).

That graph is probably the best way to show that pattern.

One thing that might help, is to clean up the definition of a(n) to be
more directly computable, and  maybe even include the subtraction of n.

A rewriting of your rules would be:

a(n)

n=1,2,3:    a(n) = n

n>3, and even: a(n) = a(n/2) + a(n/2+1)

n>3 and odd: a(n) = a((n+1)/2) + a(n-3)/2)

If I have done my math right, this is the same sequence definition, but
always defining what a(n) is equal to.

If we want to define the sequence b(n) = a(n) - n, we can transform the
above by substitution

b(n)

n=1,2,3: b(n) = 0

n>3 and even: b(n) = a(n/2)+a(n/2+1)-n

    = b(n/2)+b(n/2+1) + n/2 + n/2+1 -n

    = b(n/2) + b(n/2+1) + 1

n>3 and odd: b(n) = a((n+1)/2) + a((n-3)/2) - n

    = b((n+1)/2) + b((n-3)/2) + (n+1)/2 + (n-3)/2 -n

    = b((n+1)/2) + b((n-3)/2) -1

-- 
Richard Damon

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Writing a program to illustrate a fractal

2018-08-26 Thread Musatov
On Sunday, August 26, 2018 at 12:49:16 PM UTC-5, Richard Damon wrote:
> On 8/26/18 12:48 PM, Dennis Lee Bieber wrote:
> >> The sequence is defined by:
> >>
> >> For 1 <= n <= 3, a(n) = n; thereafter, a(2n) = a(n) + a(n+1), a(2n-1) = 
> >> a(n) + a(n-2).
> >>
> > Confusing explanation -- do you really mean that for n>=4 you are
> > returning TWO values? 

For a(4)..a(19) we have that: 2+3=5, 1+3=4, 3+5=8, 2+5=7, 5+4=9, 3+4=7, 4+8=12, 
5+8=13, 8+7=15, 4+7=11, 7+9=16, 8+9=17, 9+7=16, 7+7=14, 7+12=19, 9+12=21.

If so, it is not a strict function. I'd also write it
> > as
> 
> I think they intend that a(n) is defined for n being an integer (or
> maybe just the Natural Numbers, since it isn't defined for values below 1)
> 
> The two provided definitions provide the recursive definition for even
> and odd values.
> 
> I am not sure what 'fractal' property this sequence has that he wants to
> display.

I'm sorry, let me try to explain:

Here is my output:
1, 2, 3, 5, 4, 8, 7, 9, 7, 12, 13, 15, 11, 16, 17, 16, 14, 19, 21, 25, 20, 28, 
27, 26, 24, 27, 31, 33, 28, 33, 32, 30, 31, 33, 35, 40, 35, 46, 44, 45, 41, 48, 
53, 55, 47, 53, 54, 50, 51, 51, 53,

It is an OEIS sequence. 

I was told this image of the scatterplot emphasizes the 'fractal nature' of my 
sequence:

https://oeis.org/A292575/a292575.png
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Writing a program to illustrate a fractal

2018-08-26 Thread Richard Damon
On 8/26/18 12:48 PM, Dennis Lee Bieber wrote:
>> The sequence is defined by:
>>
>> For 1 <= n <= 3, a(n) = n; thereafter, a(2n) = a(n) + a(n+1), a(2n-1) = a(n) 
>> + a(n-2).
>>
>   Confusing explanation -- do you really mean that for n>=4 you are
> returning TWO values? If so, it is not a strict function. I'd also write it
> as

I think they intend that a(n) is defined for n being an integer (or
maybe just the Natural Numbers, since it isn't defined for values below 1)

The two provided definitions provide the recursive definition for even
and odd values.

I am not sure what 'fractal' property this sequence has that he wants to
display.
-- 
https://mail.python.org/mailman/listinfo/python-list


Writing a program to illustrate a fractal

2018-08-26 Thread Musatov
I have an integer sequence of a fractal nature and want to know if it is 
possible to write a program to illustrate it in a manner similar to the many 
animated Mandelbrot illustrations.

The sequence is defined by:

For 1 <= n <= 3, a(n) = n; thereafter, a(2n) = a(n) + a(n+1), a(2n-1) = a(n) + 
a(n-2).

Output begins:
1, 2, 3, 5, 4, 8, 7, 9, 7, 12, 13, 15, 11, 16, 17, 16, 14, 19, 21, 25, 20, 28, 
27, 26, 24, 27, 31, 33...

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Fractal

2013-05-16 Thread Ulrich Eckhardt

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


--
http://mail.python.org/mailman/listinfo/python-list


Re: Fractal

2013-05-16 Thread Chris Angelico
On Thu, May 16, 2013 at 5:11 PM, Ulrich Eckhardt
ulrich.eckha...@dominolaser.com wrote:
 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.

I'm quite impressed, actually. Most people don't use Python for code
art. Significant indentation is not usually a good thing there :)

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Fractal

2013-05-16 Thread Ian Kelly
On Thu, May 16, 2013 at 5:04 AM, Sharon COUKA sharon_co...@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.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Fractal

2013-05-16 Thread Ian Kelly
On Thu, May 16, 2013 at 10:55 AM, Sharon COUKA sharon_co...@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)
-- 
http://mail.python.org/mailman/listinfo/python-list


Fractal

2013-05-15 Thread Sharon COUKA
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
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Fractal

2013-05-15 Thread Colin J. Williams

On 13/05/2013 11:41 AM, Sharon COUKA 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.

Envoyé de mon iPad



Google is your friend.  Try Mandelbrot Python

Colin W.




--
http://mail.python.org/mailman/listinfo/python-list


Re: Fractal

2013-05-15 Thread Grant Edwards
On 2013-05-13, Sharon COUKA sharon_co...@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.edwardsYow! I'm not available
  at   for comment..
  gmail.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Fractal

2013-05-15 Thread Ian Kelly
On Mon, May 13, 2013 at 9:41 AM, Sharon COUKA sharon_co...@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?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Fractal

2013-05-15 Thread alex23
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
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-30 Thread pdpi
On Jun 29, 3:17 am, greg g...@cosc.canterbury.ac.nz wrote:
 Paul Rubin wrote:
  Steven D'Aprano st...@remove-this-cybersource.com.au writes:

 But that depends on what you call things... if electron shells are real
 (and they seem to be) and discontinuous, and the shells are predicted/
 specified by eigenvalues of some continuous function, is the continuous
 function part of nature or just a theoretical abstraction?

 Another thing to think about: If you put the atom in a
 magnetic field, the energy levels of the electrons get
 shifted slightly. To the extent that you can vary the
 magnetic field continuously, you can continuously
 adjust the energy levels.

 This of course raises the question of whether it's
 really possible to continuously adjust a magnetic field.
 But it's at least possible to do so with much finer
 granularity than the differences between energy levels
 in an atom.

 So if there is a fundamentally discrete model
 underlying everything, it must be at a much finer
 granularity than anything we've so far observed, and
 the discrete things that we have observed probably
 aren't direct reflections of it.

 --
 Greg

Electron shells and isolated electrons stuck in a magnetic field are
different phenomena that can't be directly compared. Or, at least,
such a comparison requires you to explain why it's proper.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-28 Thread Steven D'Aprano
On Thu, 25 Jun 2009 12:23:07 +0100, Robin Becker wrote:

 Paul Rubin wrote:
[...]
 No really, it is just set theory, which is a pretty bogus subject in
 some sense.  There aren't many discontinuous functions in nature. 

Depends on how you define discontinuous. Catastrophe theory is full of 
discontinuous changes in state. Animal (by which I include human) 
behaviour often displays discontinuous changes. So does chemistry: one 
minute the grenade is sitting there, stable as can be, the next it's an 
expanding cloud of gas and metal fragments. Then there's spontaneous 
symmetry breaking. At an atomic level, it's difficult to think of things 
which *aren't* discontinuous.

And of course, if quantum mechanics is right, nature is *nothing but* 
discontinuous functions.


 There
 is a philosophy of mathematics (intuitionism) that says classical set
 theory is wrong and in fact there are NO discontinuous functions.  They
 have their own mathematical axioms which allow developing calculus in a
 way that all functions are continuous.

On the other hand, there's also discrete mathematics, including discrete 
versions of calculus. 


 so does this render all the discreteness implied by quantum theory
 unreliable? or is it that we just cannot see(measure) the continuity
 that really happens?

That's a question for scientific investigation, not mathematics or 
philosophy.

It may be that the universe is fundamentally discontinuous, and the 
continuous functions we see are only because of our insufficiently high 
resolution senses and instruments. Or it may be that the discontinuities 
we see are only because we're not capable of looking closely enough to 
see the smooth function passing between the two ends of the discontinuity.

My money is on the universe being fundamentally discontinuous. We can 
explain the continuous behaviour of classical-scale phenomenon in terms 
of discontinuous quantum behaviour, but it doesn't seem possible to 
explain discontinuous quantum behaviour in terms of lower-level 
continuous behaviour.


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-28 Thread Paul Rubin
Steven D'Aprano st...@remove-this-cybersource.com.au writes:
 Depends on how you define discontinuous. 

The mathematical way, of course.  For any epsilon  0, etc.

 Catastrophe theory is full of discontinuous changes in state. Animal
 (by which I include human) behaviour often displays discontinuous
 changes.  So does chemistry: one minute the grenade is sitting there,
 stable as can be, the next it's an expanding cloud of gas and metal
 fragments.

If that transition from grenade to gas cloud takes a minute (or even a
femtosecond), it's not a mathematical discontinuity.  The other
examples work out about the same way.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-28 Thread Steven D'Aprano
On Sat, 27 Jun 2009 23:52:02 -0700, Paul Rubin wrote:

 Steven D'Aprano st...@remove-this-cybersource.com.au writes:
 Depends on how you define discontinuous.
 
 The mathematical way, of course.  For any epsilon  0, etc.

I thought we were talking about discontinuities in *nature*, not in 
mathematics. There's no of course about it.


 Catastrophe theory is full of discontinuous changes in state. Animal
 (by which I include human) behaviour often displays discontinuous
 changes.  So does chemistry: one minute the grenade is sitting there,
 stable as can be, the next it's an expanding cloud of gas and metal
 fragments.
 
 If that transition from grenade to gas cloud takes a minute (or even a
 femtosecond), it's not a mathematical discontinuity.  

In mathematics, you can cut up a pea and reassemble it into a solid 
sphere the size of the Earth. Try doing that with a real pea.

Mathematics is an abstraction. It doesn't necessarily correspond to 
reality. Assuming that reality really is the mathematical abstraction 
underneath is just an assumption, and not one supported by any evidence.


 The other examples work out about the same way.

handwave
Quantum phenomenon are actual mathematical discontinuities, or at least 
they can be, e.g. electron levels in an atom. Even when they are 
continuous, they're continuous because they consist of an infinity of 
discontinuous levels infinitesimally far apart.
/handwave



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-28 Thread Paul Rubin
Steven D'Aprano st...@remove-this-cybersource.com.au writes:
 I thought we were talking about discontinuities in *nature*, not in 
 mathematics. There's no of course about it.

IIRC we were talking about fractals, which are a topic in mathematics.
This led to some discussion of mathematical continuity, and the claim
that mathematical discontinuity doesn't appear to occur in nature (and
according to some, it shouldn't occur in mathematics either).

 In mathematics, you can cut up a pea and reassemble it into a solid 
 sphere the size of the Earth. Try doing that with a real pea.

That's another example of a mathematical phenomenon that doesn't occur
in nature.  What are you getting at?

 Quantum phenomenon are actual mathematical discontinuities, or at
 least they can be, e.g. electron levels in an atom.

I'm sure you know more physics than I do, but I was always taught
that observables (like electron levels) were eigenvalues of underlying
continuous operators.  That the eigenvalues are discrete just means
some continuous function has multiple roots that are discrete.

There is a theorem (I don't know the proof or even the precise
statement) that if quantum mechanics has the slightest amount of
linearity, then it's possible in principle to solve NP-hard problems
in polynomial time with quantum computers.  So I think it is treated
as perfectly linear.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-28 Thread Steven D'Aprano
On Sun, 28 Jun 2009 03:28:51 -0700, Paul Rubin wrote:

 Steven D'Aprano st...@remove-this-cybersource.com.au writes:
 I thought we were talking about discontinuities in *nature*, not in
 mathematics. There's no of course about it.
 
 IIRC we were talking about fractals, which are a topic in mathematics.
 This led to some discussion of mathematical continuity, and the claim
 that mathematical discontinuity doesn't appear to occur in nature (and
 according to some, it shouldn't occur in mathematics either).

I would argue that it's the other way around: mathematical *continuity* 
doesn't occur in nature. If things look continuous, it's only because 
we're not looking close enough.

But that depends on what you call things... if electron shells are real 
(and they seem to be) and discontinuous, and the shells are predicted/
specified by eigenvalues of some continuous function, is the continuous 
function part of nature or just a theoretical abstraction?


 In mathematics, you can cut up a pea and reassemble it into a solid
 sphere the size of the Earth. Try doing that with a real pea.
 
 That's another example of a mathematical phenomenon that doesn't occur
 in nature.  What are you getting at?

The point is that you can't safely draw conclusions about *nature* from 
*mathematics*. The existence or non-existence of discontinuities/
continuities in nature is an empirical question that can't be settled by 
any amount of armchair theorising, even very intelligent theorising, by 
theorists, philosophers or mathematicians. You have to go out and look.

By the way, the reason you can't do to a pea in reality what you can do 
with a mathematical abstraction of a pea is because peas are made of 
discontinuous atoms.



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-28 Thread Paul Rubin
Steven D'Aprano st...@remove-this-cybersource.com.au writes:
 But that depends on what you call things... if electron shells are real 
 (and they seem to be) and discontinuous, and the shells are predicted/
 specified by eigenvalues of some continuous function, is the continuous 
 function part of nature or just a theoretical abstraction?

Again, electron shells came up in the context of a question about
quantum theory, which is a mathematical theory involving continuous
operators.  That theory appears to very accurately model and predict
observable natural phenomena.  Is the real physical mechanism
underneath observable nature actually some kind of discrete checkers
game to which quantum theory is merely a close approximation?  Maybe,
but there's not a predictive mathematical theory like that right now,
and even if there was, we'd be back to the question of just how it is
that the checkers get from one place to another.

 By the way, the reason you can't do to a pea in reality what you can do 
 with a mathematical abstraction of a pea is because peas are made of 
 discontinuous atoms.

Not so much discontinuity, as the physical unreality of non-measurable
sets.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-28 Thread greg

Steven D'Aprano wrote:
one 
minute the grenade is sitting there, stable as can be, the next it's an 
expanding cloud of gas and metal fragments.


I'm not sure that counts as discontinuous in the mathematical
sense. If you were to film the grenade exploding and play it
back slowly enough, the process would actually look fairly
smooth.

Mathematically, it's possible for a system to exhibit chaotic
behaviour (so that you can't tell exactly when the grenade is
going to go off) even though all the equations describing its
behaviour are smooth and continuous.


My money is on the universe being fundamentally discontinuous.


That's quite likely true. Quantum mechanics doesn't actually
predict discrete behaviour -- the mathematics deals with
continuously-changing state functions. It's only the interpretation
of those functions (as determining the probabilities of finding
the system in one of a discrete set of states) that introduces
discontinuities.

So it seems quite plausible that the continuous functions are
just approximations of some underlying discrete process.

The trick will be figuring out how such a process can work
without running afoul of the various theorems concerning the
non-existince of hidden variable theories...

--
Greg
--
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-28 Thread greg

Paul Rubin wrote:

Steven D'Aprano st...@remove-this-cybersource.com.au writes:

But that depends on what you call things... if electron shells are real 
(and they seem to be) and discontinuous, and the shells are predicted/
specified by eigenvalues of some continuous function, is the continuous 
function part of nature or just a theoretical abstraction?


Another thing to think about: If you put the atom in a
magnetic field, the energy levels of the electrons get
shifted slightly. To the extent that you can vary the
magnetic field continuously, you can continuously
adjust the energy levels.

This of course raises the question of whether it's
really possible to continuously adjust a magnetic field.
But it's at least possible to do so with much finer
granularity than the differences between energy levels
in an atom.

So if there is a fundamentally discrete model
underlying everything, it must be at a much finer
granularity than anything we've so far observed, and
the discrete things that we have observed probably
aren't direct reflections of it.

--
Greg
--
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-28 Thread Terry Reedy

greg wrote:

Steven D'Aprano wrote:
one minute the grenade is sitting there, stable as can be, the next 
it's an expanding cloud of gas and metal fragments.


I'm not sure that counts as discontinuous in the mathematical
sense. If you were to film the grenade exploding and play it
back slowly enough, the process would actually look fairly
smooth.


radioactive emission might be a better example then.
I do not believe there is any acceleration like you see with grenade 
fragments.  Certainly, none with em radiation. Nothingemission at 
light speed.


--
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-27 Thread Paul Rubin
Robin Becker ro...@reportlab.com writes:
  There is a philosophy of mathematics (intuitionism) that says...
  there are NO discontinuous functions.

 so does this render all the discreteness implied by quantum theory
 unreliable? or is it that we just cannot see(measure) the continuity
 that really happens? 

I think the latter.  Quantum theory anyway describes continuous operators
that have discrete eigenvalues, not the same thing as discontinuous
functions.  
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-25 Thread Robin Becker

pdpi wrote:
...


But yeah, Log2 and LogE are the only two bases that make natural
sense except in specialized contexts. Base 10 (and, therefore, Log10)
is an artifact of having that 10 fingers (in fact, whatever base you
use, you always refer to it as base 10).


someone once explained to me that the set of systems that are continuous in the 
calculus sense was of measure zero in the set of all systems I think it was a 
fairly formal discussion, but my understanding was of the hand waving sort.


If true that makes calculus (and hence all of our understanding of such 
natural concepts) pretty small and perhaps non-applicable.


On the other hand R Kalman (of Bucy and Kalman filter fame) likened study of 
continuous linear dynamical systems to a man searching for a lost ring under 
the only light in a dark street ie we search where we can see. Because such 
systems are tractable doesn't make them natural or essential or applicable in a 
generic sense.

--
Robin Becker

--
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-25 Thread Paul Rubin
Robin Becker ro...@reportlab.com writes:
 someone once explained to me that the set of systems that are
 continuous in the calculus sense was of measure zero in the set of all
 systems I think it was a fairly formal discussion, but my
 understanding was of the hand waving sort.

That is very straightforward if you don't mind a handwave.  Let S be
some arbitrary subset of the reals, and let f(x)=0 if x is in S, and 1
otherwise (this is a discontinuous function if S is nonempty).  How
many different such f's can there be?  Obviously one for every
possible subset of the reals.  The cardinality of such f's is the
power set of the reals, i.e. much larger than the set of reals.

On the other hand, let g be some arbitrary continuous function on the
reals.  Let H be the image of Q (the set of rationals) under g.  That
is, H = {g(x) such that x is rational}.  Since g is continuous, it is
completely determined by H, which is a countable set.  So the
cardinality is RxN which is the same as the cardinality of R.  


 If true that makes calculus (and hence all of our understanding of
 such natural concepts) pretty small and perhaps non-applicable.

No really, it is just set theory, which is a pretty bogus subject in
some sense.  There aren't many discontinuous functions in nature.
There is a philosophy of mathematics (intuitionism) that says
classical set theory is wrong and in fact there are NO discontinuous
functions.  They have their own mathematical axioms which allow
developing calculus in a way that all functions are continuous.

 On the other hand R Kalman (of Bucy and Kalman filter fame) likened
 study of continuous linear dynamical systems to a man searching for
 a lost ring under the only light in a dark street ie we search
 where we can see. Because such systems are tractable doesn't make
 them natural or essential or applicable in a generic sense.

Really, I think the alternative he was thinking of may have been
something like nonlinear PDE's, a horribly messy subject from a
practical point of view, but still basically free of set-theoretic
monstrosities.  The Banach-Tarski paradox has nothing to do with nature.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-25 Thread Robin Becker

Paul Rubin wrote:
.

That is very straightforward if you don't mind a handwave.  Let S be
some arbitrary subset of the reals, and let f(x)=0 if x is in S, and 1
otherwise (this is a discontinuous function if S is nonempty).  How
many different such f's can there be?  Obviously one for every
possible subset of the reals.  The cardinality of such f's is the
power set of the reals, i.e. much larger than the set of reals.

On the other hand, let g be some arbitrary continuous function on the
reals.  Let H be the image of Q (the set of rationals) under g.  That
is, H = {g(x) such that x is rational}.  Since g is continuous, it is
completely determined by H, which is a countable set.  So the
cardinality is RxN which is the same as the cardinality of R.  



ok so probably true then



If true that makes calculus (and hence all of our understanding of
such natural concepts) pretty small and perhaps non-applicable.


No really, it is just set theory, which is a pretty bogus subject in
some sense.  There aren't many discontinuous functions in nature.
There is a philosophy of mathematics (intuitionism) that says
classical set theory is wrong and in fact there are NO discontinuous
functions.  They have their own mathematical axioms which allow
developing calculus in a way that all functions are continuous.



so does this render all the discreteness implied by quantum theory unreliable? 
or is it that we just cannot see(measure) the continuity that really happens? 
Certainly there are people like Wolfram who seem to think we're in some kind of 
giant calculating engine where state transitions are discontinuous.




On the other hand R Kalman (of Bucy and Kalman filter fame) likened
study of continuous linear dynamical systems to a man searching for
a lost ring under the only light in a dark street ie we search
where we can see. Because such systems are tractable doesn't make
them natural or essential or applicable in a generic sense.


Really, I think the alternative he was thinking of may have been
something like nonlinear PDE's, a horribly messy subject from a
practical point of view, but still basically free of set-theoretic
monstrosities.  The Banach-Tarski paradox has nothing to do with nature.


My memory of his seminar was that he was concerned about our failure to model 
even the simplest of systems with non-linearity and/or discreteness. I seem to 
recall that was about the time that chaotic behaviours were starting to appear 
in the control literature and they certainly depend on non-linearity.

--
Robin Becker

--
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-25 Thread pdpi
On Jun 25, 12:23 pm, Robin Becker ro...@reportlab.com wrote:
 Paul Rubin wrote:

 so does this render all the discreteness implied by quantum theory unreliable?
 or is it that we just cannot see(measure) the continuity that really happens?
 Certainly there are people like Wolfram who seem to think we're in some kind 
 of
 giant calculating engine where state transitions are discontinuous.

More like that axiomatic system doesn't accurately map to reality as
we currently understand it.

Your posts made me think that I wasn't clear in saying e and 2 are the
only natural bases for logs.

The log function, as the inverse of the exponential, is a pretty
fundamental function.

The base e exponential has a load of very natural properties, f'(x) = f
(x) being an example.

As the smallest admissible integer base, log 2 is also a pretty
natural notion, especially in computer science, or in general all that
follow from binary true/false systems.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-25 Thread pdpi
On Jun 25, 10:38 am, Paul Rubin http://phr...@nospam.invalid wrote:
 Robin Becker ro...@reportlab.com writes:
  someone once explained to me that the set of systems that are
  continuous in the calculus sense was of measure zero in the set of all
  systems I think it was a fairly formal discussion, but my
  understanding was of the hand waving sort.

 That is very straightforward if you don't mind a handwave.  Let S be
 some arbitrary subset of the reals, and let f(x)=0 if x is in S, and 1
 otherwise (this is a discontinuous function if S is nonempty).  How
 many different such f's can there be?  Obviously one for every
 possible subset of the reals.  The cardinality of such f's is the
 power set of the reals, i.e. much larger than the set of reals.

 On the other hand, let g be some arbitrary continuous function on the
 reals.  Let H be the image of Q (the set of rationals) under g.  That
 is, H = {g(x) such that x is rational}.  Since g is continuous, it is
 completely determined by H, which is a countable set.  So the
 cardinality is RxN which is the same as the cardinality of R.  

  If true that makes calculus (and hence all of our understanding of
  such natural concepts) pretty small and perhaps non-applicable.

 No really, it is just set theory, which is a pretty bogus subject in
 some sense.  There aren't many discontinuous functions in nature.
 There is a philosophy of mathematics (intuitionism) that says
 classical set theory is wrong and in fact there are NO discontinuous
 functions.  They have their own mathematical axioms which allow
 developing calculus in a way that all functions are continuous.

  On the other hand R Kalman (of Bucy and Kalman filter fame) likened
  study of continuous linear dynamical systems to a man searching for
  a lost ring under the only light in a dark street ie we search
  where we can see. Because such systems are tractable doesn't make
  them natural or essential or applicable in a generic sense.

 Really, I think the alternative he was thinking of may have been
 something like nonlinear PDE's, a horribly messy subject from a
 practical point of view, but still basically free of set-theoretic
 monstrosities.  The Banach-Tarski paradox has nothing to do with nature.

I'll take the Banach-Tarski construct (it's not a paradox, damn it!)
over non-linear PDEs any day of the week, thankyouverymuch. :)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-24 Thread Mark Dickinson
On Jun 24, 10:12 am, pdpi pdpinhe...@gmail.com wrote:
 Regarding inf ** 0, why does IEEE745 define it as 1, when there is a
 perfectly fine NaN value?

Have a look at:

http://www.eecs.berkeley.edu/~wkahan/ieee754status/ieee754.ps

(see particularly page 9).

Mark
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-24 Thread Steven D'Aprano
On Mon, 22 Jun 2009 13:43:19 -0500, David C. Ullrich wrote:

 In my universe the standard definition of log is different froim what
 log means in a calculus class

Now I'm curious what the difference is.


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-24 Thread Mark Dickinson
On Jun 24, 10:12 am, pdpi pdpinhe...@gmail.com wrote:
 Regarding inf ** 0, why does IEEE745 define it as 1, when there is a
 perfectly fine NaN value?

Other links:  the IEEE 754 revision working group mailing list
archives are public;  there was extensive discussion about
special values of pow and similar functions.  Here's a relevant
Google search:

http://www.google.com/search?q=site:grouper.ieee.org++pow+annex+D

The C99 rationale document has some explanations for the
choices for special values in Annex F.  Look at pages 179--182
in:

http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf

Note that the original IEEE 754-1985 didn't give specifications
for pow and other transcendental functions;  so a complete
specification for pow appeared in the C99 standard before it
appeared in the current IEEE standard, IEEE 754-2008.  Thus
C99 Annex F probably had at least some small influence on the
choices made for IEEE 754-2008 (and in turn, IEEE 754-1985
heavily influenced C99 Annex F).

My own take on all this, briefly:

 - floating-point numbers are not real numbers, so mathematics
   can only take you so far in deciding what the 'right' values
   are for special cases;  pragmatics has to play a role too.

 - there's general consensus in the numerical and mathematical
   community that it's useful to define pow(0.0, 0.0) to be 1.

 - once you've decided to define pow(0.0, 0.0) to be 1.0, it's
   easy to justify taking pow(inf, 0.0) to be 1.0:  the same
   limiting arguments can be used as justification;  or one can
   use reflection formulae like pow(1/x, y) = 1/pow(x, y), or...

 - one piece of general philosophy used for C99 and IEEE 754
   seems to have been that NaN results should be avoided
   when it's possible to give a meaningful non-nan value instead.

 - part of the reason that pow is particularly controversial
   is that it's really trying to be two different functions
   at once:  it's trying to be both a generalization of the
   `analytic' power function x**y = exp(y*log(x)), for
   real y and positive real x, and in this context one can
   make a good argument that 0**0 should be undefined; but
   at the same time it's also used in contexts where y is
   naturally thought of as an integer; and in the latter
   context bad things happen if you don't define pow(0, 0)
   to be 1.

I really should get back to work now.

Mark
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-24 Thread Hendrik van Rooyen
Steven D'Aprano ste...@remove.this.c...com.au wrote:


On Mon, 22 Jun 2009 13:43:19 -0500, David C. Ullrich wrote:

 In my universe the standard definition of log is different froim what
 log means in a calculus class

Now I'm curious what the difference is.


Maybe he is a lumberjack, and quite all right...

- Hendrik



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-24 Thread pdpi
On Jun 24, 2:58 pm, Hendrik van Rooyen m...@microcorp.co.za wrote:
 Steven D'Aprano ste...@remove.this.c...com.au wrote:
 On Mon, 22 Jun 2009 13:43:19 -0500, David C. Ullrich wrote:

  In my universe the standard definition of log is different froim what
  log means in a calculus class

 Now I'm curious what the difference is.

 Maybe he is a lumberjack, and quite all right...

 - Hendrik

Or perhaps he works in a sewage facility.

But yeah, Log2 and LogE are the only two bases that make natural
sense except in specialized contexts. Base 10 (and, therefore, Log10)
is an artifact of having that 10 fingers (in fact, whatever base you
use, you always refer to it as base 10).
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-24 Thread pdpi
On Jun 24, 1:32 pm, Mark Dickinson dicki...@gmail.com wrote:
 On Jun 24, 10:12 am, pdpi pdpinhe...@gmail.com wrote:

  Regarding inf ** 0, why does IEEE745 define it as 1, when there is a
  perfectly fine NaN value?

 Other links:  the IEEE 754 revision working group mailing list
 archives are public;  there was extensive discussion about
 special values of pow and similar functions.  Here's a relevant
 Google search:

 http://www.google.com/search?q=site:grouper.ieee.org++pow+annex+D

 The C99 rationale document has some explanations for the
 choices for special values in Annex F.  Look at pages 179--182
 in:

 http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf

 Note that the original IEEE 754-1985 didn't give specifications
 for pow and other transcendental functions;  so a complete
 specification for pow appeared in the C99 standard before it
 appeared in the current IEEE standard, IEEE 754-2008.  Thus
 C99 Annex F probably had at least some small influence on the
 choices made for IEEE 754-2008 (and in turn, IEEE 754-1985
 heavily influenced C99 Annex F).

 My own take on all this, briefly:

  - floating-point numbers are not real numbers, so mathematics
    can only take you so far in deciding what the 'right' values
    are for special cases;  pragmatics has to play a role too.

  - there's general consensus in the numerical and mathematical
    community that it's useful to define pow(0.0, 0.0) to be 1.

  - once you've decided to define pow(0.0, 0.0) to be 1.0, it's
    easy to justify taking pow(inf, 0.0) to be 1.0:  the same
    limiting arguments can be used as justification;  or one can
    use reflection formulae like pow(1/x, y) = 1/pow(x, y), or...

  - one piece of general philosophy used for C99 and IEEE 754
    seems to have been that NaN results should be avoided
    when it's possible to give a meaningful non-nan value instead.

  - part of the reason that pow is particularly controversial
    is that it's really trying to be two different functions
    at once:  it's trying to be both a generalization of the
    `analytic' power function x**y = exp(y*log(x)), for
    real y and positive real x, and in this context one can
    make a good argument that 0**0 should be undefined; but
    at the same time it's also used in contexts where y is
    naturally thought of as an integer; and in the latter
    context bad things happen if you don't define pow(0, 0)
    to be 1.

 I really should get back to work now.

 Mark

Thanks for the engrossing read (and damn you for making me waste
valuable work hours). After perusing both C99 and the previous
presentation on IEEE754, I find myself unconvinced regarding the
special cases. It just stinks of bug-proneness, and I fail to see how
assuming common values for exceptional cases relieves you from testing
for those special cases and getting them behaving right (in an
application-specific way) just the same.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-23 Thread Mark Dickinson
On Jun 23, 3:52 am, Steven D'Aprano
ste...@remove.this.cybersource.com.au wrote:
 On Mon, 22 Jun 2009 13:43:19 -0500, David C. Ullrich wrote:
  In my universe the standard definition of log is different froim what
  log means in a calculus class

 Now I'm curious what the difference is.

It's just the usual argument about whether 'log' means
log base 10 or log base e (natural log).  At least in the
US, most[*] calculus texts (and also most calculators),
for reasons best known to themselves, use 'ln' to mean
natural log and 'log' to mean log base 10.  But most
mathematicians use 'log' to mean natural log:  pick up a
random pure mathematics research paper that has the word
'log' in it, and unless it's otherwise qualified, it's
safe to assume that it means log base e.  (Except in the
context of algorithmic complexity, where it might well
mean log base 2 instead...)

Python also suffers a bit from this confusion:  the
Decimal class defines methods 'ln' and 'log10', while
the math module and cmath modules define 'log' and
'log10'.  (But the Decimal module has other problems,
like claiming that 0**0 is undefined while
infinity**0 is 1.)

[*] A notable exception is Michael Spivak's 'Calculus', which also
happens to be the book I learnt calculus from many years ago.

Mark
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-23 Thread Lie Ryan
Mark Dickinson wrote:
 On Jun 23, 3:52 am, Steven D'Aprano
 ste...@remove.this.cybersource.com.au wrote:
 On Mon, 22 Jun 2009 13:43:19 -0500, David C. Ullrich wrote:
 In my universe the standard definition of log is different froim what
 log means in a calculus class
 Now I'm curious what the difference is.
 
 It's just the usual argument about whether 'log' means
 log base 10 or log base e (natural log).  At least in the
 US, most[*] calculus texts (and also most calculators),
 for reasons best known to themselves, use 'ln' to mean
 natural log and 'log' to mean log base 10.  But most
 mathematicians use 'log' to mean natural log:  pick up a
 random pure mathematics research paper that has the word
 'log' in it, and unless it's otherwise qualified, it's
 safe to assume that it means log base e.  (Except in the
 context of algorithmic complexity, where it might well
 mean log base 2 instead...)

I usually use log without explicit base only when the base isn't
relevant in the context (i.e. when whatever sane base you put in it
wouldn't really affect the operations). In algorithmic complexity, a
logarithm's base doesn't affect the growth shape and, like constant
multiplier, is considered irrelevant to the complexity.

 Python also suffers a bit from this confusion:  the
 Decimal class defines methods 'ln' and 'log10', while
 the math module and cmath modules define 'log' and
 'log10'.  

In fact, in the Decimal class there is no log to an arbitrary base.

 (But the Decimal module has other problems,
 like claiming that 0**0 is undefined while
 infinity**0 is 1.)

Well, in math inf**0 is undefined. Since python is programming language,
and in language standards it is well accepted that undefined behavior
means implementations can do anything they like including returning 0,
1, 42, or even spitting errors, that doesn't make python non-conforming
implementation.

A more serious argument: in IEEE 745 float, inf**0 is 1. Mathematic
operation in python is mostly a wrapper for the underlying C library's
sense of math.

 [*] A notable exception is Michael Spivak's 'Calculus', which also
 happens to be the book I learnt calculus from many years ago.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-23 Thread Aahz
In article b64766a2-fd6f-4aa9-945f-381c0692b...@w40g2000yqd.googlegroups.com,
Mark Dickinson  dicki...@gmail.com wrote:
On Jun 22, 7:43=A0pm, David C. Ullrich ullr...@math.okstate.edu wrote:

 Surely you don't say a curve is a subset of the plane and
 also talk about the integrals of verctor fields over _curves_?
 [snip rest of long response that needs a decent reply, but
  possibly not here... ]

I wonder whether we can find a better place to have this discussion; I
think there are still plenty of interesting things to say, but I fear
we're rather abusing the hospitality of comp.lang.python at the moment.

As long as it's confined to this thread, I certainly have no objection;
right now, this thread is occupying only a small fractin of c.l.py
bandwidth.
-- 
Aahz (a...@pythoncraft.com)   * http://www.pythoncraft.com/

as long as we like the same operating system, things are cool. --piranha
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-22 Thread pdpi
On Jun 19, 8:13 pm, Charles Yeomans char...@declaresub.com wrote:
 On Jun 19, 2009, at 2:43 PM, David C. Ullrich wrote:





  Evidently my posts are appearing, since I see replies.
  I guess the question of why I don't see the posts themselves
  \is ot here...

  On Thu, 18 Jun 2009 17:01:12 -0700 (PDT), Mark Dickinson
  dicki...@gmail.com wrote:

  On Jun 18, 7:26 pm, David C. Ullrich ullr...@math.okstate.edu  
  wrote:
  On Wed, 17 Jun 2009 08:18:52 -0700 (PDT), Mark Dickinson
  Right.  Or rather, you treat it as the image of such a function,
  if you're being careful to distinguish the curve (a subset
  of R^2) from its parametrization (a continuous function
  R - R**2).  It's the parametrization that's uniformly
  continuous, not the curve,

  Again, it doesn't really matter, but since you use the phrase
  if you're being careful: In fact what you say is exactly
  backwards - if you're being careful that subset of the plane
  is _not_ a curve (it's sometimes called the trace of the curve.

  Darn.  So I've been getting it wrong all this time.  Oh well,
  at least I'm not alone:

  De?nition 1. A simple closed curve J, also called a
  Jordan curve, is the image of a continuous one-to-one
  function from R/Z to R2. [...]

  - Tom Hales, in 'Jordan's Proof of the Jordan Curve Theorem'.

  We say that Gamma is a curve if it is the image in
  the plane or in space of an interval [a, b] of real
  numbers of a continuous function gamma.

  - Claude Tricot, 'Curves and Fractal Dimension' (Springer, 1995).

  Perhaps your definition of curve isn't as universal or
  'official' as you seem to think it is?

  Perhaps not. I'm very surprised to see those definitions; I've
  been a mathematician for 25 years and I've never seen a
  curve defined a subset of the plane.

 I have.







  Hmm. You left out a bit in the first definition you cite:

  A simple closed curve J, also called a Jordan curve, is the image
  of a continuous one-to-one function from R/Z to R2. We assume that
  each curve
  comes with a fixed parametrization phi_J : R/Z -¨ J. We call t in R/Z
  the time
  parameter. By abuse of notation, we write J(t) in R2 instead of phi_j
  (t), using the
  same notation for the function phi_J and its image J.

  Close to sounding like he can't decide whether J is a set or a
  function...

 On the contrary, I find this definition to be written with some care.

I find the usage of image slightly ambiguous (as it suggests the image
set defines the curve), but that's my only qualm with it as well.

Thinking pragmatically, you can't have non-simple curves unless you
use multisets, and you also completely lose the notion of curve
orientation and even continuity without making it a poset. At this
point in time, parsimony says that you want to ditch your multiposet
thingie (and God knows what else you want to tack in there to preserve
other interesting curve properties) and really just want to define the
curve as a freaking function and be done with it.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-22 Thread Charles Yeomans


On Jun 22, 2009, at 8:46 AM, pdpi wrote:


On Jun 19, 8:13 pm, Charles Yeomans char...@declaresub.com wrote:

On Jun 19, 2009, at 2:43 PM, David C. Ullrich wrote:


snick




Hmm. You left out a bit in the first definition you cite:



A simple closed curve J, also called a Jordan curve, is the image
of a continuous one-to-one function from R/Z to R2. We assume that
each curve
comes with a fixed parametrization phi_J : R/Z -¨ J. We call t in  
R/Z

the time
parameter. By abuse of notation, we write J(t) in R2 instead of  
phi_j

(t), using the
same notation for the function phi_J and its image J.



Close to sounding like he can't decide whether J is a set or a
function...


On the contrary, I find this definition to be written with some care.


I find the usage of image slightly ambiguous (as it suggests the image
set defines the curve), but that's my only qualm with it as well.

Thinking pragmatically, you can't have non-simple curves unless you
use multisets, and you also completely lose the notion of curve
orientation and even continuity without making it a poset. At this
point in time, parsimony says that you want to ditch your multiposet
thingie (and God knows what else you want to tack in there to preserve
other interesting curve properties) and really just want to define the
curve as a freaking function and be done with it.
--



But certainly the image set does define the curve, if you want to view  
it that way -- all parameterizations of a curve should satisfy the  
same equation f(x, y) = 0.


Charles Yeomans
--
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-22 Thread David C . Ullrich
On Mon, 22 Jun 2009 05:46:55 -0700 (PDT), pdpi pdpinhe...@gmail.com
wrote:

On Jun 19, 8:13 pm, Charles Yeomans char...@declaresub.com wrote:
 On Jun 19, 2009, at 2:43 PM, David C. Ullrich wrote:





  Evidently my posts are appearing, since I see replies.
  I guess the question of why I don't see the posts themselves
  \is ot here...

  On Thu, 18 Jun 2009 17:01:12 -0700 (PDT), Mark Dickinson
  dicki...@gmail.com wrote:

  On Jun 18, 7:26 pm, David C. Ullrich ullr...@math.okstate.edu  
  wrote:
  On Wed, 17 Jun 2009 08:18:52 -0700 (PDT), Mark Dickinson
  Right.  Or rather, you treat it as the image of such a function,
  if you're being careful to distinguish the curve (a subset
  of R^2) from its parametrization (a continuous function
  R - R**2).  It's the parametrization that's uniformly
  continuous, not the curve,

  Again, it doesn't really matter, but since you use the phrase
  if you're being careful: In fact what you say is exactly
  backwards - if you're being careful that subset of the plane
  is _not_ a curve (it's sometimes called the trace of the curve.

  Darn.  So I've been getting it wrong all this time.  Oh well,
  at least I'm not alone:

  De?nition 1. A simple closed curve J, also called a
  Jordan curve, is the image of a continuous one-to-one
  function from R/Z to R2. [...]

  - Tom Hales, in 'Jordan's Proof of the Jordan Curve Theorem'.

  We say that Gamma is a curve if it is the image in
  the plane or in space of an interval [a, b] of real
  numbers of a continuous function gamma.

  - Claude Tricot, 'Curves and Fractal Dimension' (Springer, 1995).

  Perhaps your definition of curve isn't as universal or
  'official' as you seem to think it is?

  Perhaps not. I'm very surprised to see those definitions; I've
  been a mathematician for 25 years and I've never seen a
  curve defined a subset of the plane.

 I have.







  Hmm. You left out a bit in the first definition you cite:

  A simple closed curve J, also called a Jordan curve, is the image
  of a continuous one-to-one function from R/Z to R2. We assume that
  each curve
  comes with a fixed parametrization phi_J : R/Z -¨ J. We call t in R/Z
  the time
  parameter. By abuse of notation, we write J(t) in R2 instead of phi_j
  (t), using the
  same notation for the function phi_J and its image J.

  Close to sounding like he can't decide whether J is a set or a
  function...

 On the contrary, I find this definition to be written with some care.

I find the usage of image slightly ambiguous (as it suggests the image
set defines the curve), but that's my only qualm with it as well.

Thinking pragmatically, you can't have non-simple curves unless you
use multisets, and you also completely lose the notion of curve
orientation and even continuity without making it a poset. At this
point in time, parsimony says that you want to ditch your multiposet
thingie (and God knows what else you want to tack in there to preserve
other interesting curve properties) and really just want to define the
curve as a freaking function and be done with it.

Precisely.


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-22 Thread David C . Ullrich
On Mon, 22 Jun 2009 10:31:26 -0400, Charles Yeomans
char...@declaresub.com wrote:


On Jun 22, 2009, at 8:46 AM, pdpi wrote:

 On Jun 19, 8:13 pm, Charles Yeomans char...@declaresub.com wrote:
 On Jun 19, 2009, at 2:43 PM, David C. Ullrich wrote:


 snick



 Hmm. You left out a bit in the first definition you cite:

 A simple closed curve J, also called a Jordan curve, is the image
 of a continuous one-to-one function from R/Z to R2. We assume that
 each curve
 comes with a fixed parametrization phi_J : R/Z -¨ J. We call t in  
 R/Z
 the time
 parameter. By abuse of notation, we write J(t) in R2 instead of  
 phi_j
 (t), using the
 same notation for the function phi_J and its image J.

 Close to sounding like he can't decide whether J is a set or a
 function...

 On the contrary, I find this definition to be written with some care.

 I find the usage of image slightly ambiguous (as it suggests the image
 set defines the curve), but that's my only qualm with it as well.

 Thinking pragmatically, you can't have non-simple curves unless you
 use multisets, and you also completely lose the notion of curve
 orientation and even continuity without making it a poset. At this
 point in time, parsimony says that you want to ditch your multiposet
 thingie (and God knows what else you want to tack in there to preserve
 other interesting curve properties) and really just want to define the
 curve as a freaking function and be done with it.
 -- 


But certainly the image set does define the curve, if you want to view  
it that way -- all parameterizations of a curve should satisfy the  
same equation f(x, y) = 0.

This sounds like you didn't read his post, or totally missed the
point.

Say S is the set of (x,y) in the plane such that x^2 + y^2 = 1.
What's the index, or winding number, of that curve about the
origin?

(Hint: The curve c defined by c(t) = (cos(t), sin(t)) for
0 = t = 2pi has index 1 about the origin. The curve
d(t) = (cos(-t), sin(-t)) (0 = t = 2pi) has index -1.
The curve (cos(2t), sin(2t)) (same t) has index 2.)

Charles Yeomans

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-22 Thread David C . Ullrich
On Fri, 19 Jun 2009 12:40:36 -0700 (PDT), Mark Dickinson
dicki...@gmail.com wrote:

On Jun 19, 7:43 pm, David C. Ullrich ullr...@math.okstate.edu wrote:
 Evidently my posts are appearing, since I see replies.
 I guess the question of why I don't see the posts themselves
 \is ot here...

Judging by this thread, I'm not sure that much is off-topic
here.  :-)

 Perhaps not. I'm very surprised to see those definitions; I've
 been a mathematician for 25 years and I've never seen a
 curve defined a subset of the plane.

That in turn surprises me.  I've taught multivariable
calculus courses from at least three different texts
in three different US universities, and as far as I
recall a 'curve' was always thought of as a subset of
R^2 or R^3 in those courses (though not always with
explicit definitions, since that would be too much
to hope for with that sort of text).  Here's Stewart's
'Calculus', p658:

Examples 2 and 3 show that different sets of parametric
equations can represent the same curve.  Thus we
distinguish between a *curve*, which is a set of points,
and a *parametric curve*, in which the points are
traced in a particular way.

Again as far as I remember, the rest of the language
in those courses (e.g., 'level curve', 'curve as the
intersection of two surfaces') involves thinking
of curves as subsets of R^2 or R^3.  Certainly
I'll agree that it's then necessary to parameterize
the curve before being able to do anything useful
with it.

[Standard question when teaching multivariable
calculus:  Okay, so we've got a curve.  What's
the first thing we do with it?  Answer, shouted
out from all the (awake) students: PARAMETERIZE IT!
(And then calculate its length/integrate the
given vector field along it/etc.)
Those were the days...]

Surely you don't say a curve is a subset of the plane and
also talk about the integrals of verctor fields over _curves_?

This is getting close to the point someone else made,
before I had a chance to: We need a parametriztion of
that subset of the plane before we can do most interesting
things with it. The parametrization determines the set,
but the set does not determine the parametrization
(not even up to some sort of isomorphism; the
set does not determine multiplicity, orientation, etc.)

So if the definition of curve is not as I claim then
in some sense it _should_ be. 

Hales defines a curve to be a set C and then says he assumes
that there is a parametrization phi_C. Does  he ever talk
about things like the orientation of a curve a about a point?
Seems likely. If so then his use of the word curve is
simply not consistent with his definition.

A Google Books search even turned up some complex
analysis texts where the word 'curve' is used to
mean a subset of the plane;  check out
the book by Ian Stewart and David Orme Tall,
'Complex Analysis: a Hitchhiker's Guide to the
Plane':  they distinguish 'curves' (subset of the
complex plane) from 'paths' (functions from a
closed bounded interval to the complex plane).

Hmm. I of all people am in no position to judge a  book
on complex analysis by the silliness if its title...

 Definition 2. A polygon is a Jordan curve that is a subset of a
 finite union of
 lines. A polygonal path is a continuous function P : [0, 1] -¨ R2
 that is a subset of
 a finite union of lines. It is a polygonal arc, if it is 1 . 1.

 By that definition a polygonal path is not a curve.

Right.  I'm much more willing to accept 'path' as standard
terminology for a function [a, b] - (insert_favourite_space_here).

 Not that it matters, but his defintion of polygonal path
 is, _if_ we're being very careful, self-contradictory.

Agreed.  Surprising, coming from Hales; he must surely rank
amongst the more careful mathematicians out there.

 So I don't think we can count that paper as a suitable
 reference for what the _standard_ definitions are;
 the standard definitions are not self-contradictory this way.

I just don't believe there's any such thing as
'the standard definition' of a curve.  I'm happy
to believe that in complex analysis and differential
geometry it's common to define a curve to be a
function.  But in general I'd suggest that it's one
of those terms that largely depends on context, and
should be defined clearly when it's not totally
obvious from the context which definition is
intended.  For example, for me, more often than not,
a curve is a 1-dimensional scheme over a field k
(usually *not* algebraically closed), that's at
least some of {geometrically reduced, geometrically
irreducible, proper, smooth}.  That's a far cry either
from a subset of an affine space or from a
parametrization by an interval.

Ok. 

 Then the second definition you cite: Amazon says the
 prerequisites are two years of calculus. The stanard
 meaning of log is log base e, even though means
 log base 10 in calculus.

Sorry, I've lost context for this comment.  Why
are logs relevant?  (I'm very well aware of the
debates over the meaning of log, having frequently
had to 

Re: Measuring Fractal Dimension ?

2009-06-22 Thread Mark Dickinson
On Jun 22, 7:43 pm, David C. Ullrich ullr...@math.okstate.edu wrote:

 Surely you don't say a curve is a subset of the plane and
 also talk about the integrals of verctor fields over _curves_?
 [snip rest of long response that needs a decent reply, but
  possibly not here... ]

I wonder whether we can find a better place to have this
discussion;  I think there are still plenty of interesting
things to say, but I fear we're rather abusing the hospitality
of comp.lang.python at the moment.

I'd suggest moving it to sci.math, except that I've seen the
noise/signal ratio over there...

Mark
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-22 Thread Charles Yeomans


On Jun 22, 2009, at 2:16 PM, David C. Ullrich wrote:


On Mon, 22 Jun 2009 10:31:26 -0400, Charles Yeomans
char...@declaresub.com wrote:



On Jun 22, 2009, at 8:46 AM, pdpi wrote:


On Jun 19, 8:13 pm, Charles Yeomans char...@declaresub.com wrote:

On Jun 19, 2009, at 2:43 PM, David C. Ullrich wrote:


snick




Hmm. You left out a bit in the first definition you cite:



A simple closed curve J, also called a Jordan curve, is the image
of a continuous one-to-one function from R/Z to R2. We assume that
each curve
comes with a fixed parametrization phi_J : R/Z -¨ J. We call t in
R/Z
the time
parameter. By abuse of notation, we write J(t) in R2 instead of
phi_j
(t), using the
same notation for the function phi_J and its image J.



Close to sounding like he can't decide whether J is a set or a
function...


On the contrary, I find this definition to be written with some  
care.


I find the usage of image slightly ambiguous (as it suggests the  
image

set defines the curve), but that's my only qualm with it as well.

Thinking pragmatically, you can't have non-simple curves unless you
use multisets, and you also completely lose the notion of curve
orientation and even continuity without making it a poset. At this
point in time, parsimony says that you want to ditch your multiposet
thingie (and God knows what else you want to tack in there to  
preserve
other interesting curve properties) and really just want to define  
the

curve as a freaking function and be done with it.
--



But certainly the image set does define the curve, if you want to  
view

it that way -- all parameterizations of a curve should satisfy the
same equation f(x, y) = 0.


This sounds like you didn't read his post, or totally missed the
point.

Say S is the set of (x,y) in the plane such that x^2 + y^2 = 1.
What's the index, or winding number, of that curve about the
origin?

(Hint: The curve c defined by c(t) = (cos(t), sin(t)) for
0 = t = 2pi has index 1 about the origin. The curve
d(t) = (cos(-t), sin(-t)) (0 = t = 2pi) has index -1.
The curve (cos(2t), sin(2t)) (same t) has index 2.)



That is to say, the winding number is a property of both the curve  
and a parameterization of it.  Or, in other words, the winding number  
is a property of a function from S1 to C.


Charles Yeomans



--
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-19 Thread David C . Ullrich
Evidently my posts are appearing, since I see replies.
I guess the question of why I don't see the posts themselves
\is ot here...

On Thu, 18 Jun 2009 17:01:12 -0700 (PDT), Mark Dickinson
dicki...@gmail.com wrote:

On Jun 18, 7:26 pm, David C. Ullrich ullr...@math.okstate.edu wrote:
 On Wed, 17 Jun 2009 08:18:52 -0700 (PDT), Mark Dickinson
 Right.  Or rather, you treat it as the image of such a function,
 if you're being careful to distinguish the curve (a subset
 of R^2) from its parametrization (a continuous function
 R - R**2).  It's the parametrization that's uniformly
 continuous, not the curve,

 Again, it doesn't really matter, but since you use the phrase
 if you're being careful: In fact what you say is exactly
 backwards - if you're being careful that subset of the plane
 is _not_ a curve (it's sometimes called the trace of the curve.

Darn.  So I've been getting it wrong all this time.  Oh well,
at least I'm not alone:

De?nition 1. A simple closed curve J, also called a
Jordan curve, is the image of a continuous one-to-one
function from R/Z to R2. [...]

- Tom Hales, in 'Jordan's Proof of the Jordan Curve Theorem'.

We say that Gamma is a curve if it is the image in
the plane or in space of an interval [a, b] of real
numbers of a continuous function gamma.

- Claude Tricot, 'Curves and Fractal Dimension' (Springer, 1995).

Perhaps your definition of curve isn't as universal or
'official' as you seem to think it is?

Perhaps not. I'm very surprised to see those definitions; I've
been a mathematician for 25 years and I've never seen a
curve defined a subset of the plane.

Hmm. You left out a bit in the first definition you cite:

A simple closed curve J, also called a Jordan curve, is the image
of a continuous one-to-one function from R/Z to R2. We assume that
each curve
comes with a fixed parametrization phi_J : R/Z -¨ J. We call t in R/Z
the time
parameter. By abuse of notation, we write J(t) in R2 instead of phi_j
(t), using the
same notation for the function phi_J and its image J.

Close to sounding like he can't decide whether J is a set or a
function... Then later in the same paper

Definition 2. A polygon is a Jordan curve that is a subset of a
finite union of
lines. A polygonal path is a continuous function P : [0, 1] -¨ R2
that is a subset of
a finite union of lines. It is a polygonal arc, if it is 1 . 1.

By that definition a polygonal path is not a curve.

Worse: A polygonal path is a function from [0,1] to R^2
_that is a subset of a finite union of lines_. There's no
such thing - the _image_ of such a function can be a
subset of a finite union of lines.

Not that it matters, but his defintion of polygonal path
is, _if_ we're being very careful, self-contradictory.
So I don't think we can count that paper as a suitable
reference for what the _standard_ definitions are;
the standard definitions are not self-contradictory this way.

Then the second definition you cite: Amazon says the
prerequisites are two years of calculus. The stanard
meaning of log is log base e, even though it means
log base 10 in calculus.

Mark

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-19 Thread Charles Yeomans


On Jun 19, 2009, at 2:43 PM, David C. Ullrich wrote:


Evidently my posts are appearing, since I see replies.
I guess the question of why I don't see the posts themselves
\is ot here...

On Thu, 18 Jun 2009 17:01:12 -0700 (PDT), Mark Dickinson
dicki...@gmail.com wrote:

On Jun 18, 7:26 pm, David C. Ullrich ullr...@math.okstate.edu  
wrote:

On Wed, 17 Jun 2009 08:18:52 -0700 (PDT), Mark Dickinson

Right.  Or rather, you treat it as the image of such a function,
if you're being careful to distinguish the curve (a subset
of R^2) from its parametrization (a continuous function
R - R**2).  It's the parametrization that's uniformly
continuous, not the curve,


Again, it doesn't really matter, but since you use the phrase
if you're being careful: In fact what you say is exactly
backwards - if you're being careful that subset of the plane
is _not_ a curve (it's sometimes called the trace of the curve.


Darn.  So I've been getting it wrong all this time.  Oh well,
at least I'm not alone:

De?nition 1. A simple closed curve J, also called a
Jordan curve, is the image of a continuous one-to-one
function from R/Z to R2. [...]

- Tom Hales, in 'Jordan's Proof of the Jordan Curve Theorem'.

We say that Gamma is a curve if it is the image in
the plane or in space of an interval [a, b] of real
numbers of a continuous function gamma.

- Claude Tricot, 'Curves and Fractal Dimension' (Springer, 1995).

Perhaps your definition of curve isn't as universal or
'official' as you seem to think it is?


Perhaps not. I'm very surprised to see those definitions; I've
been a mathematician for 25 years and I've never seen a
curve defined a subset of the plane.



I have.




Hmm. You left out a bit in the first definition you cite:

A simple closed curve J, also called a Jordan curve, is the image
of a continuous one-to-one function from R/Z to R2. We assume that
each curve
comes with a fixed parametrization phi_J : R/Z -¨ J. We call t in R/Z
the time
parameter. By abuse of notation, we write J(t) in R2 instead of phi_j
(t), using the
same notation for the function phi_J and its image J.


Close to sounding like he can't decide whether J is a set or a
function...


On the contrary, I find this definition to be written with some care.


 Then later in the same paper

Definition 2. A polygon is a Jordan curve that is a subset of a
finite union of
lines. A polygonal path is a continuous function P : [0, 1] -¨ R2
that is a subset of
a finite union of lines. It is a polygonal arc, if it is 1 . 1.



These are a bit too casual for me as well...


By that definition a polygonal path is not a curve.

Worse: A polygonal path is a function from [0,1] to R^2
_that is a subset of a finite union of lines_. There's no
such thing - the _image_ of such a function can be a
subset of a finite union of lines.

Not that it matters, but his defintion of polygonal path
is, _if_ we're being very careful, self-contradictory.
So I don't think we can count that paper as a suitable
reference for what the _standard_ definitions are;
the standard definitions are not self-contradictory this way.



Charles Yeomans
--
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-19 Thread Mark Dickinson
On Jun 19, 7:43 pm, David C. Ullrich ullr...@math.okstate.edu wrote:
 Evidently my posts are appearing, since I see replies.
 I guess the question of why I don't see the posts themselves
 \is ot here...

Judging by this thread, I'm not sure that much is off-topic
here.  :-)

 Perhaps not. I'm very surprised to see those definitions; I've
 been a mathematician for 25 years and I've never seen a
 curve defined a subset of the plane.

That in turn surprises me.  I've taught multivariable
calculus courses from at least three different texts
in three different US universities, and as far as I
recall a 'curve' was always thought of as a subset of
R^2 or R^3 in those courses (though not always with
explicit definitions, since that would be too much
to hope for with that sort of text).  Here's Stewart's
'Calculus', p658:

Examples 2 and 3 show that different sets of parametric
equations can represent the same curve.  Thus we
distinguish between a *curve*, which is a set of points,
and a *parametric curve*, in which the points are
traced in a particular way.

Again as far as I remember, the rest of the language
in those courses (e.g., 'level curve', 'curve as the
intersection of two surfaces') involves thinking
of curves as subsets of R^2 or R^3.  Certainly
I'll agree that it's then necessary to parameterize
the curve before being able to do anything useful
with it.

[Standard question when teaching multivariable
calculus:  Okay, so we've got a curve.  What's
the first thing we do with it?  Answer, shouted
out from all the (awake) students: PARAMETERIZE IT!
(And then calculate its length/integrate the
given vector field along it/etc.)
Those were the days...]

A Google Books search even turned up some complex
analysis texts where the word 'curve' is used to
mean a subset of the plane;  check out
the book by Ian Stewart and David Orme Tall,
'Complex Analysis: a Hitchhiker's Guide to the
Plane':  they distinguish 'curves' (subset of the
complex plane) from 'paths' (functions from a
closed bounded interval to the complex plane).

 Definition 2. A polygon is a Jordan curve that is a subset of a
 finite union of
 lines. A polygonal path is a continuous function P : [0, 1] -¨ R2
 that is a subset of
 a finite union of lines. It is a polygonal arc, if it is 1 . 1.

 By that definition a polygonal path is not a curve.

Right.  I'm much more willing to accept 'path' as standard
terminology for a function [a, b] - (insert_favourite_space_here).

 Not that it matters, but his defintion of polygonal path
 is, _if_ we're being very careful, self-contradictory.

Agreed.  Surprising, coming from Hales; he must surely rank
amongst the more careful mathematicians out there.

 So I don't think we can count that paper as a suitable
 reference for what the _standard_ definitions are;
 the standard definitions are not self-contradictory this way.

I just don't believe there's any such thing as
'the standard definition' of a curve.  I'm happy
to believe that in complex analysis and differential
geometry it's common to define a curve to be a
function.  But in general I'd suggest that it's one
of those terms that largely depends on context, and
should be defined clearly when it's not totally
obvious from the context which definition is
intended.  For example, for me, more often than not,
a curve is a 1-dimensional scheme over a field k
(usually *not* algebraically closed), that's at
least some of {geometrically reduced, geometrically
irreducible, proper, smooth}.  That's a far cry either
from a subset of an affine space or from a
parametrization by an interval.

 Then the second definition you cite: Amazon says the
 prerequisites are two years of calculus. The stanard
 meaning of log is log base e, even though means
 log base 10 in calculus.

Sorry, I've lost context for this comment.  Why
are logs relevant?  (I'm very well aware of the
debates over the meaning of log, having frequently
had to help students 'unlearn' their log=log10
mindset when starting a first post-calculus course).

Mark
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-19 Thread pdpi
On Jun 17, 1:26 pm, Jaime Fernandez del Rio jaime.f...@gmail.com
wrote:
 P.S. The snowflake curve, on the other hand, is uniformly continuous, right?


The definition of uniform continuity is that, for any epsilon  0,
there is a delta  0 such that, for any x and y, if x-y  delta, f(x)-f
(y)  epsilon. Given that Koch's curve is shaped as recursion over the
transformation from ___ to _/\_, it's immediately obvious that, for a
delta of at most the length of , epsilon will be at most the
height of /. It follows that, inversely, for any arbitrary epsilon,
you find the smallest / that's still taller than epsilon, and delta is
bound by the respective . (hooray for ascii demonstrations)

Curiously enough, it's the recursive/self-similar nature of the Koch
curve so easy to prove as uniformly continuous.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-19 Thread Paul Rubin
Mark Dickinson dicki...@gmail.com writes:
 It looks as though you're treating (a portion of?) the Koch curve as
 the graph of a function f from R - R and claiming that f is
 uniformly continuous.  But the Koch curve isn't such a graph (it
 fails the 'vertical line test',

I think you treat it as a function f: R - R**2 with the usual
distance metric on R**2.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-19 Thread David C . Ullrich
On Wed, 17 Jun 2009 05:46:22 -0700 (PDT), Mark Dickinson
dicki...@gmail.com wrote:

On Jun 17, 1:26 pm, Jaime Fernandez del Rio jaime.f...@gmail.com
wrote:
 On Wed, Jun 17, 2009 at 1:52 PM, Mark Dickinsondicki...@gmail.com wrote:
  Maybe James is thinking of the standard theorem
  that says that if a sequence of continuous functions
  on an interval converges uniformly then its limit
  is continuous?

s/James/Jaime.   Apologies.

 P.S. The snowflake curve, on the other hand, is uniformly continuous, right?

Yes, at least in the sense that it can be parametrized
by a uniformly continuous function from [0, 1] to the
Euclidean plane.  I'm not sure that it makes a priori
sense to describe the curve itself (thought of simply
as a subset of the plane) as uniformly continuous.

As long as people are throwing around all this math stuff:
Officially, by definition a curve _is_ a parametrization.
Ie, a curve in the plane _is_ a continuous function from
an interval to the plane, and a subset of the plane is
not a curve.

Officially, anyway.


Mark

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-18 Thread David C . Ullrich
On Wed, 17 Jun 2009 14:50:28 +1200, Lawrence D'Oliveiro
l...@geek-central.gen.new_zealand wrote:

In message 7x63ew3uo9@ruckus.brouhaha.com,  wrote:

 Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes:

 I don't think any countable set, even a countably-infinite set, can have
 a fractal dimension. It's got to be uncountably infinite, and therefore
 uncomputable.
 
 I think the idea is you assume uniform continuity of the set (as
 expressed by a parametrized curve).  That should let you approximate
 the fractal dimension.

Fractals are, by definition, not uniform in that sense.

I won't ask where I can find this definition. That Koch thing is a
closed curve in R^2. That means _by definition_ that it is a
continuous function from [0,1] to R^2 (with the same value
at the endpoints). And any continuous fu

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-18 Thread David C . Ullrich
On Wed, 17 Jun 2009 14:50:28 +1200, Lawrence D'Oliveiro
l...@geek-central.gen.new_zealand wrote:

In message 7x63ew3uo9@ruckus.brouhaha.com,  wrote:

 Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes:

 I don't think any countable set, even a countably-infinite set, can have
 a fractal dimension. It's got to be uncountably infinite, and therefore
 uncomputable.
 
 I think the idea is you assume uniform continuity of the set (as
 expressed by a parametrized curve).  That should let you approximate
 the fractal dimension.

Fractals are, by definition, not uniform in that sense.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-18 Thread David C . Ullrich
On Wed, 17 Jun 2009 14:50:28 +1200, Lawrence D'Oliveiro
l...@geek-central.gen.new_zealand wrote:

In message 7x63ew3uo9@ruckus.brouhaha.com,  wrote:

 Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes:

 I don't think any countable set, even a countably-infinite set, can have
 a fractal dimension. It's got to be uncountably infinite, and therefore
 uncomputable.
 
 I think the idea is you assume uniform continuity of the set (as
 expressed by a parametrized curve).  That should let you approximate
 the fractal dimension.

Fractals are, by definition, not uniform in that sense.

Sorry if I've already posted half of this - having troubles hitting
the toushpad on this little machine by accident.

The fractal in question is a curve in R^2. By definition that
means it is a continuous function from [a,b] to R^2 (with
the same value at the two endpoints). Hence it's
uniformly continuous.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-18 Thread David C . Ullrich
On Wed, 17 Jun 2009 07:35:35 +0200, Jaime Fernandez del Rio
jaime.f...@gmail.com wrote:

On Wed, Jun 17, 2009 at 4:50 AM, Lawrence
D'Oliveirol...@geek-central.gen.new_zealand wrote:
 In message 7x63ew3uo9@ruckus.brouhaha.com,  wrote:

 Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes:

 I don't think any countable set, even a countably-infinite set, can have
 a fractal dimension. It's got to be uncountably infinite, and therefore
 uncomputable.

 I think the idea is you assume uniform continuity of the set (as
 expressed by a parametrized curve).  That should let you approximate
 the fractal dimension.

 Fractals are, by definition, not uniform in that sense.

I had my doubts on this statement being true, so I've gone to my copy
of Gerald Edgar's Measure, Topology and Fractal Geometry and
Proposition 2.4.10 on page 69 states: The sequence (gk), in the
dragon construction of the Koch curve converges uniformly. And
uniform continuity is a very well defined concept, so there really
shouldn't be an interpretation issue here either. Would not stick my
head out for it, but I am pretty sure that a continuous sequence of
curves that converges to a continuous curve, will do so uniformly.

Nope. Not that I see the relvance here - the g_k _do_
converge uniformly.

Jaime

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-18 Thread David C . Ullrich
On Wed, 17 Jun 2009 07:37:32 -0400, Charles Yeomans
char...@declaresub.com wrote:


On Jun 17, 2009, at 2:04 AM, Paul Rubin wrote:

 Jaime Fernandez del Rio jaime.f...@gmail.com writes:
 I am pretty sure that a continuous sequence of
 curves that converges to a continuous curve, will do so uniformly.

 I think a typical example of a curve that's continuous but not
 uniformly continuous is

   f(t) = sin(1/t), defined when t  0

 It is continuous at every t0 but wiggles violently as you get closer
 to t=0.  You wouldn't be able to approximate it by sampling a finite
 number of points.  A sequence like

   g_n(t) = sin((1+1/n)/ t)for n=1,2,...

 obviously converges to f, but not uniformly.  On a closed interval,
 any continuous function is uniformly continuous.

Isn't (-?, ?) closed?

What is your version of the definition of closed?

Charles Yeomans

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-18 Thread David C . Ullrich
On Wed, 17 Jun 2009 08:18:52 -0700 (PDT), Mark Dickinson
dicki...@gmail.com wrote:

On Jun 17, 3:46 pm, Paul Rubin http://phr...@nospam.invalid wrote:
 Mark Dickinson dicki...@gmail.com writes:
  It looks as though you're treating (a portion of?) the Koch curve as
  the graph of a function f from R - R and claiming that f is
  uniformly continuous.  But the Koch curve isn't such a graph (it
  fails the 'vertical line test',

 I think you treat it as a function f: R - R**2 with the usual
 distance metric on R**2.

Right.  Or rather, you treat it as the image of such a function,
if you're being careful to distinguish the curve (a subset
of R^2) from its parametrization (a continuous function
R - R**2).  It's the parametrization that's uniformly
continuous, not the curve,

Again, it doesn't really matter, but since you use the phrase
if you're being careful: In fact what you say is exactly
backwards - if you're being careful that subset of the plane
is _not_ a curve (it's sometimes called the trace of the curve.

and since any curve can be
parametrized in many different ways any proof of uniform
continuity should specify exactly which parametrization is
in use.

Any _closed_ curve must have [a,b] as its parameter 
interval, and hence is uniformly continuous since any
continuous function on [a,b] is uniformly continuous.

Mark

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-18 Thread Charles Yeomans


On Jun 18, 2009, at 2:19 PM, David C. Ullrich wrote:


On Wed, 17 Jun 2009 07:37:32 -0400, Charles Yeomans
char...@declaresub.com wrote:



On Jun 17, 2009, at 2:04 AM, Paul Rubin wrote:


Jaime Fernandez del Rio jaime.f...@gmail.com writes:

I am pretty sure that a continuous sequence of
curves that converges to a continuous curve, will do so uniformly.


I think a typical example of a curve that's continuous but not
uniformly continuous is

 f(t) = sin(1/t), defined when t  0

It is continuous at every t0 but wiggles violently as you get  
closer

to t=0.  You wouldn't be able to approximate it by sampling a finite
number of points.  A sequence like

 g_n(t) = sin((1+1/n)/ t)for n=1,2,...

obviously converges to f, but not uniformly.  On a closed interval,
any continuous function is uniformly continuous.


Isn't (-?, ?) closed?


What is your version of the definition of closed?




My version of a closed interval is one that contains its limit points.

Charles Yeomans

--
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-18 Thread Arnaud Delobelle
David C. Ullrich ullr...@math.okstate.edu writes:

 On Wed, 17 Jun 2009 08:18:52 -0700 (PDT), Mark Dickinson
 dicki...@gmail.com wrote:

On Jun 17, 3:46 pm, Paul Rubin http://phr...@nospam.invalid wrote:
 Mark Dickinson dicki...@gmail.com writes:
  It looks as though you're treating (a portion of?) the Koch curve as
  the graph of a function f from R - R and claiming that f is
  uniformly continuous.  But the Koch curve isn't such a graph (it
  fails the 'vertical line test',

 I think you treat it as a function f: R - R**2 with the usual
 distance metric on R**2.

Right.  Or rather, you treat it as the image of such a function,
if you're being careful to distinguish the curve (a subset
of R^2) from its parametrization (a continuous function
R - R**2).  It's the parametrization that's uniformly
continuous, not the curve,

 Again, it doesn't really matter, but since you use the phrase
 if you're being careful: In fact what you say is exactly
 backwards - if you're being careful that subset of the plane
 is _not_ a curve (it's sometimes called the trace of the curve.

I think it is quite common to refer to call 'curve' the image of its
parametrization.  Anyway there is a representation theorem somewhere
that I believe says for subsets of R^2 something like:

A subset of R^2 is the image of a continuous function [0,1] - R^2
iff it is compact, connected and locally connected.

(I might be a bit -or a lot- wrong here, I'm not a practising
mathematician) Which means that there is no need to find a
parametrization of a plane curve to know that it is a curve.

To add to this, the usual definition of the Koch curve is not as a
function [0,1] - R^2, and I wonder how hard it is to find such a
function for it.  It doesn't seem that easy at all to me - but I've
never looked into fractals.

-- 
Arnaud
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-18 Thread Mark Dickinson
On Jun 18, 7:26 pm, David C. Ullrich ullr...@math.okstate.edu wrote:
 On Wed, 17 Jun 2009 08:18:52 -0700 (PDT), Mark Dickinson
 Right.  Or rather, you treat it as the image of such a function,
 if you're being careful to distinguish the curve (a subset
 of R^2) from its parametrization (a continuous function
 R - R**2).  It's the parametrization that's uniformly
 continuous, not the curve,

 Again, it doesn't really matter, but since you use the phrase
 if you're being careful: In fact what you say is exactly
 backwards - if you're being careful that subset of the plane
 is _not_ a curve (it's sometimes called the trace of the curve.

Darn.  So I've been getting it wrong all this time.  Oh well,
at least I'm not alone:

Definition 1. A simple closed curve J, also called a
Jordan curve, is the image of a continuous one-to-one
function from R/Z to R2. [...]

- Tom Hales, in 'Jordan's Proof of the Jordan Curve Theorem'.

We say that Gamma is a curve if it is the image in
the plane or in space of an interval [a, b] of real
numbers of a continuous function gamma.

- Claude Tricot, 'Curves and Fractal Dimension' (Springer, 1995).

Perhaps your definition of curve isn't as universal or
'official' as you seem to think it is?

Mark
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-18 Thread Paul Rubin
David C. Ullrich ullr...@math.okstate.edu writes:
  obviously converges to f, but not uniformly.  On a closed interval,
  any continuous function is uniformly continuous.
 
 Isn't (-?, ?) closed?
 
 What is your version of the definition of closed?

I think the whole line is closed, but I hadn't realized anyone
considered the whole line to be an interval.  Apparently they do.
So that the proper statement specifies compactness (= closed and
bounded) rather than just closed.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-17 Thread Paul Rubin
Jaime Fernandez del Rio jaime.f...@gmail.com writes:
 I am pretty sure that a continuous sequence of
 curves that converges to a continuous curve, will do so uniformly.

I think a typical example of a curve that's continuous but not
uniformly continuous is

   f(t) = sin(1/t), defined when t  0

It is continuous at every t0 but wiggles violently as you get closer
to t=0.  You wouldn't be able to approximate it by sampling a finite
number of points.  A sequence like 

   g_n(t) = sin((1+1/n)/ t)for n=1,2,...

obviously converges to f, but not uniformly.  On a closed interval,
any continuous function is uniformly continuous.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-17 Thread Charles Yeomans


On Jun 17, 2009, at 2:04 AM, Paul Rubin wrote:


Jaime Fernandez del Rio jaime.f...@gmail.com writes:

I am pretty sure that a continuous sequence of
curves that converges to a continuous curve, will do so uniformly.


I think a typical example of a curve that's continuous but not
uniformly continuous is

  f(t) = sin(1/t), defined when t  0

It is continuous at every t0 but wiggles violently as you get closer
to t=0.  You wouldn't be able to approximate it by sampling a finite
number of points.  A sequence like

  g_n(t) = sin((1+1/n)/ t)for n=1,2,...

obviously converges to f, but not uniformly.  On a closed interval,
any continuous function is uniformly continuous.


Isn't (-∞, ∞) closed?

Charles Yeomans

--
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-17 Thread Mark Dickinson
On Jun 17, 7:04 am, Paul Rubin http://phr...@nospam.invalid wrote:
 I think a typical example of a curve that's continuous but not
 uniformly continuous is

    f(t) = sin(1/t), defined when t  0

 It is continuous at every t0 but wiggles violently as you get closer
 to t=0.  You wouldn't be able to approximate it by sampling a finite
 number of points.  A sequence like

    g_n(t) = sin((1+1/n)/ t)    for n=1,2,...

 obviously converges to f, but not uniformly.  On a closed interval,
 any continuous function is uniformly continuous.

Right, but pointwise convergence doesn't imply uniform
convergence even with continuous functions on a closed
bounded interval.  For an example, take the sequence
g_n (n = 0), of continuous real-valued functions on
[0, 1] defined by:

g_n(t) = nt if 0 = t = 1/n else 1

Then for any 0 = t = 1, g_n(t) - 0 as n - infinity.
But the convergence isn't uniform:  max_t(g_n(t)-0) = 1
for all n.

Maybe James is thinking of the standard theorem
that says that if a sequence of continuous functions
on an interval converges uniformly then its limit
is continuous?

Mark
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-17 Thread Jaime Fernandez del Rio
On Wed, Jun 17, 2009 at 1:52 PM, Mark Dickinsondicki...@gmail.com wrote:
 Maybe James is thinking of the standard theorem
 that says that if a sequence of continuous functions
 on an interval converges uniformly then its limit
 is continuous?

Jaime was simply plain wrong... The example that always comes to mind
when figuring out uniform convergence (or lack of it), is the step
function , i.e. f(x)= 0 if x in [0,1), x(x)=1 if x = 1, being
approximated by the sequence f_n(x) = x**n if x in [0,1), f_n(x) = 1
if x=1, where uniform convergence is broken mostly due to the
limiting function not being continuous.

I simply was too quick with my extrapolations, and have realized I
have a lot of work to do for my real and functional analysis
exam coming in three weeks...

Jaime

P.S. The snowflake curve, on the other hand, is uniformly continuous, right?

-- 
(\__/)
( O.o)
(  ) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus
planes de dominación mundial.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-17 Thread Mark Dickinson
On Jun 17, 1:26 pm, Jaime Fernandez del Rio jaime.f...@gmail.com
wrote:
 On Wed, Jun 17, 2009 at 1:52 PM, Mark Dickinsondicki...@gmail.com wrote:
  Maybe James is thinking of the standard theorem
  that says that if a sequence of continuous functions
  on an interval converges uniformly then its limit
  is continuous?

s/James/Jaime.   Apologies.

 P.S. The snowflake curve, on the other hand, is uniformly continuous, right?

Yes, at least in the sense that it can be parametrized
by a uniformly continuous function from [0, 1] to the
Euclidean plane.  I'm not sure that it makes a priori
sense to describe the curve itself (thought of simply
as a subset of the plane) as uniformly continuous.

Mark
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-17 Thread Mark Dickinson
On Jun 17, 2:18 pm, pdpi pdpinhe...@gmail.com wrote:
 On Jun 17, 1:26 pm, Jaime Fernandez del Rio jaime.f...@gmail.com
 wrote:

  P.S. The snowflake curve, on the other hand, is uniformly continuous, right?

 The definition of uniform continuity is that, for any epsilon  0,
 there is a delta  0 such that, for any x and y, if x-y  delta, f(x)-f
 (y)  epsilon. Given that Koch's curve is shaped as recursion over the
 transformation from ___ to _/\_, it's immediately obvious that, for a
 delta of at most the length of , epsilon will be at most the
 height of /. It follows that, inversely, for any arbitrary epsilon,
 you find the smallest / that's still taller than epsilon, and delta is
 bound by the respective . (hooray for ascii demonstrations)

I think I'm too stupid to follow this.  It looks as though
you're treating (a portion of?) the Koch curve as the graph
of a function f from R - R and claiming that f is uniformly
continuous.  But the Koch curve isn't such a graph (it fails
the 'vertical line test', in the language of precalculus 101),
so I'm confused.

Here's an alternative proof:

Let K_0, K_1, K_2, ... be the successive generations of the Koch
curve, so that K_0 is the closed line segment from (0, 0) to
(1, 0), K_1 looks like _/\_, etc.

Parameterize each Kn by arc length, scaled so that the domain
of the parametrization is always [0, 1] and oriented so that
the parametrizing function fn has fn(0) = (0,0) and fn(1) = (1, 0).

Let d = ||f1 - f0||, a positive real constant whose exact value
I can't be bothered to calculate[*] (where ||f1 - f0|| means
the maximum over all x in [0, 1] of the distance from
f0(x) to f1(x)).

Then from the self-similarity we get ||f2 - f1|| = d/3,
||f3 - f2|| = d/9, ||f4 - f3|| = d/27, etc.

Hence, since sum_{i = 0} d/(3^i) converges absolutely,
the sequence f0, f1, f2, ... converges *uniformly* to
a limiting function f : [0, 1] - R^2 that parametrizes the
Koch curve.  And since a uniform limit of uniformly continuous
function is uniformly continuous, it follows that f is
uniformly continuous.

Mark

[*] I'm guessing 1/sqrt(12).
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-17 Thread Mark Dickinson
On Jun 17, 3:46 pm, Paul Rubin http://phr...@nospam.invalid wrote:
 Mark Dickinson dicki...@gmail.com writes:
  It looks as though you're treating (a portion of?) the Koch curve as
  the graph of a function f from R - R and claiming that f is
  uniformly continuous.  But the Koch curve isn't such a graph (it
  fails the 'vertical line test',

 I think you treat it as a function f: R - R**2 with the usual
 distance metric on R**2.

Right.  Or rather, you treat it as the image of such a function,
if you're being careful to distinguish the curve (a subset
of R^2) from its parametrization (a continuous function
R - R**2).  It's the parametrization that's uniformly
continuous, not the curve, and since any curve can be
parametrized in many different ways any proof of uniform
continuity should specify exactly which parametrization is
in use.

Mark
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-17 Thread pdpi
On Jun 17, 4:18 pm, Mark Dickinson dicki...@gmail.com wrote:
 On Jun 17, 3:46 pm, Paul Rubin http://phr...@nospam.invalid wrote:

  Mark Dickinson dicki...@gmail.com writes:
   It looks as though you're treating (a portion of?) the Koch curve as
   the graph of a function f from R - R and claiming that f is
   uniformly continuous.  But the Koch curve isn't such a graph (it
   fails the 'vertical line test',

  I think you treat it as a function f: R - R**2 with the usual
  distance metric on R**2.

 Right.  Or rather, you treat it as the image of such a function,
 if you're being careful to distinguish the curve (a subset
 of R^2) from its parametrization (a continuous function
 R - R**2).  It's the parametrization that's uniformly
 continuous, not the curve, and since any curve can be
 parametrized in many different ways any proof of uniform
 continuity should specify exactly which parametrization is
 in use.

 Mark

I was being incredibly lazy and using loads of handwaving, seeing as I
posted that (and this!) while procrastinating at work.

an even lazier argument: given the _/\_ construct, you prove that its
vertical growth is bound: the height of / is less than 1/3 (given a
length of 1 for ___), so, even if you were to build _-_ with the
middle segment at height = 1/3, the maximum vertical growth would be
sum 1/3^n from 1 to infinity, so 0.5. Sideways growth has a similar
upper bound. 0.5  1, so the chebyshev distance between any two points
on the curve is = 1. Ergo, for any x,y, f(x) is at most at chebyshev
distance 1 of (y). Induce the argument for smaller values of one.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-16 Thread Paul Rubin
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes:
 I don't think any countable set, even a countably-infinite set, can have a 
 fractal dimension. It's got to be uncountably infinite, and therefore 
 uncomputable.

I think the idea is you assume uniform continuity of the set (as
expressed by a parametrized curve).  That should let you approximate
the fractal dimension.

As for countability, remember that the reals are a separable metric
space, so the value of a continuous function any dense subset of the
reals (e.g. on the rationals, which are countable) completely
determines the function, iirc.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-16 Thread David C . Ullrich
On 15 Jun 2009 04:55:03 GMT, Steven D'Aprano
ste...@remove.this.cybersource.com.au wrote:

On Sun, 14 Jun 2009 14:29:04 -0700, Kay Schluehr wrote:

 On 14 Jun., 16:00, Steven D'Aprano
 st...@removethis.cybersource.com.au wrote:
 
 Incorrect. Koch's snowflake, for example, has a fractal dimension of
 log 4/log 3 ? 1.26, a finite area of 8/5 times that of the initial
 triangle, and a perimeter given by lim n-inf (4/3)**n. Although the
 perimeter is infinite, it is countably infinite and computable.
 
 No, the Koch curve is continuous in R^2 and uncountable. 

I think we're talking about different things. The *number of points* in 
the Koch curve is uncountably infinite, but that's nothing surprising, 
the number of points in the unit interval [0, 1] is uncountably infinite. 
But the *length* of the Koch curve is not, it's given by the above limit, 
which is countably infinite (it's a rational number for all n).

No, the length of the perimeter is infinity, period. Calling it
countably infinite makes no sense.

You're confusing two different sorts of infinity. A set has a
cardinality - countably infinite is the smallest infinite
cardinality.

Limits, as in calculus, as in that limit above, are not
cardinailities.


 Lawrence is
 right and one can trivially cover a countable infinite set with disks of
 the diameter 0, namely by itself. The sum of those diameters to an
 arbitrary power is also 0 and this yields that the Hausdorff dimension
 of any countable set is 0.

Nevertheless, the Hausdorff dimension (or a close approximation thereof) 
can be calculated from the scaling properties of even *finite* objects. 
To say that self-similar objects like broccoli or the inner surface of 
the human lungs fails to nest at all scales is pedantically correct but 
utterly pointless. If it's good enough for Benoît Mandelbrot, it's good 
enough for me.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-16 Thread Lawrence D'Oliveiro
In message 7x63ew3uo9@ruckus.brouhaha.com,  wrote:

 Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes:

 I don't think any countable set, even a countably-infinite set, can have
 a fractal dimension. It's got to be uncountably infinite, and therefore
 uncomputable.
 
 I think the idea is you assume uniform continuity of the set (as
 expressed by a parametrized curve).  That should let you approximate
 the fractal dimension.

Fractals are, by definition, not uniform in that sense.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-16 Thread Jaime Fernandez del Rio
On Wed, Jun 17, 2009 at 4:50 AM, Lawrence
D'Oliveirol...@geek-central.gen.new_zealand wrote:
 In message 7x63ew3uo9@ruckus.brouhaha.com,  wrote:

 Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes:

 I don't think any countable set, even a countably-infinite set, can have
 a fractal dimension. It's got to be uncountably infinite, and therefore
 uncomputable.

 I think the idea is you assume uniform continuity of the set (as
 expressed by a parametrized curve).  That should let you approximate
 the fractal dimension.

 Fractals are, by definition, not uniform in that sense.

I had my doubts on this statement being true, so I've gone to my copy
of Gerald Edgar's Measure, Topology and Fractal Geometry and
Proposition 2.4.10 on page 69 states: The sequence (gk), in the
dragon construction of the Koch curve converges uniformly. And
uniform continuity is a very well defined concept, so there really
shouldn't be an interpretation issue here either. Would not stick my
head out for it, but I am pretty sure that a continuous sequence of
curves that converges to a continuous curve, will do so uniformly.

Jaime

-- 
(\__/)
( O.o)
(  ) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus
planes de dominación mundial.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-15 Thread pdpi
On Jun 15, 5:55 am, Steven D'Aprano
ste...@remove.this.cybersource.com.au wrote:
 On Sun, 14 Jun 2009 14:29:04 -0700, Kay Schluehr wrote:
  On 14 Jun., 16:00, Steven D'Aprano
  st...@removethis.cybersource.com.au wrote:

  Incorrect. Koch's snowflake, for example, has a fractal dimension of
  log 4/log 3 ≈ 1.26, a finite area of 8/5 times that of the initial
  triangle, and a perimeter given by lim n-inf (4/3)**n. Although the
  perimeter is infinite, it is countably infinite and computable.

  No, the Koch curve is continuous in R^2 and uncountable.

 I think we're talking about different things. The *number of points* in
 the Koch curve is uncountably infinite, but that's nothing surprising,
 the number of points in the unit interval [0, 1] is uncountably infinite.
 But the *length* of the Koch curve is not, it's given by the above limit,
 which is countably infinite (it's a rational number for all n).

  Lawrence is
  right and one can trivially cover a countable infinite set with disks of
  the diameter 0, namely by itself. The sum of those diameters to an
  arbitrary power is also 0 and this yields that the Hausdorff dimension
  of any countable set is 0.

 Nevertheless, the Hausdorff dimension (or a close approximation thereof)
 can be calculated from the scaling properties of even *finite* objects.
 To say that self-similar objects like broccoli or the inner surface of
 the human lungs fails to nest at all scales is pedantically correct but
 utterly pointless. If it's good enough for Benoît Mandelbrot, it's good
 enough for me.

 --
 Steven

You're mixing up the notion of countability. It only applies to set
sizes. Unless you're saying that there an infinite series has a
countable number of terms (a completely trivial statement), to say
that the length is countably finite simply does not parse correctly
(let alone being semantically correct or not). This said, I agree with
you: I reckon that the Koch curve, while composed of uncountable
cardinality, is completely described by the vertices, so a countable
set of points. It follows that you must be able to correctly calculate
the Hausdorff dimension of the curve from those control points alone,
so you should also be able to estimate it from a finite sample (you
can arguably infer self-similarity from a limited number of self-
similar generations).
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-14 Thread Lawrence D'Oliveiro
In message slrnh33j2b.4bu.pe...@box8.pjb.com.au, Peter Billam wrote:

 Are there any modules, packages, whatever, that will
 measure the fractal dimensions of a dataset, e.g. a time-series ?

I don't think any countable set, even a countably-infinite set, can have a 
fractal dimension. It's got to be uncountably infinite, and therefore 
uncomputable.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-14 Thread Arnaud Delobelle
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes:

 In message slrnh33j2b.4bu.pe...@box8.pjb.com.au, Peter Billam wrote:

 Are there any modules, packages, whatever, that will
 measure the fractal dimensions of a dataset, e.g. a time-series ?

 I don't think any countable set, even a countably-infinite set, can have a 
 fractal dimension. It's got to be uncountably infinite, and therefore 
 uncomputable.

I think there are attempts to estimate the fractal dimension of a set
using a finite sample from this set.  But I can't remember where I got
this thought from!

-- 
Arnaud
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-14 Thread Paul Rubin
Arnaud Delobelle arno...@googlemail.com writes:
 I think there are attempts to estimate the fractal dimension of a set
 using a finite sample from this set.  But I can't remember where I got
 this thought from!

There are image data compression schemes that work like that, trying
to detect self-similarity in the data.  It can go the reverse way too.
There was a program called Genuine Fractals that tried to increase the
apparent resolution of photographs by adding artificial detail
constructed from detected self-similarity.  Its results were mixed, as
I remember.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-14 Thread Steven D'Aprano
Lawrence D'Oliveiro wrote:

 In message slrnh33j2b.4bu.pe...@box8.pjb.com.au, Peter Billam wrote:
 
 Are there any modules, packages, whatever, that will
 measure the fractal dimensions of a dataset, e.g. a time-series ?
 
 I don't think any countable set, even a countably-infinite set, can have a
 fractal dimension. It's got to be uncountably infinite, and therefore
 uncomputable.

Incorrect. Koch's snowflake, for example, has a fractal dimension of log
4/log 3 ≈ 1.26, a finite area of 8/5 times that of the initial triangle,
and a perimeter given by lim n-inf (4/3)**n. Although the perimeter is
infinite, it is countably infinite and computable.

Strictly speaking, there's not one definition of fractal dimension, there
are a number of them. One of the more useful is the Hausdorf dimension,
which relates to the idea of how your measurement of the size of a thing
increases as you decrease the size of your yard-stick. The Hausdorf
dimension can be statistically estimated for finite objects, e.g. the
fractal dimension of the coast of Great Britain is approximately 1.25 while
that of Norway is 1.52; cauliflower has a fractal dimension of 2.33 and
crumpled balls of paper of 2.5; the surface of the human brain and lungs
have fractal dimensions of 2.79 and 2.97.



-- 
Steven

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-14 Thread Peter Billam
 In message slrnh33j2b.4bu.pe...@box8.pjb.com.au, Peter Billam wrote:
 Are there any modules, packages, whatever, that will
 measure the fractal dimensions of a dataset, e.g. a time-series ?
 
 Lawrence D'Oliveiro wrote:
 I don't think any countable set, even a countably-infinite set, can
 have a fractal dimension. It's got to be uncountably infinite, and
 therefore uncomputable.

You need a lot of data-points to get a trustworthy answer.
Of course edge-effects step in as you come up against the
spacing betwen the points; you'd have to weed those out.

On 2009-06-14, Steven D'Aprano st...@removethis.cybersource.com.au wrote:
 Strictly speaking, there's not one definition of fractal dimension, there
 are a number of them. One of the more useful is the Hausdorf dimension,

They can be seen as special cases of Renyi's generalised entropy;
the Hausdorf dimension (D0) is easy to compute because of the
box-counting-algorithm:
  http://en.wikipedia.org/wiki/Box-counting_dimension

Also easy to compute is the Correlation Dimension (D2):
  http://en.wikipedia.org/wiki/Correlation_dimension

Between the two, but much slower, is the Information Dimension (D1)
  http://en.wikipedia.org/wiki/Information_dimension
which most closely corresponds to physical entropy.

Multifractals are very common in nature
(like stock exchanges, if that counts as nature :-))
  http://en.wikipedia.org/wiki/Multifractal_analysis
but there you really need _huge_ datasets to get useful answers ...

There have been lots of papers published (these are some refs I have:
  G. Meyer-Kress, Application of dimension algorithms to experimental
  chaos, in Directions in Chaos, Hao Bai-Lin ed., (World Scientific,
  Singapore, 1987) p. 122
  S. Ellner, Estmating attractor dimensions for limited data: a new
  method, with error estimates Physi. Lettr. A 113,128 (1988)
  P. Grassberger, Estimating the fractal dimensions and entropies
  of strange attractors, in Chaos, A.V. Holden, ed. (Princeton
  University Press, 1986, Chap 14)
  G. Meyer-Kress, ed. Dimensions and Entropies in Chaotic Systems -
  Quantification of Complex Behaviour, vol 32 of Springer series
  in Synergetics (Springer Verlag, Berlin, 1986)
  N.B. Abraham, J.P. Gollub and H.L. Swinney, Testing nonlinear
   dynamics, Physica 11D, 252 (1984)
) but I haven't chased these up and I don't think they contain
any working code. But the work has been done, so the code must
be there still, on some computer somwhere...

Regards,  Peter

-- 
Peter Billam   www.pjb.com.auwww.pjb.com.au/comp/contact.html
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Measuring Fractal Dimension ?

2009-06-14 Thread Steven D'Aprano
On Sun, 14 Jun 2009 14:29:04 -0700, Kay Schluehr wrote:

 On 14 Jun., 16:00, Steven D'Aprano
 st...@removethis.cybersource.com.au wrote:
 
 Incorrect. Koch's snowflake, for example, has a fractal dimension of
 log 4/log 3 ≈ 1.26, a finite area of 8/5 times that of the initial
 triangle, and a perimeter given by lim n-inf (4/3)**n. Although the
 perimeter is infinite, it is countably infinite and computable.
 
 No, the Koch curve is continuous in R^2 and uncountable. 

I think we're talking about different things. The *number of points* in 
the Koch curve is uncountably infinite, but that's nothing surprising, 
the number of points in the unit interval [0, 1] is uncountably infinite. 
But the *length* of the Koch curve is not, it's given by the above limit, 
which is countably infinite (it's a rational number for all n).


 Lawrence is
 right and one can trivially cover a countable infinite set with disks of
 the diameter 0, namely by itself. The sum of those diameters to an
 arbitrary power is also 0 and this yields that the Hausdorff dimension
 of any countable set is 0.

Nevertheless, the Hausdorff dimension (or a close approximation thereof) 
can be calculated from the scaling properties of even *finite* objects. 
To say that self-similar objects like broccoli or the inner surface of 
the human lungs fails to nest at all scales is pedantically correct but 
utterly pointless. If it's good enough for Benoît Mandelbrot, it's good 
enough for me.



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Measuring Fractal Dimension ?

2009-06-12 Thread Peter Billam
Greetings.  Are there any modules, packages, whatever, that will
measure the fractal dimensions of a dataset, e.g. a time-series ?
Like the Correlation Dimension, the Information Dimension, etc...

Peter

-- 
Peter Billam  www.pjb.com.auwww.pjb.com.au/comp/contact.html
-- 
http://mail.python.org/mailman/listinfo/python-list


Fractal curve

2005-11-27 Thread Steve Heyburn

Hello there,
I am studying programming at University and we are basing the course on Python. We are currently looking at fractal curves and I was wondering if you could email me code for a dragon curve please, or a similar fractal curve.

Thank you
Steve

-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Fractal curve

2005-11-27 Thread Steve Holden
Steve Heyburn wrote:
 Hello there,
 
 I am studying programming at University and we are basing the course on 
 Python. 
 We are currently looking at fractal curves and I was wondering if you could 
 email me code for a dragon curve please, or a similar fractal curve.
 

   http://www.google.com/search?q=dragon+curve+python


-- 
Steve Holden   +44 150 684 7255  +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006  www.python.org/pycon/

-- 
http://mail.python.org/mailman/listinfo/python-list