Blockschema.se – soon at version 2.0

The Swedish academic education planner is soon at version 2.0. I just wanted to sneak out some information about what I am doing. I guess that’s what my blog is about!


NOTE: The schedule in the image above is only for a local demo. It is not public.

PROBLEM: Planning an academic education is hard. Especially when there are too many possibilities to shape the education as you like. At the same time as you pick courses that look fun, you have to keep track on how many credits you get within the set of categories in your exam.

SOLUTION: An open site that stores course information and can build block schedules for students.

The problem is for sure only existing in few of the engineering programs at Umeå universitet, but we will for sure find out when the site is released. If the need is not that big, the site can still be used by students and teachers that wants to build the actual schedules and/or get some education outline.

The first version of the site went not so well, it’s full of bugs and is hardly usable. Therefore, we decided to rebuild it from scratch, using pure object oriented programming and HTML5. I believe that this, together with strict error testing and documentation, solved our problems.

Blockschema.se 2.0 has got the following features:

  • Create any number of private block schedules
  • Add any course at any academic education (in Sweden)
  • Add course occasions for each course
  • Connect student email address to account – increase privileges to edit e.g. education info, program info etc.
  • Compare any block schedule to any exam
  • Public commenting on courses, educations etc
  • Uploading of files to courses
  • Public forum, one forum for each Course and one for each education
  • RSS feed/email notifications for listening to course updates etc

Remote bittorrent: Azureus HTML WebUI – Ubuntu

Sometimes I want to start a download on my home computer when I’m at work or somewhere else. There are many ways of doing this, but one of the most convenient ways may be to use the Azureus HTML WebUI. It sets up a small server and a web interface that you can access from any web browser.

I’ll show you how to make a typical setup in Ubuntu 10.10 and enable password.

First, install Azureus via terminal and then start it.

sudo apt-get install azureus
azureus

The most simple way to install the HTML WebUI plugin is via the Azureus GUI. Go to Tools > Plugins > Guide–Installation guide. It will help you install the plugin, should be straight forward and easy.

Restart Azureus via the main menu. The GUI disappears and then pops up again.

Open a web browser and open http://127.0.0.1:6886/ (or http://localhost:6886/ if you already had a web server setup on localhost). The Web UI should open and you can manage all your torrents or add new ones.

To set a password for the HTML WebUI, open the Azureus GUI and go to Tools > Settings. Click the little triangle to the left of “Plugins” in the left menu. Open the submenu !ConfigView.section.plugins.azhtmlwebui!. You should be able to set username, password and other useful things here.

Happy torrenting!

Notice: session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13)

When trying to start a new session in PHP on your Ubuntu web server, like this:

session_start();

Then you sometimes might get this:

Notice: session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13) in /home/steffe/public_html/fb2_log.php on line 185

The most easy way to solve this problem is very straight forward but quite ugly. By prepending @ to the function call, the function will never print out the error:

@session_start();

This will simply hide the error message, and I believe that this is what most people want.

If one looks deeper into the problem, one will find that there are permission conflicts between some packages in the server. There are more correct ways of solving this problem, but this was enough for me!

SceneJS, Three.js and PhiloGL – WebGL performance test

UPDATED POST HERE: http://granular.cs.umu.se/browserphysics/?p=7

SceneJS, Three.js and PhiloGL are three great scenegraphs for WebGL. But how well do they perform?

I did a small test to get some ideas on how well these softwares scale. What I did was a small application rendering N cubes, moving in a circle.

We can see that the FPS drops down below 60 around 600 cubes for Three.js and SceneJS. The corresponding number for WebGL without a scenegraph is 1000, and for the non-browser OpenSceneGraph (C++) it’s 3000.

Conclusions: We get a performance drop (~66 percentage units) when moving from OpenGL to WebGL. When using a scenegraph, we drop even more (80). I guess the web is not ready for heavy 3D graphics yet.

Usage notes: All of the scenegraph libraries have nice APIs. I like SceneJS the most because of its JSON-like API, it is very easy to learn because you can acutally see the scenegraph tree in the code. Three.js has got another type of API which is similar but uses no JSON. PhiloGL seems to me like some extra functions that helps you use native WebGL, the WebGL interface is not 100% encapsulated which makes it a bit harder to learn.

Tech notes: The tests were made using a desktop machine with an Intel i7 quadcore 2.8 GHz processor and 8Gb RAM. The operative system used was Ubuntu 10.04 (Lucid). The web browser used was Chromium 15 (I tried Firefox 6.0 also, its performance was about the same). When making these tests, I tried to cut down on the instanciations as much as I could to get more performance. The non-scenegraph test was made with pure WebGL with the support from webgl-utils.js and glMatrix.js.

WebCL + WebGL 3D physics simulation

I’ve been working on some new cool web development tools recently, including HTML5, WebCL, WebGL and Native Client. My job is to investigate the current (and upcoming) web standards that are interesting for 3D physics simulation in the browser. One thing that I’ve come up with is a 3D Cloth simulation, powered with WebCL GPU computing. Note that you need to run Firefox 6 to run it, as well as the WebCL plugin.

How to install WebCL and WebGL in Firefox on Ubuntu Linux 10.04

These are my notes on how to install WebCL and WebGL in Firefox 6.0 on Ubuntu Linux 10.04.

  1. Install Firefox 6 from http://firefox.com/
  2. Go to http://webcl.nokiaresearch.com/ and install the WebCL plugin
  3. Install libosmesa6 via synaptic or run sudo apt-get install libosmesa6
  4. Start firefox and go to the url “about:config”.
  5. Set webgl.force-enabled=true
    webgl.osmesalib=/usr/lib/libOSMesa.so.6
    webgl.prefer-native-gl=true
  6. Restart firefox
  7. Go to http://webcl.nokiaresearch.com/ again and run steps 3-5 to see if everything works.

If it doesn’t work, starting firefox from a terminal may help you. Runtime error messages from Firefox are displayed there.

Good luck!

Kumihimo generator

Edit: The generator app is finished! click here to view the generator.

image

I’m working on a new generator – kumihimo style. More specifically – I am programming an application that can produce images of patterns. I have gotten further than my previous attempts. I guess I was too eager to get in finished before, but this time I took each step very carefully. The Kumihimo tying technique is quite different from other techniques in many ways (such as normal and alpha). You make a bracelet by braiding in a kumihimo disk and keeping the strings in a specific order. How the colors map from the disk to the resulting pattern is more complicated than both the normal and alpha bracelets together. However, I got it right after a few hours of drawing on paper and debugging.

Thanks to the users of Friendship-Bracelets.net that uploaded some kumihimo patterns to the kumihimo tutorial. I used some of those to see that everything worked in the new generator. Here are some previews. They are not available anywhere but here (yet).

Have you done some Kumihimo and got some advice to me when designing this generator?  Please comment! I have just made one whole bracelet in my whole life.

The tech part of this generator is not that complicated. It is 100% PHP code that uses  the GD library to produce a PNG file. GD has got simple and few functions for drawing – but it is way enough for this kind of application, and it saves some load on the server.

I also worked some on a JavaScript version. I simply ported the code from PHP manually and created a jQuery plugin to wrap things up nice. Click the image below to try it out.

The next step is to integrate this generator into the site, and make it render pattern images when needed. Stay tuned for more updates!

Stefan