Showing posts with label retro. Show all posts
Showing posts with label retro. Show all posts

Tuesday, December 4, 2012

On fractals

I did say I'd talk about fractals, didn't I? I've been fascinated by them for a good 25 years now... A few weeks ago I attended a presentation at the local IEEE chapter. It didn't feature a lot of graphics, but instead it focused on practical applications of fractals to analyze lots of data. So I figured I'd bring them up at some point on this blog.

Today I'll mention some stuff just to whet your appetite.

Definition...


Or perhaps not. According to wikipedia:
"There is some disagreement amongst authorities about how the concept of a fractal should be formally defined. The general consensus is that theoretical fractals are infinitely self-similar, iterated and detailed mathematical constructs having fractal dimensions, of which many examples have been formulated and studied in great depth..."
Clear as mud, I'm sure. But still, fractals are quite interesting. Not just from a mathematical standpoint, but from a wide variety of angles.

Back when I was in school, one of my math teachers talked a good bit about fractals. The term had been around less than 10 years, but already it was quite popular in academic circles. I don't really remember anything he told us, but I will never forget the picture of the Mandelbrot set he showed us.

To him, fractals were fascinating equations. To us, they were fascinating graphics:

Actually... no, that is the Python code!
Yep, that's it! The Mandelbrot set
Regarding the source code, that's not how Python code looks usually. This is what is called obfuscated code. It is an art form in itself. The source was taken from the Preshing blog.

For a non obfuscated version of the code, and lots of explanations, check out: Python Patterns.

Sierpinski


Before you can run, you have to learn how to walk. Mandelbrot demanded a lot of horsepower back in the mid 80s. My Apple ][ was only 1MHz and my Mac, 8MHz. It would have taken days. So I played around with assembler and Pascal, doing this:



                               @                               
                              @ @                              
                             @   @                             
                            @ @ @ @                            
                           @       @                           
                          @ @     @ @                          
                         @   @   @   @                         
                        @ @ @ @ @ @ @ @                        
                       @               @                       
                      @ @             @ @                      
                     @   @           @   @                     
                    @ @ @ @         @ @ @ @                    
                   @       @       @       @                   
                  @ @     @ @     @ @     @ @                  
                 @   @   @   @   @   @   @   @                 
                @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @                
               @                               @               
              @ @                             @ @              
             @   @                           @   @             
            @ @ @ @                         @ @ @ @            
           @       @                       @       @           
          @ @     @ @                     @ @     @ @          
         @   @   @   @                   @   @   @   @         
        @ @ @ @ @ @ @ @                 @ @ @ @ @ @ @ @        
       @               @               @               @       
      @ @             @ @             @ @             @ @      
     @   @           @   @           @   @           @   @     
    @ @ @ @         @ @ @ @         @ @ @ @         @ @ @ @    
   @       @       @       @       @       @       @       @   
  @ @     @ @     @ @     @ @     @ @     @ @     @ @     @ @  
 @   @   @   @   @   @   @   @   @   @   @   @   @   @   @   @ 
@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @



It is a text representation of a Sierpinski triangle or gasket. It is a Fractal that was discovered by the Polish mathematician Waclaw Sierpinski in 1915, before we even had a name for fractals (that was coined by Benoit Mandelbrot in 1975).

Perhaps not that impressive nowadays, but it was a lot of assembler code to do this. In Pascal too, I seem to remember it was at least 60 lines.

On Rosettacode, you can find the following Python program that does the equivalent:

def sierpinski(n):
    d = ["*"]
    for i in xrange(n):
        sp = " " * (2 ** i)
        d = [sp+x+sp for x in d] + [x+" "+x for x in d]
    return d
 
print "\n".join(sierpinski(4))

But dont be fooled by that short piece of code, it is a complex subject.

Other fractals that have been around for a long long time and dont require a lot of computing power, are the cantor set, the Heighway Dragon and the Koch snowflake. All of them are examples of iterated function systems (IFS). The Mandelbrot and Julia sets are of a different type of fractals: escape time fractals. Also, there have been some interesting links made between the Cantor set and Fibonacci's series, so it is a normal continuation from that theme, since I've had a few blog entries on Fibonacci: here, here and here.

Fractint


In 1988 appeared on BBSes and usenet the program Fract386, and renamed Fractint the following year. That was pretty exciting, we could render Mandelbrot without hardware floating point math. It was fast! Well... compared to what it was up to that point...

Mandelbrot set


Fractint is a DOS program. It is also available for Windows (old windows 3.1...) and Linux now, but let's stay with this concept for a minute. How can we run DOS programs on the Raspberry Pi?

Video mode selection

Dosbox

Dosbox is a dos on x86 emulator. It runs on non x86 platform, such as the Raspberry Pi (ARM processor) without problems. By comparison, WINE does not work on the Pi.

$ sudo apt-get install dosbox

Once installed, run it once so the configuration file gets written, then exit. If you get issues with the keyboard mapping:

$ cd .dosbox
$ vi dosbox.conf

usescancodes=false


That should take care of it. Now create a dos directory and download fractint there:
$ cd
$ cd dos
$ wget http://www.nahee.com/spanky/pub/fractals/programs/ibmpc/frain204.zip
$ unzip fain204.zip

Now, run dosbox and mount the dos folder:

mount c dos
 You can now type c:, change (cd) to the fracti~1.04p folder and run Fractint!

We'll continue on fractals at a later date.

Saturday, November 24, 2012

It's more fun to compute

last track  - "It's more fun to compute"


Ah, Computer World, by Kraftwerk. The last track is titled "It's more fun to compute". I'm thinking Hutter, Schneider and Bartos must have written this song in November, after raking and blowing leaves for a few days... All joking aside, I hope you have this album on your ipod.

So what is it exactly that makes computing more fun? More fun than what, I hear you ask... What do you think, is it more fun to compute?

Also, either tomorrow or Monday, I'll post the bitbucket Mercurial repository for the web.py presentation at PYPTUG that I'll be doing on Monday. In the interim, go ahead and install web.py. I have the instructions on the sidekick page. Basically:

pi@raspberrypi ~/Desktop $ sudo easy_install web.py
Searching for web.py
Best match: web.py 0.37
Processing web.py-0.37-py2.7.egg
web.py 0.37 is already the active version in easy-install.pth

Using /usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg
Processing dependencies for web.py
Finished processing dependencies for web.py


If you've gone through the PyHack workshop #01, you already installed mercurial (hg). If not, you will need to install it on your Raspberry Pi before you can get the code:


pi@raspberrypi ~/Desktop $ sudo apt-get install mercurial

Friday, November 9, 2012

Peritel SCART

J'ai reçu une requête sur ce qu'il faut pour brancher un Raspberry Pi a une télévision a tube (en France) qui n'a pas d’entrée vidéo RCA.

Beaucoup de télévisions (avant HDMI) en France (et en europe) avaient un connecteur Péritélévision (Périphérique de télévision), plutôt qu'un connecteur RCA composite. C'est aussi connu comme SCART ou EuroSCART.

Mes instructions (day 3: vidéo) posent donc un problème. Il faut un adaptateur, comme celui ci.

Cote télévision
Vers le raspberry pi

Pour l'audio, il faudra donc un autre adaptateur, RCA stereo a mini jack 3.5mm, lui aussi stereo (voir aussi l'article day 3)

