Home »CV »Projects »Links

Projects

tux

This page is a collection of various bits of information, programs and promotion. There is also the deprecated-page, which has some old stuff that is now archived. One could argue, though, that also this page is largely deprecated :)

School Stuff

Free/Libre Software

In English

Suomeksi

Comments? See contact info.


Maya

A 3D production I did as a pair work: [excerpt from Citizen Kane] (Ogg movie, 35s) [models] (jpg)

Background: Done for the 3D Production course in 2003. My responsibilities included the cave, the gramophone, the oil lamp(s), modelling and animation of the dog, plus all about lighting, rendering and assembling/editing. 'excerpt from Citizen Kane' is the movie clip, 'models' shows a close-up of some of the 3D-objects. Maya 4.0 was used for the actual work, the final assembling was done with little Python and shell scripts for ImageMagick and (later) Ogg Theora encoder.

Note: to see the movie you need a video player capable of playing Ogg videos (Theora/Vorbis) - any player on Linux or BSD works, on Windows you need to install the Ogg Codecs first. On Mac OS use eg. VLC.

Screenshot of the Maya 3D-animation
Screenshot

OpenGL w/ C++

An OpenGL cross-platform shootemup game: [screenshot1] [screenshot2] [download]

Background: Done as a pair work for the Computer Graphics -course in 2002. Binaries only (x86-Linux/win32/sgiO2). I coded my part in Linux with gcc and emacs, occassionally testing on the target computer (O2).

Screenshot of the OpenGL game
Screenshot

Director

My first (and only) attempt with Director: [silly little game]

Background: Done for the Multimedia Tools -course in 2002.

Screenshot of the Director game
Run the game

Java

A 3D labyrinth with unlimited customization/size of maps: [screenshot1] [screenshot2]

Background: An assignment I did on my first Java course in 2000.

Screenshot of the Java game
Screenshot

Converting audio to Ogg format (Ogg Vorbis)

Note: GNOME SoundConverter seems to be easy to use, GUI audio converter for these kind of needs.

New: I'm nowadays using my own Perl script for converting Ogg Vorbis, FLAC and MP3 files to (tighter packed) Ogg Vorbis for usage on a mobile music player

Converting videos to Ogg format (Ogg Theora / Ogg Vorbis)

Note: Better tools than mere scripts are available nowadays. See eg. OggConvert, ffmpeg2theora and Thoggen.

With the bitstream freeze of Ogg Theora video codec, there's finally a possibility to start fully using free video and audio formats using the Ogg container (a file with .ogg-suffix), Ogg Theora video codec and Ogg Vorbis audio codec for encoding videos. Currently, the availability of encoders for the Ogg Theora is limited to an example encoder provided by the libtheora source code package. Furthermore, it's not included in many of the libtheora packages around the web.

The 2ogg.sh has usage information in itself, but here they are, too:

2ogg.sh 0.01i - converts video files to Ogg format (Theora/Vorbis)

Usage: ./2ogg videofile.ext outputfilename.ogg [vid_qty] [aud_qty] [scale]

* vid_qty: Video quality, 0-10 (default: 6)
* aud_qty: Audio quality, 0-10 (default: 3)
* scale: Scale in x direction, 0-3000 (default: keep scale)

You may also want to check process on Dirac, another completely free video codec that is very promising.

Linux and Graphics Cards

