It’s been a while since the first post about the lightmapping tool (even the name evolved to a more general one ;) ) and I handed out the system to Unity a week ago. Now the mentors are making from it a neat package and adding some example assets and I myself am making the documentation better and trying some weird stuff to make the system working even better.

I don’t want to make a false start so I won’t post the final Unity package till it’s not on their website but I’ll share a lightmapping example with you that with probably be in the system documentation.

 

The scene before lightmapping

img7

Using the tool you can prepare lightmap texture atlases in Unity, simply by dragging the objects to the chosen lightmap.

img9

Once you’ve chosen your objects press “Export Scene” button

imgA

The scene gets exported to 3dsmax (also with Unity lights), where waits for you the External Lightmapping Tool helper.

After you adjust the scene lightning in 3dsmax, this little tool will render and save the lightmap textures to your Unity project directory and apply the lightmaps automatically.

In 3dsmax you can use regular “CTRL+S” shortcut to save your materials and lightning for future changes

imgB

After the rendering is complete you can come back to Unity and see the results.

imgC

Whenever you’ll have to rebake your scene (objects or lights in scene moved), just press the “Export scene” button again.

imgA[1]

The tool will reload the scene in 3dsmax at the point you’ve leaved it at last save.


win7xp copy

It’s some time since my post about Fedora & Vista dual boot using the Dell Media Direct button and I’ve realized that I don’t use linux at all.

It’s not that I don’t like to – I would love to switch to another more customizable system, but I can’t. Windows binded me with too many applications, 3dsmax, visual studio, Unity- just to name a few and it’s enough to make me stay.

It’s not that hard to setup this dual boot, but one false step can lead you to broking the Master Boot Record and data loss. This guide should protect you from such mistakes, however I still do not take any responsibility for the damage that can possibly be done :P

1. Get needed tools.

2. Get rid of the media direct partition (not really needed, but why to keep it? :) )

3. Partition your HDD in some wise way, like: partition1 – Windows XP , partition2 – Windows 7, partition 3 (extended) – data

4.  Install Windows 7 to the desired partition

5. Run MBRWiz, hide the Windows 7 partition and make the Windows XP partition active, look here for examples how to do that: http://mbrwizard.com/examples.php

6. Install Windows XP to the desired (active) partition

7. Unhide Windows 7 partition

8. If you’ve downloaded GParted then run it and note the partition indexes of Windows 7 and XP (numbers shown after …\sda). If you didn’t download it and you’d like to use a trick then probably you’ll get it working by adding 1 to the indexes shown by MBRWiz – note them somewhere

9. Insert the Dell Media Direct CD, while being on Windows XP and using command line navigate to your CD drive and write: rmbr DELL X Y where X is the index to the system partition which you’d like to run when pressing the regular power button and Y is the index to the system partition which you’d like to run when pressing the Media Direct button

That’s all, enjoy your dual boot dell laptop.

There’s also a way to sync the application data between those two systems so you don’t have to install the applications twice, but I’ll either refer to my friend article when he’ll write it or write it myself someday.


I’ve changed a little bit the list for last week

Last week:

  • Automatic setting the lightmaps accordingly to their name as soon as they appear in Asset folder
  • Basic batch render script for 3dsmax, which opens max and renders&saves all lightmaps (yet hardcoded)
  • A solution for applying materials, and setting up lightning have been overdiscussed
  • An option for changing shader to lightmap-enabled one was implemented in the object list
  • Handling objects that are not ready for baking (non-valid uv2 map)
  • Lot of bugs have been repaired and code was send to the mentor for a review

render

(The Unity light is turned off :P )

scene

Some first results – scene was setup in Unity and exported using my tools to 3dsmax where it was baked

Next week:

  • Implement an option for exporting default Unity lights
  • Research, for an optimal, most universal and non-roadblocking solution for loading preset lightning and other settings to an external app which will be doing the rendering (thinking about further development)
  • Implementing some of the advanced options
  • Developing batch render script for 3dsmax
  • Development of some small tools for helping users which uv2 seems not to be perfect correct (scale or offset)
  • Code optimization, bug removal and probable reorganisation (depanding on Lucas review)

