Saturday, 14 March 2015

Fractal surfaces - Genesis Of Chaos

The following video shows a result of my last year study on fractal surfaces:

It is based on surface modeling ideas that I already developed 5 years ago - as you can see in the very short video in the previous post. However, this time I have pushed the algorithm to its limits and optimized for deeper zoom levels and scaling factors. And yeah, video is longer too!
On a side note, as you can judge by the frequency of my posts here, I don't have much time lately for my spare time projects, but hey, I'm still doing "something".

Thursday, 28 October 2010

Fractal surfaces

I was working hard recently on a new fractal surface generator and renderer. It is based on my theoretical research in generating fractal surfaces. Here is a very short movie, the first test:

It is rendered in 3D (stereoscopy). Unfortunately YouTube doesn't support NVidia 3D Vision glasses. Anaglyphic looks ok though.

Saturday, 4 September 2010

Immortal software

Back in a good old MoonEdit days, when everything was brighter and simpler (I call it double sarcasm, those days are not over yet!), together with my friends I started a MoonEdit debate "Immortal software - a software that our grand-grand children will be able to not only run but to take advantage of its functionality". VM-based languages (Java, C#) and WORA (write-once run-anywhere) seem to be good enough for that purpose, but is it ?

I'm not going to talk about good old DOS days, DOS4GW, hardware registers and other weird things that was an obvious trap (but how many of your really thought of it when devoloping this way?). Maybe just one more sentence: all my old DOS software is practically dead. It's not that you cannot execute it at all (i.e. there is DosBox, although my software has still some minor issues in it), it's also the fact that the software is completely out of date. First of all it is not well integrated with a system, i.e. artificial memory limits (16bit addressing or just stupid constants in a code), no support for long file names or even no shared clipboard. Imagine using text editor for your daily notes that is still very good piece of software, but only runs in a DosBox. It would be utterly annoying. It's dead, end of story, with a little exception of games. Only a little, since user demands on realistic graphics grows almost exponentially here.

Now think about all this software made entirely for Windows 3.1, Windows 95 and even XP. It's already outdated in a Vista or Windows 7 - compatiblity issues (even with new compatibility mode, some applications simply crash at the begning). It's even worse that with DOS - at least DOS was "simple" enough to emulate (almost perfectly). Software developers are doomed again.

Just don't tell me open source is a solution - it is not. Being able to compile your code for a long time is not a trivial task. Compilers change, environment change, third party library versions change or are not supported anymore. It's also a trap!

Now we are finally approaching VMs. In theory it should be perfect: low-level instruction set is fixed (forever?), but there is still a little problem with environment and system libraries. User demands grow and we have frequent Java SDK and .NET framework updates. Nobody really guarentee there will be no compatibility issues for VM binaries. Engineers behind those technologies mostly concentrate on portability issues, not the immortality. It's even against economy! The biggest problem is with third party dynamic libraries. If you don't use "fancy" stuff in your code, you should be safe, but can you sleep well ?
I don't even want to go into things like JavaScript - it has compatibility issues even over various web browser.

As a conclusion I ask to myself a real, serious question - will my grand-grand children be able to execute and take advantage of any of my software or we, developers, are all doomed and be utterly forgotten?
I propose a new buzz-word, the direction for new immortal software movement: WOLF = wirte-once, live forever.

Thursday, 17 June 2010

How far optimism can go?

I was reading recently a lot about possible dangers to life on Earth. Just to let myself down a bit.
Let's concentrate on three threats: energetic crysis (fuel depletion), global warming (increased greenhouse gases level), and giant asteroid colliding with Earth ;-)
Energetic crysis is easy. We have measurable data how much oil we use, how much we rely on oil in comparison to other energy sources. We also estimated how big are our oil fields and reserves. The only doubt here is how many alternative sources or new oil fields we can discover in the future. However, we simply cannot predict that. Still, I've read that many people try to manipulate this data or lie about efficiency about alternative energy sources.
We won't get rid of people lying problem in any case. So let just forget about it for now, and move to global warming.

First of all, I feel that I'm not educated enough in natural sciences, to be able to tell who is right in global warming. I can only think in terms of potential cases.
Case 1:
Humans are contributing to global warming.
Under assumption that all computer simulations based on meterological and human activity data would be inaccurate, it is hard to proof that (unless we start World War III and stop human activity at all ;-)). The only proof can be based on measurements and statistical reasoning here. Which is what IPCC is doing.
Case 2:
Humans are insignificantly small contributors.
Even harder to proof. As some proponents of this case say, our data might not include all natural causes. Sure, but this is just putting into doubt, because of some unknown, which is pretty much "guilty, because there are not enough evidence that he is not" reasoning. But to be honest, both cases (1 and 2) in terms of pure logic can be like that, still the only evidence (and a lot of them) are for case 1. Also some anti-warmers tend to provide evidence that natural forces are much bigger contributors, this could be more reliable proof, still as far as I know, all of these were refuted.
Case 3:
The average temperature will actually decrease in near future. I don't know really much about climatology, so cannot say anything about that. I only heard it's very unlikely, because the trend is clear (not only growing, but growing faster and faster, it's harder to say how much it will grow though).
Despite you may see I'm slightly for IPCC, I must clarify that I'm really not sure. I think any conclusions here must be made by specialists. What matters are measurements and numbers you are making intepretation from, and probabilities you put into various scenarios, also since the process is very complex, you need very comprehensive set of measurements (and still you may be missing some).
However, I am always surprised some people (actually surprisingly many) have strong opinion that there is no global warming at all. Some of them tend to use simple logic to proof that (without telling any numbers, one of them is very annoying polish politician, known as JKM). There are also a lot of silly youtube movies trying to fit the data to proof whatever the author wants. I guess strong opinions are usually subject to psychological issues, manipulating or just so called wishful thinking.

Last (but not least) is asteroid threat. My favourite, cause it is so much unpredictable that it is funny (remember my "Cave The Movie"?). There is a NASA program to track dangerous astral objects that can collide with earth. And a lot of effort is done to predict trajectories accurately (but results are far from good enough). You may hear about Russia asteroid-defence program, in case the pessimistic scenario will happen. NASA seem to be more optimistic here.

The real question is, who knows if those threats are real threats or just paranoia ?
I think what could be the worse scenario is: we will do nothing about it and it will happen, all at once.
Again, what seem to be most important here is more and more accurate prediction techniques and monitoring. Who cares if it takes money and human resources ? We will be overpopulated soon, anyway : P

Thursday, 7 January 2010

2D is a special effect, 3D is not

Many people are talking about stereoscopic 3D technology now, thanks to Avatar The Movie, created by a bunch of professional CG artists, hardware and software developers. I want to add my 3 cents into it.
As a little kid I loved making 3D shapes (vehicles, cones, spheres, etc..) from cardboard. Imitating the real thing you may say. Recently, I had finally a chance to experience CAVE environment, it was quite new experience, even that I was already using stereoscopic setup for many years, after that, suddenly, the childish dreams returned!
I imagined myself holding my cardboard 3D car again, but in a more flexible environment. Virtual or not, it was real!
Some people would probably like to draw a car on a paper instead of making inacurate reality imitation. They usually have a very good talent to catch the very essence of reality and show it in a different form using their own stylization and augmentation, i.e. by leaving uninteresting details behind, enchancing key features, suggesting new, interesting point of view that we didn't think of. This techniques I consider as a stylization effect. You may increase contrast of your photo to make it more dramatic. Finally, you may use greyscale or even black and white stylization and concentrate on a message. Yes, it's a fact, greyscale/b&w movies are still in production. But nowadays it is not a consequence of immature technology, it is a special effect, a feature!
The very same analogy applies to 3D movies. As our parents were used to watch movies in greyscale (or some pathetic color hacks), we are used to watch movies in full-color, but still enjoy artistic sepia or b&w in some cases. You may not realize it now, but 2D is just a stylization as well. Do you know "pin hole" camera? It allows to overcome natural depth of field problems, sometimes photo makers are using something completely opposite - they try to maximize depth of field effect (making uninteresting things completely blurred). Our eyes suffer for similar problem - we cannot see sharp picture on every distance all at once. What is worse, the eye convergence doesn't help much here either, basically we see in a good quality only the object in focus. So 2D can be a reality augmentation effect - we can "cast" objects at various distances onto one plane and "see more at once". It is not exactly "more", because we are losing depth information, but it is a different point of view, just a stylization effect, one of many! (and the palette of such effects in 3D will even increase)
As a conclusion my prediction about 3D is like this: sooner or later (after technology will be more mature, no glasses, no headaches, etc..), most TV sets will be 3D, but some people will watch 2D movies still on them - as an underground/cool artistic stylization.

Tuesday, 1 September 2009

New York, New York...

This summer, I work with my friend Ken at Brown University. I'm in his home country first time, so we decided to visit as Frank Sinatra sings "New York, New York...", the so called Big Apple, and it was even close enough to get there (2-3 hours by train). And what do you think was the most exciting part for us in such anomalously big city ?
Geometry, of course!

We decided to go to Empire State Building observatory during the night, and it was the right thing to do, the city lights are just breath-taking! You can enjoy the full power of human civilisation in just one spot!
Now, I consider sunset to be even more exciting time to go, especially if you wait after it will get completely dark and lights start to appear slowly - as far as my imagination is right about it (just be prepared for a very long waiting line or simply pay extra fee for VIP pass through).
After listening to interesting audio tour with a lot of nice, but sometimes a bit fake/artificial impressions, like "I just looove this city, as a young boy I loooved to walk on Brooklyn Bridge, etc..." (similar style of making audio tour you can experience at Boston's Prudential Tower aka Skywalk Observatory), I noticed that, there are two interesting aspects you should take into account when developing... NY-like city generation algorithm.
Can you spot so called Flatiron Building on the photo ? This was the most inspiring example to me. Generally, I divided buildings into two categories: first contains bulidngs that shape fits into street design, the second category contains the rest (buildings that for some reasons, use inefficient amount of space - as Ken noticed). And what is apparent in New York, there are many buildings that efficiently and as many that are inefficiently occuping space between streets (and in general, there are too many of them ;)). Flatiron has sharp angle and is efficient, while there are some with angle more than 90 deg. (where Broadway cross Avenues at more than 90 deg. angle, just note the small building on the bottom-right), some are just square-shaped even if there is so much room around them. I was so excited about this discovery that I almost forgot to enjoy the view in ehm.. humanistic kind of way :)