While most of Linux is developed entirely as open source, graphics cards vendors have had a tendency to develop closed source drivers, which do no integrate with the rest of Linux system causing problems to end-users and binding users to specific platforms (x86) and Linux in general (eg. BSDs don't enjoy even that level of support from vendors as Linux)

If you wish to have a system consisting of purely free software, or you do not have a choice (you are using eg. Macintosh (PowerPC) with Linux or BSD installed), your best choice performance-wise is one of the ATI cards supported by open source drivers. If more mediocre 3D performance is enough for you, your best choice is currently Intel (or perhaps Via) integrated graphics which have high quality open source drivers.

Below is a list of (post-2001) graphics chipsets and the level of working open source drivers for them:

Graphics vendorModels2D3DTV-OutWhere
ATI/AMDRadeon 7000-9250YesYesYesIntegrated in X.org/MESA.
ATI/AMDRadeon 9500-X1950YesYesYesIntegrated in X.org/MESA. Originally 3D reverse-engineered so it's not top performance. Now also specifications released by AMD, and drivers are being reworked.
ATI/AMDRadeon HD 2300 - HD 6990YesYesYesATI/AMD has finally opened the specifications and started funding development of free software drivers for these cards. More information in X.org wiki.
IntelAllYesYesYesIntegrated in X.org/MESA, developed by the vendor and the community.
NVIDIAAllYesSomeNoNouveau develops new accelerated 2D and 3D support by reverse-engineering, with no support from NVIDIA.
S3Chrome seriesNoNoNoSome closed drivers may or may not be available. Older Savage series have open 2D/3D drivers.
SiS/XGIAllYesSomeYesDrivers for SiS originally developed without much help from the vendor, but XGI Volari series 2D/TV-Out drivers were provided by the vendor. Some specs usable for 3D support have apparently appeared and drivers are being worked on.
ViaUniChrome seriesYesSomeYes3D support is being developed in the Mesa project, some specifications are known.

Speaking of ATI graphics cards, I once made and updated an attempt to clarify the overly cluttered naming convention of the Radeon-series of cards.

Openmoko / Free Software Mobile Phones

Since summer of '08 I've been participating in the "Free Your Phone" efforts via the pioneering Openmoko project and related spin-off/sister projects like FreeSmartphone.Org - and Debian as a method to bring it all together in a long term supportable fashion.

Most of the practical information is provided in the Openmoko wiki on my user page:

and lots of unsorted stuff at:

Some of the related projects include:

OpenOffice.org Basic

During getting familiar with OpenOffice.org I got interested in doing a simple feature with OpenOffice.org Basic. This proved to be a bit challenging because of the lack of good documentation.

The BASIC was problematic, because I found no information about how to actually interact with a document. The documentation, both in-program and on-line help, just was not meant to a newbie wanting to do a simple program. The key to the information is the API project. OpenOffice.org may be programmed with various languages via the API, also with the OOo Basic. There are two important links on the page: Programmer's Tutorial and Reference Manual. The programmer's tutorial is unfortunately for an older version of StarOffice, but is an important document as it's the only _tutorial_ available. Also, its examples are focused on StarBasic (which is mostly the same thing as the newer OpenOffice.org Basic). In addition to those two links, there's also the Developer's Guide, which is being cross-linked to and from the Reference Manual. Like Reference Manual, it's aimed for any kind of development with OpenOffice.org API, so it's not a tutorial for an ”Office programmer” (like I call it) either.

The tutorial contained the useful information amongst all the API-clutter that you can refer to the document where the BASIC-macro resides, with ThisComponent, so you can use e.g.:

Dim oDocument As Object
oDocument = ThisComponent

Going through the various pages of Reference Manual, I identified the submodules sheet, style, table and text as important for the basic office programming. Probably others, too, but I just wanted to do some formatting in my Calc-document. To make it shorter, an example follows:

Sub Main
Dim oDocument As Object
oDocument = ThisComponent

'To refer to a specific sheet (first one in this case is '0'):
sheet=oDocument.Sheets(0)

'To refer to a specific cells, I used this:
for i = 5 to 99
cell=sheet.getCellByPosition(5,i) 'OOo uses column,row!

'To get the formula out of the cell:
Dim text as String
text=cell.getFormula

'I parsed the formula to get the line number out (e.g. '$B20' -> 20)
'It's important to remember to initialize the variable as integer number
Dim line_nr as Integer
line_nr=Right(text,2)

'I had some cells in the document that are named (OOo Calc: Insert/Names)
'What follows is that I parse the contents of a named cell to have two
'numbers I need later on
Dim block_begin as Integer
Dim block_end as Integer
block="first_part"
block_begin=Mid(sheet.getCellRangeByName(block).getCellByPosition(0,0).getFormula,18,1)
block_end=Mid(sheet.getCellRangeByName(block).getCellByPosition(0,0).getFormula,30,2)

'Finally the code to do the change I was aiming for
If (line_nr >= block_begin AND line_nr <= block_end) Then
  cell.CharColor=8421401
End If

'(...some other similar code for other blocks...)

Next i
End Sub

I hope that sets you in right direction. You probably wonder about the color I set now. Another hard-to-find thing. Colors in OOo seem to be 24-bit integers (or 32-bit for alpha if wanted), with 8-bits for each of Red, Green, Blue. In order to convert a color to the correct format, you have to think it in web terms such as Blue=0000FFh and convert it to a 24-bit integer number - blue would become 255. As another example, turqoise would be 008080h in hexadecimal (0 red, 128 green, 128 blue in decimal numbers) and 32896 as an integer. The color used above is a shade of brown, 808019h -> 8421401. Just type the hexa-decimal in your favorite calculator and convert it to a decimal number.

I hope this text contained some of the essential information for starting your own experiments with OOo Basic. I didn't know anything about OOoB programming before-hand, so I just tried what worked. I haven't used BASIC since ZX Spectrum ;) Feel free to correct the mistakes, or if I've completely missed the ultimate easy-to-understand tutorial to simple OOo Basic programming. There's also another example of OOo Basic usage at OpenOffice Basic Macro for Calc - it's infinitely more complex/complete example than mine.