Adapteur SCART et audio
Ca se trouve facilement.

Il faudra aussi modifier config.txt pour y inclure le mode PAL (sinon ca sera NTSC, et on se retrouve avec une image en noir et blanc):

sdtv_mode=2

Thursday, November 8, 2012

Packman

If you've already installed RISC OS RC5 on your Raspberry Pi, you do not have to burn a new SD card with dd to get RC6. You can use PackMan.

A.K.A. Pacman meet Cyrano de Bergerac

I thought you said Puckman


!PackMan is the package manager for RISC OS. It will connect to a repository and download your selections, or perform an upgrade.

Bundled apps, including !PackMan
The Packman user guide is here:
https://www.riscosopen.org/wiki/documentation/show/PackMan%20User%27s%20Guide

Note that after the upgrade, your config.txt will be overwritten, so if you made modifications (for the hdmi modes or the memory split), make a note of them.

Nut Pi for RISC OS

RISC OS Open is bringing some interesting things to the table as far as the Raspberry Pi and RISC OS is concerned.

They have a package of commercial software for RISC OS, specifically designed to run on the Raspberry Pi, at a discount.

What is cool is that it comes on a Nut Pi branded SD card (a usb key might have been better, in order to transfer to the Raspberry Pi, but still, nothing a card reader cant fix).

It includes Photodesk 3.12 which retails by itself for £84: Photodesk. It also comes with 19 other software programs originally for the Acorn computers.

The Nut Pi SD card is available here: https://www.riscosopen.org/content/sales/nutpi, for £35.

My suggestion for RISC OS Open: add a link in other currencies. In particular in US dollars.

Monday, November 5, 2012

Retro computing kit

So apparently, the Gertboard is not going to be made available as a kit anymore. I'm glad I built one kit and I still have an unbuilt kit.