THIS WEEK SUMMARY:

  • The main core with GUI has been done which contain a following options:
  • A dynamic list of lightmaps (shown as buttons)
  • Simply hierarchy display list for currently highlighted lightmap
  • Most necessary options “Pick selected objects”, “Clear list”, “Export FBX”
  • Optimal UV Packing:
  • the size of lightmap spot for an object depands on its surface area
  • the algorithm additionally “removes empty spaces” from each UV map in packing procedure
  • The algorithm repeats itself with smaller sizes if packing the objects on the given lightmap area failed
  • ASCII FBX Exporter (working mesh, material and uv export – with a small smoothing issue)
  • Tested the exported fbx files in 3dsmax and Modo

FOR THE NEXT WEEK:

  • Automatic setting the lightmaps accordingly to their name as soon as they appear in Asset folder
  • Batch render script for 3dsmax
  • Exporting with scene preconfiguration for 3dsmax
  • An efficient solution for applying materials in 3dsmax
  • Some tools for intelligent batch shader switch on the objects which will be lightmapped, but currently don’t have a lightmap-enabled shader
  • Finding and eliminating current bugs

After some consideration I decided to change the name for a moment to make it less confusing for other people, because the project indeed is focused on the connection between Unity and Vray over 3dsmax, but the main core will allow everybody to use it for their own purpose with any software with a FBX importer and rendering system supporting UV’s on channel 3.

After a few days of work I’ve written the main core of the FBX Exporter which now allows to export any mesh objects, with their textures and for the moment – a UV on channel 1.

At first I was a little feeling a little uncomfortable when I’ve discovered that Unity splits vertices’s, however for my current project it wasn’t such a big deal. Accordingly to the assumptions the scene should be ready for baking on the export time, so I don’t have to really think about all those additional vertices’s that will show up in 3dsmax until it looks properly.

Later I’ve been a bit impressed in how sophisticated way was the Unity API designed – it really makes writing for it easy and comfortable and that’s something I would not say about Autodesk FBX documentation, because there’s no documentation at all and the most of my time I spent on endless experiments, trying to figure how things work there inside. I still cannot say that I figure out everything cause I’m having a little smoothing problems and I didn’t test it with other objects that won’t be attached as one mesh.

At the moment I would like to give a few tips to anybody straggling  with FBX in ASCII mode.

  • At exporting UV’s from Unity to FBX be set the “MappingInformationType” to “ByVertice” and “ReferenceInformationType” to ”Direct”
  • Most of the properties supported by the object in an FBX file aren’t needed when you want just import it to 3dsmax, just be sure to left 6-7 last properties
  • When exporting a reference to a texture there’s no need to export Video objects connected with them.
  • 3dsmax importer is tolerable when it comes to file paths, you may use “/” as well as “\”

I’ve also researched other areas like UV packing in Unity, running from command line and lightmapping in 3dsmax.

As it turn’s out, one can get a really fantastic results will well adjusted materials.

Below you can see a simple scene without any Unity light (not well unwrapped though) which shows the difference between lightmaps rendered with objects that contained bumpmaps in their materials and those which don’t.
On the bumpmaped I’ve added a little reflection to the floor and as you can see it became rendered pretty well too.
adjusted


Yesterday I’ve received an information that my proposal (+ video) which I sent for Unity Summer of Code contest was accepted and I’m really excited about the system development :)

Basically the system is automating the bake process for Unity powered games using a powerful rendering software VRay.

The Unity team proposed a bit different workflow and not all the original ideas will be implemented as the part of the system. It was rather clear that it would happen since the ideas I described were indeed invented rather quick for a game which I’m working on with my team (no further details now :P )

Nevertheless I’m very happy with the changes proposed by Unity team and those which came after the talk with my mentor Lucas Meijer. I think that it’ll all make the lightmapping process in Unity really simple and effective.

I didn’t setup my goals yet, since I want to be rather sure what exactly can be done in those 6 development weeks, but since many of you may be interested in the details I will often blog here information about the development progress and plans – starting from today. Feel free to submit here your ideas in a form of comment :)