Avoimen lähdekoodin ohjelmistojen suomentaminen

Vapaiden ja muidenkin avoimen lähdekoodin ohjelmistojen saattaminen suomen kielelle on tärkeä ja jatkuva projekti, jotta suomalaisetkin voisivat valita vapaasti ohjelmistonsa luotettavista ja ei-sitovista vaihtoehdoista. Seuraavat suomennusprojektit ovat mielestäni erityisen tärkeitä:

Diplomityö LaTeXilla

Päivitys 08/2009: Kommentoi nykyään turhat ja toimimattomat kaksi ”PrerenderUnicode”-komentoa pois di.tex-tiedostosta. Lisäksi, nykypäivänä suositelluin LaTeX-ohjelmistokokonaisuus on TeX Live, joka toimii useimmissa käyttöjärjestelmissä.

Esimerkki-PDF

Diplomityöstä tulee hienon näköinen ja helposti hallittava kokonaisuus, kun sen tekee LaTeXilla. Opettelu maksaa siis vaivan moninkertaisesti, etenkin jos aiot tehdä tieteellisiä tekstejä jatkossakin. Omassa työssäni käyttämäni diplomityöpohja olisi tässä yhtenä pakettina: thesis_template.tar.gz.

Pohja perustuu Akustiikan laboration mallipohjaan ja Mikko Hämäläisen mallipohjaan (joka puolestaan perustui Petra Pietiläisen pohjaan). Lisäksi lainattiin T-111.500-kurssilta heidän tarjoama Harvard-tyylinen viiteformaatti (Sukunimi, 1900). Paketissa on esimerkkinä runko diplomityölle, sisältäen mm. abstraktit, viittauksia, kuvan, taulukoita, lyhenne-, kuva-, taulukko- ja viiteluettelot jne. Tein itse diplomityöni englanniksi, mutta pohjaa voi toki soveltaa suomenkieliseenkin diplomityöhön (tekemällä tarvittavat muutokset teksteihin).