But that doesn't help you. You wanted to do some soldering.

Well, if you dont mind doing something that is unrelated to the Raspberry Pi, but always wanted to build your own complete computer from a kit, then over on kickstarter, David Griffith is trying to get another run of P112 boards and kits going. He is a little over halfway funded, with 1 week to go. Check out the video:


The P112 Single Board Computer Kit is a little 8 bit retro computer based on the Z80 (actually a Z180). Many computers from the golden era of howebrew and personal computing ran a Zilog z80, such as the RadioShack TRS-80, the Osborne, the Kaypro, Sinclair ZX series, Amstrad CPC. It was also used in some musical instruments, such as my Sequential Circuits Six-trak and E-mu emulator.

There was a previous run made around 2008, and before that, probably about 1996. It is capable of running zdos, cp/m and uzi, the unix for z80. Some software available at Sourceforge.

So, head over to kickstarter and check it out. The full kit will also require a 5v power supply and a 3.5" floppy disk drive.

Disclaimer: I have made a contribution as a backer, but beside that, I have no financial interest in this project.

Wednesday, October 31, 2012

Imprimer son boitier

Il existe des douzaines de boitiers pour le Raspberry Pi sur le marche. En acier, en acrylique, en thermoplastique, en polyvinyle, en bois, en aluminium, en cuivre, et, pourquoi pas, en papier!

L'avantage ici, c'est que c'est gratuit, si on a une imprimante. Attention toutefois aux marges et au type de papier. En effet, certains des PDF sont pour le format A4 et d'autres pour US Letter. Il faut donc faire un ajustement des marges etc si on n'a pas le bon papier.

Punnet


Il y a plus d'information ici: http://www.raspberrypi.org/archives/1310
et un PDF.

A ciel ouvert


Et un coup de crayons a colorier
Autre variation sur le boitier en papier:
http://www.iammer.com/raspi/case.html
Et le PDF A4

 C'est clair





Celui-ci est une variante en papier acétate transparent:

http://h2database.com/raspi/
Et le PDF.

Mimétisme


Micro BBC Micro en papier
Et celui-ci une imitation d'un BBC Micro:
Raspberry Pi BBC Micro paper case
Et le PDF.

Je vous suggere de cliquer sur le label riscos a droite si vous voulez en savoir plus sur le BBC et RISC OS, et aussi cette file de messages sur le forum Raspberry Pi.

[edit: l'image du Punnet n'etait plus disponible a l'URL original]

@f_dion

Monday, October 29, 2012

RISC "Laptop"

RISC OS
Motorola RISC OS Laptop?
BBC(!) News

Touchpad

RISC OS

Acorn Proton


Que es? Al principio de los anos 80, el Acorn Proton paso de computadora obscura, un prototipo, a un de los mas famosos ordenador, a causa de la BBC. La máquina fue lanzada como el BBC Microcomputer (Beeb Micro), especialmente para ponerles en las escuelas. Fueron vendidos casi 1.5 million de machinas durante 12 anos, la mayoría en Europa. En los Estados Unidos, el Apple ][ fue sin competición en las escuelas.

Hay muchos detalles en wikipedia.

Acorn Archimedes


En 1987 empezó el Acorn Archimedes y el BBC Archimedes . Fue el primer ordenador personal con CPU RISC ARM de 32 bits.

RISC OS

RISC OS es el sistema operativo de los computadores Acorn con CPU ARM. El Raspberry Pi también es basado en el CPU ARM, y es posible ahora de utilizar RISC OS con el Pi.

Hay una pagina en ingles aqui

Preparación


Descargar el OS aqui: riscos-2012-10-16-RC5

Ponerlo en una tarjeta SD con dd. Si la instalación es directamente de un Raspberry Pi con el OS Raspbian, ver este articulo: autoreplicación.
Pero en vez de:
sudo dd bs=1M if=2012-09-18-wheezy-raspbian.img of=/dev/sda 
hay que hacer:
bunzip2 ro519-rc5-1876M.img.bz2
sudo dd bs=1M if=ro519-rc5-1876M.img of=/dev/sda

Cual sea el sistema operativo, el GPU busca el fichero config.txt. La definición se encuentra en elinux.

Raspberry Pi con tarjeta SD RISC OS
Al iniciar
Boot de RISC OS

El escritorio (1920x1080)

Hay mas detalles tambien en el sitio http://www.riscosopen.org, pero en este momento no es posible connectar al sitio.

Documentacion de RISC OS en el sitio: http://foundation.riscos.com/Private/

Foro RISC OS de raspberrypi.org: http://www.raspberrypi.org/phpBB3/viewforum.php?f=55