Here’s the scratch of the workflow made by Joachim Ante:

From the end-users artwork we simply require:
* At import time per object unique uv’s are required (normalized to a range of 0 …  1)
[As a first step, we can just require the user to provide it, or we could automatically generate them later on]
The lightmapping process works in 5 steps:
1) Go through the scene and pack rectangle UV coordinates into a texture sheet
They can be stored in the renderer using lightmap tiling and offset: http://unity3d.com/support/documentation/ScriptReference/Renderer-lightmapTilingOffset.html
2) Create an FBX file from Unity scene. Export both the primary and secondary uv set with the packed UV coordinates.
This means that we “offset-scale pack”  the per object uv’s we have, into a new “baked uv sheet”. (FBX supports Ascii mode, so it’s quite easy to export)
3) Launch Max from inside Unity through the commandline batchmode interface, automatically open the exported FBX file and start the lightmapping process
4) Once the batchmode completes, Unity imports the textures and applies them to the renderers using the Lightmap Settings class and renderer.lightmapIndex.

From the end-users artwork we simply require:

* At import time per object unique uv’s are required (normalized to a range of 0 …  1)

[As a first step, we can just require the user to provide it, or we could automatically generate them later on]

The lightmapping process works in 4 steps:

  1. Go through the scene and pack rectangle UV coordinates into a texture sheet. They can be stored in the renderer using lightmap tiling and offset: http://unity3d.com/support/documentation/ScriptReference/Renderer-lightmapTilingOffset.html
  2. Create an FBX file from Unity scene. Export both the primary and secondary uv set with the packed UV coordinates. This means that we “offset-scale pack”  the per object uv’s we have, into a new “baked uv sheet”. (FBX supports Ascii mode, so it’s quite easy to export)
  3. Launch Max from inside Unity through the commandline batchmode interface, automatically open the exported FBX file and start the lightmapping process
  4. Once the batchmode completes, Unity imports the textures and applies them to the renderers using the Lightmap Settings class and renderer.lightmapIndex.

