Tuesday, August 7, 2012

Computer Science-Qt build update

Once again I misinterpreted a lot of what was written about the couldn't find Qt issue. The main parts are to ensure that Qt is completely installed, and to add this to the path.
PATH=$PATH:filepath/to/QtSDK/Desktop/Qt/4.8.1/gcc/bin
Once this is done, source it or restart your computer. Then you should be able to execute the commands correctly. For example to build XCode files you can use:
cmake -g XCode /filepath/to/src/

This should definitely allow things to work out on a mac. This location contains the correct bin, with the correct version of qmake, unlike the previous areas.

Computer Science-Qt Madde/PkgConfig

There has been an error I've been getting while calling Qt through cmake. It gives me the error Can't locate Madde/PkgConfig.pm in @INC. In order to help fix this issue, you have to make the pkg-config commands work under the mad environment. Thus in the ../QtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-20.2010.36-2-slim/usr/share/qt4/mkspecs/features folder you can find a file labeled link_pkgconfig.prf.

vi link_pkgconfig.prf

to open it

then edit it by adding the word mad before each instance of pkg-config like so.

mad pkg-config
I still don't know yet if this is necessary, but I've updated some help on building Qt http://ctluk.blogspot.com/2012/08/computer-science-qt-build-update.html

Monday, August 6, 2012

Linear Algebra-Isomorphic linear transformation

In order to determine whether or not a transformation is both linear and isomorphic we must check to see if it meets the following criteria:

In order to determine linearity, usually the following two properties are sufficient:
T(f+g)=T(f)+T(g)
T(kf)=kT(f)

In order to determine Isomorphism, we must check to see if the kernel of the transform is 0. Which also means for a given transformation T from V to W, the image is W, fulfilling the rest of the requirements for isomorphism. Thus we can just check to see if the kernel is 0 or non-zero.

Example:
T(M)=M |1 2|
             |3 6|
M=|a b|
     |c d|
|a+3b 2a+6b|
|c+3d 2c+6d|
=
|0 0|
|0 0|

We can then separate this into solving for a,b which will be replicated for c,d
|1 3 0|
|2 6 0|
a = -3b

This makes M =
|-3b b|
|-3d d|
Thus the kernel is nonzero, and so this is not an isomorphic transformation.

Computer Science-Qt Updated

This is an update to what I wrote previously, I was confused on the installation of Qt.

After installing the QtSDK, cd into it
cd /filepath/to/QtSDK
run the SDK Maintenance tool via command line or through explorer window
Complete install(This will take a few hours)
This installation does not complete the installation of the particular version of Qt you want to run.
This now creates a QtSources folder it will have all the versions of Qt you have downloaded listed here. 
Example used version 4.8.1
cd /filepath/to/QtSDK/QtSources/4.8.1
http://qt-project.org/doc/qt-4.8/install-mac.html
follow the installation instructions
Now there is the appropriate configure file. 

./configure
make
sudo make install

Then set the environment variables, you must extend the path.
pico ~username/.bash_profile
PATH=$PATH:/usr/local/Trolltech/Qt-4.8.1/bin

Now the installation is complete when downloading from sdk.

Saturday, August 4, 2012

Linear Algebra-Vector Spaces

A vector space is a set endowed with a rules for addition, and scalar multiplication. They must obey the following. For elements in the set f, g, and/or h.

1.(f+g)+h=f+(g+h) and c(kf)=(ck)f
This rule means that all elements in a vector space must obey the rules of association using both addition and multiplication.
2.f+g=g+f
This rule means that all elements in a vector space must obey the rules of commutation.
3.There exists one neutral element n in V such that f+n=f, which also denotes that n = 0.
4.There exists an element g in V such that f+g = 0. This denotes that for every element f there exists an element g which is equal to -f.
5.k(f+g)=kf+kg and (c+k)f=cf+kf
This rule means that all elements in a vector space must obey the rules of distribution.
6.1f=f
This ensures that a vector space obeys identity operations.

Physics-Twin Paradox

Most people have heard of the twin paradox. Two twins exist on earth, one twin goes into a rocketship that can travel at near the speed of light, while the other twin stays on earth. The travelling twin returns a few years later in his time and finds that his twin has aged into an old man. Now we know that there is time dilation by the above equation, finding Δt', that in and of itself is not the paradox. The question is how do we know which twin to apply the formula too? The reason being that although the twin on earth is "still", if the twin in the rocket is moving at some velocity away from the twin on earth, the twin in the rocket can say its the earth moving away from the rocket instead and that he is still.

However, this can be clearly seen if we draw the appropriate spacetime diagram for this situation. The twin in the rocket must have accelerated twice, once to reach the velocity to apply the dilation effect, and the other to change direction to head back towards earth. This breaks the parity between the two situations and the assumption that the twin in the rocket is in an inertial frame for the entire duration of the trip.

Thus the twin on earth is the one that must age more than the twin in the rocket as defined by the dilation effect.

Computer Science-GIMP

Gimp is an open source image editing tool, similar in functionality to adobe's photoshop. Thus its use is in image processing, in the creation and editing of images from a variety of sources. Images are treated as being in layers, capable of editing an arbitrary number of them to form a composite image. Gimp also has animation support through plugins. However the support for Gimp due to lack of manpower has caused releases to be unsynchronized for the different platforms it supports. Originally it was supported on windows, mac, and linux however the versions on mac and windows have fallen behind the linux releases.

http://www.gimp.org/
http://en.wikipedia.org/wiki/GIMP

Gimp also requires downloading XQuartz, which you can get here, or you can let the automatic download occur as part of start up.
http://xquartz.macosforge.org/landing/