Pohja antaa mahdollisuuden käyttää sekä pdflatexia että ”tavallista” latexia, vaihtaminen tapahtuu yhden kommenttirivin muutoksella. Itse käytin kuitenkin suurimmaksi osaksi pdflatexia, koska sillä sai parempien pdf:ien (hyperlinkit) lisäksi myös silmämääräisesti ihan hyvän näköiset tulosteet. Kaikki kuvat on molemmassa tapauksessa tarkoitus tallentaa valitsemastasi ohjelmasta .eps (Encapsulated PostScript) -muotoon haluamassasi (fyysisessä) koossa. Jos sinulle kelpaa pelkkä pdflatex, voit myös halutessasi suoraan käyttää sen tukemia png/jpg-kuvamuotoja.

Seuraavat diplomityön tekemistä helpottavat komentoriviskriptit ovat paketissa mukana:

Muita tärkeitä tiedostoja paketissa:

Diplomityöpohjassa käytetään oletusarvoisesti Unicode-syöttötapaa, mikä tarkoittaa että tekstieditorisi tulee olla moderni, ellet vaihda syöttötapaa. Mikäli olet Windows-käyttäjä, tulee editoriohjelman valintaan kiinnittää erityistä huomiota (esim. Unix-tyyppisten rivinvaihtojen hallinta).

Tein diplomityöni Linuxissa, valmiiksi mukana olleilla LaTeX-työkaluilla. Pohja toimii kuulemma yhtä lailla myös Windowsissa, käyttäen esim. MiKTeX-ohjelmapakettia. Myös Cygwin-ohjelmistolla LaTeX varmasti taittuu, ja saat toimimaan paketissa olevat skriptit myös Windowsissa.

Ubuntu Suomi

Ubuntu Suomi -logo

Ubuntu on helppokäyttöinen Debian GNU/Linux -pohjainen käyttöjärjestelmä, joka on suunnattu kaikille tietokonekäyttäjille. Ubuntu Suomi on yksi Ubuntun yhteisön ”Local Community” -tiimeistä, ja sen tarkoituksena on edistää vapaista ohjelmistoista koostuvan Ubuntun käyttöä kaikkialla Suomessa. Itse 'ubuntu'-sana tulee zulun kielestä ja tarkoittaa kutakuinkin ”ihmiseltä ihmiselle”.

Sivuilta löytyy yleistietoa Ubuntusta, tietoa Ubuntun (ja Linuxin yleensä) kääntämisestä esim. suomen kielelle sekä aktiiviset keskustelualueet.

Vapaa tietosanakirja - suomenkielinen Wikipedia

Suomenkielinen Wikipedia

Wikipedia on ilmainen tietosanakirja, jota voi käyttää kuka tahansa, ja etenkin johon voi lisätä informaatiota kuka tahansa. Helposti, ja anonyymistikin (ohjeita kannattaa kuitenkin vilkaista ja käyttää maalaisjärkeä, tekijänoikeuksiakaan ei saa rikkoa luonnollisesti). Kirjoitettuasi jotain annat tälle tietovarastolle oman panoksesi, joka on vapaasti kaikkien ihmisten saatavilla. Kukaan ei ”omista” tietoa.

Suomenkielinen Wikipedia toimii Wikipedian alasivustona, ja sisältää tietosanakirja-artikkeleita suomen kielellä. Toivoisin, että suomenkielisen Wikipedian lisäksi myös sen sisarprojekti Wikikirjasto saisi paljon innokkaita kirjoittajia.

vapaasuomi.fi: Vapaat ohjelmistot ja sisällöt

Vapaa Suomi

vapaasuomi.fi on pienimuotoinen linkkisivusto, joka kokoaa vapaiden ohjelmistojen ja sisältöjen suomalaisia sivuja yhteen. Usein vastaavilla muilla sivustoilla viitekehyksenä on esim. jokin tietty ohjelmajakelu, Linux tai yleensäkin ohjelmistot. Tällä sivustolla yhdistävä tekijä on vapaudet, jotka on annettu sivustolla mainittujen ohjelmistojen ja sisältöjen käyttäjille.

Aihealueina sivustolla ovat vapaat ohjelmistot, sisällöt, standardit sekä näiden tiimoilta erilaisia palveluita tarjoavat yritykset. Myös tapahtumakalenteri löytyy.