Here’s a short summary from the discussion with Lucas:

  • Our main goal is to “unchain” the baking process, so that one can modify the scene in Unity as much as he wants – and in every moment start the bake process (possibly several times during the work over the scene) before, the user were pretty much blocked to do changes in the imported model inside Unity
  • We’ll test the system with max and vray, but it should work with any fbx reading, lightmap creating program with some additional work
  • The user would have a choice (by selecting objects from list) which objects are meant to take part in the bake process. On the selection list will be placed combo boxes  beside each object, to make user choose a lightmap-enabled shader.
  • The scene is being exported into ascii-fbx file and then imported into 3dsmax. During the exporting process we set the 3rd channel uv using the existing (second?) channel uv which will be scalled and offseted. (We will demand an unwrap uv on second channel from the user for the beginning – later on it may be created automatically for him) [credits: Joachim Ante]
  • All the UV’s will be packed to a single or a few big texture sheets – a benefit in performance
  • We’ve got an idea to make vray materials assigning automatically according to the material name from unity – that would help the designer in preparing the scene to the baking process (when one doesn’t use any keywords in the material name in Unity then the default vrayMtl with a diffuse map (eventually in bump map – if it makes sense) will be assigned.
  • The light setup in 3dsmax is not yet outvoted – although we’ve got two conceptions:
    • The vray-lights are being created dynamically on the image of the lights created in Unity
    • We leave the light setup to the 3d artist so he can import a light rig to the scene and then bake
  • After the baking process is done the materials in Unity stay unchanged, but using the LightmapSettings class the appropriate parts of the lightmap texture are assigned to them (there are a few issues waiting to be resolved)

We’ve also considered some nice icings as for example forwarding 3dsmax communicates and render progress to Unity or a possibility to choose a custom renderer – Mental Ray for instance.

Here is a simple diagram of how the things will work inside

Vray-Unity tools diagram


I was trying to get a matrix for a projection of any point to a line given by the following equotations:

x=at
y=bt
z=ct

After some time of research I’ve ended with the following result:
Let r=a^2+b^2+c^2 then
M=  \left ( \begin{matrix} a^2/r & ba/r & ca/r \\  ab/r & b^2/r & cb/r \\ ac/r & bc/r & c^2/r \end{matrix} \right )

Of course the result isn’t new at all, it was just a big efford for me to do that at midnight – so I guess it may be worth saving it here.


This post is meant to be a short introduction to a new science branch on my blog dedicated programming in Assembler.

One can think that the use of Assembler is deprecated these days, but there are still many reasons for a computer scientist to know this low-level language.

The primary reason to program in assembly language, as opposed to an available high-level language, is that the speed or size of a program is critically important.

For example, consider a computer that controls a piece of machinery, such as a car’s brakes. A computer that is incorporated in another device, such as a car, is called an embedded computer. This type of computer needs to respond rapidly and predictably to events in the outside world. Because a compiler introduces uncertainty about the time cost of operations, programmers may find it difficult to ensure that a high-level language program responds within a definite time interval—say, 1 millisecond after a sensor detects that a tire is skidding. An assembly language programmer, on the other hand, has tight control over which instructions execute. In addition, in embedded applications, reducing a program’s size, so that it fits in fewer memory chips, reduces the cost of the embedded computer.

Here is a picture illustrating the converting process for both high and low level languages.

Source for further reading: http://pages.cs.wisc.edu/~larus/HP_AppA.pdf


Today, I noticed an amazing and worth memorizing thing. I turns out that fibbonacci series shows up also in graph theory in one of the simplest graphs:

Interesting graph

Where’s Fibbonacci hiden here? Well, the graph can be represented as a folowing matrix:

M={\left[\begin{array}{ccc} 1 & 1 \\ 1 & 0 \\ \end{array}\right]}

By multiplying the matrix by itself and using induction we get: 

M^{n} ={\left[\begin{array}{ccc} FIB(n) & FIB(n-1) \\ FIB(n-1) & FIB(n-2) \\ \end{array}\right]}


It’s a trick  that makes posible to write polish characters on your mobile in Python editor using Nokia SU-8W. All that’s needed is PyS60 installed with appuifw2 module.

To write a polish letter press Alt Gr + Key, where Key is the usual key under which polish character is hiden.

Few things that I could not ommit – the letter “ź” is under key “q” instead of “x” and the capital letter “Ć” is under “W” instead of “C” 

Use with the default “UK, US English” layout.

And here’s the pys60 code of the editor:

#Coded by Ranza from Ranza's Research
#published using GNUv3
#http://masteranza.wordpress.com
import key_codes, e32, appuifw2
app_lock=e32.Ao_lock()

def exit():
    app_lock.signal()

appuifw2.app.exit_key_handler=exit

def capt(where,add):
    if (add>0):
        text.move(1, select=True)
        #a
        if (text.get_selection()[2]==u"\u00E1"):
            text.cut()
            text.insert(pos=where,text=u"\u0105")
        #s
        elif (text.get_selection()[2]==u"\u00DF"):
            text.cut()
            text.insert(pos=where,text=u"\u015b")
        #c
        elif (text.get_selection()[2]==u"\u00a9"):
            text.cut()
            text.insert(pos=where,text=u"\u0107")
        #e
        elif (text.get_selection()[2]==u"\u00e9"):
            text.cut()
            text.insert(pos=where,text=u"\u0119")
        #l
        elif (text.get_selection()[2]==u"\u00F8"):
            text.cut()
            text.insert(pos=where,text=u"\u0142")
        #n
        elif (text.get_selection()[2]==u"\u00f1"):
            text.cut()
            text.insert(pos=where,text=u"\u0144")
        #z
        elif (text.get_selection()[2]==u"\u00e6"):
            text.cut()
            text.insert(pos=where,text=u"\u017c")
        #z`
        elif (text.get_selection()[2]==u"\u00e4"):
            text.cut()
            text.insert(pos=where,text=u"\u017a")
        #A
        elif (text.get_selection()[2]==u"\u00c1"):
            text.cut()
            text.insert(pos=where,text=u"\u0104")
        #C, tricky one
        elif (text.get_selection()[2]==u"\u00C5"):
            text.cut()
            text.insert(pos=where,text=u"\u0106")
        #E
        elif (text.get_selection()[2]==u"\u00c9"):
            text.cut()
            text.insert(pos=where,text=u"\u0118")
        #L
        elif (text.get_selection()[2]==u"\u00D8"):
            text.cut()
            text.insert(pos=where,text=u"\u0141")
        #N
        elif (text.get_selection()[2]==u"\u00D1"):
            text.cut()
            text.insert(pos=where,text=u"\u0143")
        #S
        elif (text.get_selection()[2]==u"\u00a7"):
            text.cut()
            text.insert(pos=where,text=u"\u015a")
        #Z
        elif (text.get_selection()[2]==u"\u00c6"):
            text.cut()
            text.insert(pos=where,text=u"\u017b")
        #Z`
        elif (text.get_selection()[2]==u"\u00c4"):
            text.cut()
            text.insert(pos=where,text=u"\u0179")
        text.clear_selection()
        text.move(2)
text=appuifw2.Text(edit_callback=capt)
appuifw2.app.body=text
app_lock.wait()

Well this is not the best solution I’ve invented, but it’s all I could do. I’ve been searching all over internet for hours, trying things to make those characters work everywhere on the phone, but with no success.


Matrixes seem to have a lot of wonderful properties, for example they may help checking if given triangles represented each by three complex numbers (verticles) are simillar.

So, two triangles represented by complex numbers \omega_1, \omega_2, \omega_3 and z_1, z_2 , z_3 are similar if, and only if:

\det{\left[\begin{array}{ccc} \omega_1 & \omega_2 & \omega_3 \\ z_1 & z_2 & z_3 \\ 1 & 1 & 1 \\ \end{array}\right]} = 0

Proof coming soon.


purity True :) However I would put physicists a bit nearer mathematicans ;)


