Archive for November, 2007

12th Nov 2007

Installing Qosmic on Ubuntu

It took some doing to install Qosmic (a flam3 fractal generator) on Ubuntu, so i figured i’d package it up into a simple little bin file.
Download as text

sudo apt-get install libqt4-dev libpng12-dev libjpeg62-dev libxml2-dev expat
wget http://students.washington.edu/bitsed/qosmic/public/qosmic-1.1.2.tar.bz2
tar -jxvf qosmic-1.1.2.tar.bz2
cd qosmic
./build.sh

For some examples of what Qosmic (and flam3) can do, head over to my deviantArt gallery.

Posted in c, ubuntu | 3 Comments »

12th Nov 2007

Whistling

I’ve seen a bunch of questions on forums asking “how do you whistle loudly”. Here have been some of my answers:

– scrunch your tongue in the back of your mouth (the sides of your tongue should touch the back of your top molars)
– put your two fingers (pinkies work best for me) nail facing back into your mouth, tips touching and touching the tip of your tongue. (your elbows should be sticking straight out to the side)
– blow.
– re-adjust
– blow.
– re-adjust
– …until you get a good sound.

good luck

I’v wanted to know how forever, and about a month ago, I learned!
Most of the whislting I can do (several different ways with my hands, with my mouth alone, with an acorn cap) is based on air going through a triangle. So the goal is to make a triangle using your fingers and your upper lip, and blow through it.

This is how I do it

Instructions:

    1. Choose which two fingers to use. (I prefer my left index finger and thumb, but choose what feels comfortable)
    2. Hold them to gether tightly (dont kill yourself, but be firm)
    3. Put them in your mouth till just before the top nuckle
    4. Press tip of tongue against joined fingers
    5. Blow as Hard as you can
    6. Adjust position
    7. Repeat steps 5-6 as many times as needed (hours, days, i dunno)

As i said, this works for me, so might as well try it.

Good Luck! Very Happy

Here are also some online links i’ve found:
http://www.natwilson.com/stuff/whistle.html
http://launch.groups.yahoo.com/group/Orawhistle/

Posted in how-to | No Comments »

10th Nov 2007

MandelBrot

I’ve been playing around with Mandelbrot fractals over the past couple of days, and ive come up with a pretty reasonable Generator (first written in python, and then in c for speed).
Source:

Setup:

  • Python: make sure you have python and pygame installed, then run “python mandelbrot.py”
  • C: (on linux) type “gcc mandelbrot.c -lm -lSDL -o mandelbrot”
    when that finishes, just run “mandelbrot”

Usage:

  • Click somewhere to zoom in.
  • right-click to increase the detail.
  • Ctrl-click to zoom out.
  • Ctrl-right-click to decrease the detail.

Compiled for Ubuntu Feisty Fawn
I took a bunch of screenshots of my program at various zooms (Flickr page)
Here are my favorite:






Posted in c, python | No Comments »

08th Nov 2007

Onbeforeunload

If you have an ajax application and dont want the user to leave (w/o saving, of something), you can alert them to this with the onbeforeunload window attribute.

window.onbeforeunload = function () {  return "You have unsaved changes. Really leave?";}

Posted in ajax, javascript, web | No Comments »