Sunday, 17 May 2009

Politics is about software development

As a computer scientist I know how hard it is to predict some processes, that are defined by set of rules. Treating our political and economical reality as a mathematical model doesn't give us any simple answers - many things are still very hard to predict (global crisis is a cliche now, but kind of related to it). Also regulations seem to be like a code that you can't change easily when you encounter a bug.
Recently I've heard about the idea of social revolution. I can imagine, we could make a revolution by rebooting the social system. Rewriting it from scratch.
It sounds like a good idea at a time when nobody really believes in those regulations (global crisis again). So why not? It would be a new world order you may say (and no wonder some people say that global crisis is made up on purpose by illuminati ;P).
The only problem that bothers me is how to make a new system stable. There are several ways to do it that works in computer software reality. One way is the concept of beta-testers. At the cost of losing productivity of the most brave users, they try to work with betas and figure out most of bugs. In new social model you should never accept political products if they are not at least release candidates. How to organize beta-testing though ? You might select a good sample of citizens or institutions (i.e. if you plan to change some adminstration service regulations start from one or two districts, but not all of them) and upgrade their system to beta with full support if something will fail (emergency service). It is much cheaper to provide emergency service to just a sample, than whole society, right ?
Amazingly changes "on a living organism" are still the most common practice.
The other point is: maybe it's a new (safe!) way of making revolution (aka bigger changes) ?