God damn. I took me about a half of an hour to Google that out…

 

Things to do to fix Visual Studio C++ Express (Probably in most cases you don’t have to delete those entries first. (worked for me)):

 

  1. Go to Start -> All Programs -> Accessories -> Run, and type “RegEdit.exe”
  2. Locate the following folder/key: “HKEY_LOCAL_MACHINE\SOFTWARE\Classes\VsWizard.VsWizardEngine.9.0″
  3. Right click -> Permissions -> Advanced -> Owner (Should be getting alot of “No permission to do that” likely-errors)
  4. Click one time on “Administrators”, then click “OK”.
  5. Expand “VsWizard.VsWizardEngine.9.0″, Right Click CLSID and do the same. (Do that to all subfolders which is under “VsWizard.VsWizardEngine.9.0″ aswell, if any.)
  6. Right Click “VsWizard.VsWizardEngine.9.0″ and click “Delete”, choose yes if you get an confirmation window.
  7. Right Click “VsWizard.WizCombo.9.0″ and set permissions for that folder and subfolders, and delete that one too.
  8. If everything went fine, you shouldn’t have any folder called “VsWizard.WizCombo.9.0″ or “VsWizard.VsWizardEngine.9.0″ anymore.
  9. Goto: Start-> All Programs -> Accessories, Right Click “Command Promt” and click “Run as administrator”.
  10. Navigate to your Microsoft Visual Studio IDE folder, by using the “cd” command. (usually “cd C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE”)
  11. Type “RegSvr32.exe VsWizard.dll”. You should get a window telling that you’ve registered that dll file (or something like that).
  12. Start RegEdit.exe again (if you haven’t), and locate to “HKEY_LOCAL_MACHINE\SOFTWARE\Classes\VsWizard.VsWizardEngine.9.0″. This should have been added again.
  13. Right Click -> Permissions, you should see “Administrators” and “SYSTEM” or something, click them both and enable Full Control and Read.
  14. Do the same for subfolders (should’ve been done automatically), and then do it for “VsWizard.WizCombo.9.0″ and subfolders, which should’ve been added again.
  15. Close RegEdit.exe
  16. Start the version of visual studio you have, create a new project, and watch how it works!

 

uff… I hate Microsoft software…



