Shop OBEX P1 Docs P2 Docs Learn Events
Fractals and the Propeller — Parallax Forums

Fractals and the Propeller

LEDboyLEDboy Posts: 21
edited 2009-04-20 08:47 in Propeller 1
Just out of curiosity is the propeller capable of performing the computations necessary to generate a fractal?· If so would it also be able to display it in VGA?····


A fractal is generally "a rough or fragmented geometric shape that can be split into parts, each of which is (at least approximately) a reduced-size copy of the whole,"[noparse][[/noparse]1] a property called self-similarity. The term was coined by Benoît Mandelbrot in 1975 and was derived from the Latin fractus meaning "broken" or "fractured." A mathematical fractal is based on an equation that undergoes iteration, a form of feedback based on recursion.[noparse][[/noparse]2]

A fractal often has the following features:[noparse][[/noparse]3]

Comments

  • mparkmpark Posts: 1,305
    edited 2009-04-17 05:27
    I wrote a program to zoom in on a Hilbert curve. It turned out less interesting than I'd hoped, though I shouldn't have been surprised -- you zoom in on a space-filling curve, you should expect to see the space being filled...

    http://forums.parallax.com/showthread.php?p=758469
  • virtuPICvirtuPIC Posts: 193
    edited 2009-04-17 05:59
    Yes and no... A Hilbert curve has Hausdorff dimension of 2 and topological dimension of 1. I agree that they don't look that interesting. However, they are helpful to represent two dimensional coordinates in one number.

    The first fractals to use for graphics are the Mandelbrot set and Julia sets. Wikipedia offers info. And even programs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Airspace V - international hangar flying!
    www.airspace-v.com/ggadgets for tools & toys
  • mctriviamctrivia Posts: 3,772
    edited 2009-04-17 06:03
    i doubt the prop can do mandelbrot. Speed is enough i did it on a 486 in pascal so I am sure assembler on the prop is fast enough. the difficulty is not enough ram to store the resulting picture and there is no way you could render it in 1/30 sec

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • AleAle Posts: 2,363
    edited 2009-04-17 11:22
    You can do it in a 8088 ! I remember when I first saw Fractint in 1990 and it was running on a Nec V20 (XT clone) using monochrome display. So while it is not fast, it works.

    Btw, Linus demo shows if I'm not mistaken part of a Mandelbrot set zooming and rotating, so yes it can do it smile.gif
  • LeonLeon Posts: 7,620
    edited 2009-04-17 12:07
    23 years ago arrays of transputers running at 20 MIPS each were doing very quick Mandlebrot implementations. It's a standard demo on the XMOS XDK, of course.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 4/17/2009 12:12:37 PM GMT
  • virtuPICvirtuPIC Posts: 193
    edited 2009-04-17 12:41
    Yes and no... The prop has MIPS enough to compute a Mandelbrot set. But where to store it with access time low enough to display?

    If you have a TV display of 320 x 200 pixels you get almost 64 Kpixels. Of course, in BW you need 8 kByte, but this looks rather boring. The more colors the better. 4 Bits per pixel stored partially in hub RAM, partially in cog RAM would be possible. And compression like RLE or HAM are not really doable if you zoom in since you get irregular fine structures.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Airspace V - international hangar flying!
    www.airspace-v.com/ggadgets for tools & toys
  • mctriviamctrivia Posts: 3,772
    edited 2009-04-17 13:29
    I guess you don't have to go full resolution. you could do a 100x100 in 5k at 4 bit color

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • sylvie369sylvie369 Posts: 1,622
    edited 2009-04-17 13:53
    mctrivia said...
    I guess you don't have to go full resolution. you could do a 100x100 in 5k at 4 bit color

    That hardly sounds worth the effort.

    I wrote a C program that computed Mandelbrots about 20 years ago, and ran it on an old XT clone at 640x480. It took forever. I didn't use any of the standard shortcuts, but computed the color of each pixel separately. That same week we got our first 286 AT clone, with a much better monitor, which I immediately commandeered to see how much faster it was. It took about half of forever.

    I obviously could have run with much less resolution, and in fact ran a couple to make sure my program was working (before I bothered running it for hours). The result was very uninteresting.
    Some unnamed source said...
    A mathematical fractal is based on an equation that undergoes iteration, a form of feedback based on recursion.[noparse][[/noparse]2]
    I wouldn't trust that source if I were you. That's an awfully clueless sentence.

    (Later: ) I see it's from Wikipedia. Anyone with the time and expertise want to go fix it?

    Post Edited (sylvie369) : 4/17/2009 2:05:35 PM GMT
  • dnaddordnaddor Posts: 26
    edited 2009-04-17 20:43
    For those interested, the attached SPIN program generates a cool fractal.

    Enjoy!
  • LEDboyLEDboy Posts: 21
    edited 2009-04-17 23:34
    Thanks everyone...I guess what I really was thinking about doing was making a "digital picture frame" that would hang on the wall and display a fractal generated by the prop. I have an old LCD samsung monitor from an old laptop I was going to use as the display.
  • RaymanRayman Posts: 14,826
    edited 2009-04-20 00:00
    I was intrigued by this thread and decided to try to do the Mandelbrot with my "Propeller System Module"... I'll start a new thread to show the result...
  • TonyDTonyD Posts: 210
    edited 2009-04-20 08:47
    I remember Steve Ciarcia (of Circuit Cellar magazine) publishing an article in the early 1980's in Byte Magazine where he used a network of 8051 8-bit microcontrollers to compute Mandelbrots and used a PC to display the results. I remember thinking it was very cool.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Tony

    <a href=http://zuzebox.wordpress.com/>http://zuzebox.wordpress.com/</a&gt;
Sign In or Register to comment.