This short video intends to show you shortly how to use IdeaList application and how can it simplify your daily time management.

IdeaList is completly free and open on GNU v3 licence.
Feel free to download it from:
code.google.com/p/idealist/

Mobiola Screen Capture demo (not working quite well) was used to do this video so it contains some bugs. I’ve done a lot of cut’s and a speech synthesizer was used as a voice-over, so the final result doesn’t look as it was supposed to look.
I’m currently working on Wiki pages in Google code and documentation. Some new archives should be available soon too.
However I don’t know if I will be possible to simplify the installation for s60 phones. If someone have some good knowledge about those things and would like to help, please contact me.


The polynomial argument is a very useful fact which can be used in order to prove, or justify a statement.

It bases on simple fact that non-zero polynomial of k degree, can have no more than k solutions, futhermore the difference of two polynomials of k degree can also have max of k solutions if only those polynomials weren’t identical, then they have infinite numbers of solutions.

So how to use that fact?

Let me show an example, with use of extended Newtons binominal for all real numbers defined as:

{r \choose k} = \frac{r(r-1)...(r-k+1)}{(k(k-1)...(1))} \quad r \in \mathbb{R}, k \in \mathbb{N}

We will try to prove one of it’s properties using the properties of the normal binominal and the polynomial argument.

First, the folowing equality called the rule of absoption works for all real numbers r, k \neq 0 : {r \choose k} = \frac{r}{k}{{r-1} \choose {k-1}} . We will it into other form: k{r \choose k} = r{{r-1} \choose {k-1}} \quad *

Next you can simply check the property of symmetry of the normal binominal isn’t extendable to our extended definition of the binomial: {r \choose k} \neq {r \choose {n-k}} . However symmetry stays for all positive n values, so will call this propetry using symbol **.

Now the proper part, we’ll prove that (r-k){r \choose k} = r{{r-1} \choose {k}} for all real numbers r

Proof:

(r-k){r \choose k} =^{**} (r-k){r \choose {r-k}} =^{*} r{{r-1} \choose {r-k-1}} =^{**} r{{r-1} \choose k}

Now probably most of people would disagree, since for proving something for all real numbers I used a property which works only for the positive integers. Well they are right, the missing part is the polynominal argument: Look at the left and right part of equotation like on a polynomial of degree k+1 then using using the property of correctness of this theorem for infinite number of arguments r \in \mathbb{N} , we can tell that both of this polynomials have to be identical ■

Quite clever isn’t it?


The proof for the limit points of the sequence a_n = \sin{n} haven’t given me a calm dream untill today.

Of course the limit points of that sequence (almost intuitively) \in [-1;1]

Lemma.

\mbox{There can be found a sequence } n_k \in \mathbb{N} \mbox{ such that:}

\lim_{k\to\infty} \lfloor n_k \rfloor_{2\pi} =\lim_{k\to\infty} n_k - \lfloor \frac{n_k}{2\pi} \rfloor 2\pi = 0

Lemma proof.

\lfloor n \rfloor_{2\pi} = n-\lfloor \frac{n}{2\pi} \rfloor 2\pi \quad n \in \mathbb{N}

from floor function definition web have the following inequality:

0 < \lfloor n \rfloor_{2\pi} < 2\pi

Now we will prove that 

\forall_{n_0 \in \mathbb{N}} \Rightarrow \exists_{n_1 \in \mathbb{N}} \lfloor n_{1} \rfloor_{2\pi} < \lfloor n_{0} \rfloor_{2\pi}

Let \lfloor n_{0} \rfloor_{2\pi} = \alpha \quad \lfloor \frac{n_0}{2 \pi} \rfloor = k_0 \in \mathbb{N} where \alpha \in (0, 2 \pi)

So we have \alpha = n_0 - 2k_0 \pi

n_0=2k_0 \pi + \alpha

Let p = \lfloor \frac{2\pi}{\alpha} \rfloor \quad p > 1

so of course p\alpha < 2\pi < \alpha(p+1)

Lets consider n_{0}(p+1) = (2k_{0}\pi + \alpha )(p+1) = 2k_{0}(p+1)\pi + \alpha(p+1) =

= 2k_{0}(p+1)\pi + 2\pi + \alpha(p+1) - 2\pi = 2\pi(k_{0}(p+1) +1 ) +\beta

and look closer at \beta

The following is true 0 < \alpha (p+1) -2\pi = \beta < \alpha

It’s also simple to show (for example geometricly), that we can find such s \in \mathbb{N} that the following inequality is satisfied \frac{\alpha}{2} \leq s(\alpha-\beta) < \alpha

Now we will consider n_{1} = n_{0} + sn_{0}p \in \mathbb{N}

n_{1} = 2k_{0}\pi + \alpha + s(2\pi ( k_{0} (p+1) +1)+\beta - 2k_{0} \pi -\alpha)=

= 2\pi(k_{0}(sp+1)+s) + \alpha -(\alpha-\beta)s

From which \lfloor n_{1} \rfloor_{2\pi}= 2\pi(k_{0}(sp+1)+s)+\alpha - (\alpha-\beta)s - \lfloor (k_{0}(sp+1)+s)+ \frac{\alpha - (\alpha-\beta)s}{2\pi} \rfloor 2\pi =

2\pi(k_{0}(sp+1)+s)+\alpha-(\alpha-\beta)s-2\pi(k_{0}(sp+1)+s)

=\alpha-(\alpha-\beta)s \leq \alpha-\frac{\alpha}{2}=\frac{\alpha}{2}

And that means that for all k \in \mathbb{N} \lfloor n_{k} \rfloor_{2\pi} \leq \frac{1}{2^k} \lfloor n_{0} \rfloor_{2\pi} so \lim \lfloor n_{k} \rfloor_{2\pi} = 0  ■

Proof.

We’ll show that \forall_{s\in [-1,1]} \exists_{l_k\in\mathbb{N}} \lim_{k\in\infty}\sin{l_k} = s

Lets take \lfloor m \rfloor_{2\pi} < \beta - \alpha where m \in \lbrace n_k \rbrace and \alpha \in [0;2\pi), \beta \in [0;2\pi)

Then \exists_{k\in\mathbb{N}}{k}\lfloor{m}\rfloor_{2\pi}\in(\alpha,\beta) ( because the step is smaller then the range)

So when’ll take n=mk then

\sin{n}=\sin{mk}=\sin{\left(\lfloor m\rfloor_{2\pi} + \lfloor\frac{m}{2\pi}\rfloor 2\pi \right) \cdot k}=\sin{k\lfloor m \rfloor_{2\pi}}\in (s-\epsilon,s+\epsilon)

which satisfies the limit definition. ■


I would like to announce that my second PyS60 project called IdeaList is near it’s first alpha release!

Today I’ve done another milestone in it’s developement and I decided to no longer keep the project secret.

So what does IdeaList do? Why did I create it?

Simply because I believe that there’s nothing more precious than time.

Do you remember the default Nokia calendar? The awful times when you’ve got to correct there something quickly, but it took minutes instead of seconds?

Do you remember the times when you’ve had a terrific idea and you’ve noted it somewhere on your phone, but then you forgot about it?

Idealist was designed to be a solution for those problems!

So how does the IdeaList differ from other time management applications?

  • IdeaList is the first mobile non-colision day planner! That means the end with overlaping tasks and appointments
  • IdeaList interface is done using a timeline conception, that means that you see what takes at most of your time
  • Every event in IdeaList holds a referer to a todolist! That means that  you can simply checkout your project milestones by entering an event todolist, called an IdeaBox
  • Every event can be stretched and moved over days visually! No need to enter exact time!
  • IdeaList allows you to note your Ideas by pressing just one key!
  • Idealist analyzes the day and helps you entering your idea into the calendar, by highlighting the free spaces

It’s hard to explain all that it can do and how simple it is, so in few weeks I’ll add some Video demo’s how it works.

Other features:

  • Scheduled sms sending
  • Visual Reminders
  • Two move modes
  • The background gradient changes dynamicly every hour, so it becomes darker at night and lighter in the day
  • Events and Ideas are sort by categories
  • Every category has it’s own color which can be adjusted by the user
  • Minimalistic signal and battery indicators
  • Easy key shortcuts
  • ….

However still there are some small things to do…

Like:

  • Showing the new message alerts
  • Saving the config file
  • App Icon
  • Beta testing on different phones
  • Sis packing and signing

and of course optimalization, which takes the most of my time right now.


Today, I decided to post a very eye-catching method for calculating an integral which shows very often in Statistical Mechanics in Physics.

Let’s try to calc this \int\limits_{-\infty}^{\infty}e^{-x^{2}} dx

First let’s mark it with a name K , then

K^{2} = \int\limits_{-\infty}^{\infty}e^{-x^{2}} dx \int\limits_{-\infty}^{\infty}e^{-y^{2}} dy = \int\limits_{-\infty}^{\infty}\int\limits_{-\infty}^{\infty}e^{-(x^{2}+y^{2})} dx dy

What is just a double integral over the whole 2d surface. It can be also written in polar coordinate system as K^{2} = \int\limits_{0}^{\infty}e^{-r^{2}} \cdot 2\pi r dr  = \pi \cdot \int\limits_{0}^{\infty}e^{-t} dt = \pi

What means that K = \int\limits_{-\infty}^{\infty}e^{-x^{2}} dx = \sqrt{\pi}


It’s all I wish for now.

I stopped using Firefox, only thing in which ff was better was my del.icio.us bookmarks integration plugin.

Looking forward with esperanza.

This post will be destructed when my dream will come true.


After some trubles in doing dual boot and isntaling Fedora I decided to write this post so that other users won’t waste so much time as I did.

Firstly if you wan’t to have your remote control working on your XPS you don’t have to install Media Direct!

What’s more your remote will work on your Fedora as well!

So the biggest mistake you can do while reinstalling your system is to install the SHITY MEDIA DIRECT SOFTWARE!… but do not throw away the Media Direct Cd, we will need it later ;)

Here is how my installation process looked like.

  1. Install Windows (I have Vista 32 bit- however I’m angry for dell for not allowing to choose the 64 bit edition)
  2. While installing drivers try always do a restart after installing each driver!
  3. Start installation Fedora 9 64 bit
  4. Install it on a primary partition and make a SWAP partition at least the size of your RAM memory, keep on track on which partition the windows is and where linux is being installed. For example if you’ve got windows on hda/sda2 then your partition number is 2. Write does down.
  5. When you’ve got the Time Setup popup uncheck the “My system has UTC time” option
  6. While installing grub choose an advanced option to install it on the partition that you have linux, DO NOT CHANGE MASTER BOOT RECORD
  7. Once you’ve installed Linux go to Windows (You will not be able to boot Linux yet), put the Media Direct CD in your CD Drive but do not install or run it, instead run the cmd.exe on Admin rights and type: X:\DellKit\rmbr.exe DELL Y Z where X is your Cd drive letter, Y the Windows partition number and Z the Linux partition number.
  8. Boot from the Media Direct Button – Linux should start
  9. Install all the updates for your system.
  10. While rebooting you can have an ISSUE 1. and get the system hanged on displaing message “Decompress Linux Done. Booting the Kernel.”. to solve change the kernel argument from quiet to verbose at GRUB. Should work now
  11. The Ethernet, wifi and sound should work, except the sound is set to Headphones output – try it.
  12. Install the nvidia drivers.Go to http://rpm.livna.org/rlowiki/ and install livna repository rpm for Fedora 9.
  13. Type yum install kmod-nvidia in console at root privileges.
  14. Restart. Adjust your settings using nvidia-settings. You can turn on Desktop Effects now if you want ;) ISSUE 2. Sometimes the selection rectangle on the desktop is running slow – try reenabling destkop effects.
  15. Installing 32 bit flash player on Firefox 64 bit – download a normal rpm at adobe.com and after installing it run console at root rights and type: yum install nspluginwrapper.{i386,x86_64} libflashsupport.i386
  16. Now flash player should be working properly.

I will write more about installing hardware later. Currently I’m trying to change the shity media direct logo while booting Fedora.