<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<?xml-stylesheet type="text/css" href="http://canmore.annwfn.net/blog/styles/feed.css"?>


<title type="html">Filed under: Programming | Canmore's Blog</title>
<subtitle type="html">Giving the voices in my head the opportunity to communicate with the outer world</subtitle>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog"/>
<link rel="self" type="application/atom+xml" href="http://canmore.annwfn.net/blog/archives/programming/index-atom.xml"/>
<updated>2009-10-21T08:51:48+02:00</updated>
<author>
<name>Canmore</name>
<uri>http://canmore.annwfn.net/blog</uri>
</author>
<id>http://canmore.annwfn.net/blog/</id>
<generator uri="http://nanoblogger.sourceforge.net" version="3.4">
NanoBlogger
</generator>

<entry>
<title type="html">Zooming, panning, rotating with GLUT</title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2009/08/26/zooming_panning_rotating_with_glut/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2009/08/26/zooming_panning_rotating_with_glut/index.html</id>
<published>2009-08-26T20:23:45+02:00</published>
<updated>2009-08-26T20:23:45+02:00</updated>
<category term="Programming" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">

<p>
	By pure chance, I stumbled over a true gem for all programming
	related to computer graphics: <a
	href="http://www.nigels.com/glt/gltzpr">GLT ZPR, a mouse
	manipulation module for C or C++ GLUT/OpenGL programs</a>
	(verbatim quote).
</p>

<p>
	The module is very easy to use: Simply <code>#include
	&quot;zpr.h&quot;</code> and call <code>zprInit();</code>
	<em>after</em> you called <code>glutCreateWindow</code> and have
	made your local initializations (i.e. special setup for the
	window etc.). Now you are able to use the left, right, and
	middle mouse buttons to rotate, pan, and zoom&mdash;just make
	sure that your <code>GL_MODELVIEW</code> matrix is not reset.
</p>

<p>
	You can download the program from <a
	href="http://www.nigels.com/glt/gltzpr">Nigel Stewart's
	homepage</a> (I am not linking directly to the sources because I
	do not want to be impolite). By the way: It is also possible to
	specify selection and pick functions, but I have not tried this
	functionality yet.
</p>
</div>
</content>

</entry>
<entry>
<title type="html">New OpenGL programs</title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2009/03/18/new_opengl_programs/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2009/03/18/new_opengl_programs/index.html</id>
<published>2009-03-18T21:57:03+02:00</published>
<updated>2009-03-18T21:57:03+02:00</updated>
<category term="Programming" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>
	I finally released some old code I wrote for a University
	course. You can find it in the <a
	href="http://canmore.annwfn.net/uni/#opengl">University section
	of my homepage</a>. The programs are not really special and
	well-written (as is mostly the case when assignments with short
	deadlines are concerned), but I polished them a bit, sprinkled
	some comments over them, and added a big portion of
	<em>love</em>.
</p>

<p>
	Something like that, anyway.
</p>

<p>
	Since it is not explicitly mentioned anywhere, you need the
	OpenGL and GLUT libraries in order to compile these programs. It
	might be necessary to change the library paths in the Makefile
	if you are not using FreeBSD, which is, judging from the
	server's log files, unfortunately most probable.
</p>

<p>
	Speaking of operating systems, a fun fact from the log files:
	Most of my visitors use Linux <em>or</em> Sun Solaris. Either
	that or somebody <em>really</em> has some fun faking the user
	agents.
</p>
</div>
</content>

</entry>
<entry>
<title type="html">comphom: A program to compute homology groups</title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2008/10/01/comphom_a_program_to_compute_homology_groups/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2008/10/01/comphom_a_program_to_compute_homology_groups/index.html</id>
<published>2008-10-01T17:37:02+02:00</published>
<updated>2008-10-01T17:37:02+02:00</updated>
<category term="Programming" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">

<p>
	I released a program that should have been added to this site
	quite some time ago: <b>comphom</b>. It is a simple demo
	application that computes homology groups from simplicial
	triangulations.
</p>

<p>
	People who have not yet heard anything about topology might not
	enjoy this as much as I do. Anyway, if you happen to stumble
	over any triangulation (such as those given by F. Lutz on his <a
	href="http://www.math.tu-berlin.de/diskregeom/stellar">Manifold
	Page</a>), comphom will compute the homology groups and write
	them to a file.
</p>

<p>
	The program is available in the <a
	href="http://canmore.annwfn.net/programming/#comphom">programming
	section</a> and the <a
	href="http://canmore.annwfn.net/uni/#comphom">university
	section</a> of my homepage. Whichever suits you. 
</p>

<p>
	Let me outline how to use the program (the program package
	contains a README which is slightly more precise):
</p>

<ul>
	<li>
		Compile the program via <code>make</code>. The Makefile
		should work for any POSIX-compatible operating system.
	</li>
	<li>
		Download a triangulation from the <a
		href="http://www.math.tu-berlin.de/diskregeom/stellar">Manifold
		Page</a> (use the outdated lexicographic format).
	</li>

	<li>
		Use the Perl script lex_convert.pl to convert the files
		into the format comphom understands: <code>perl lex_convert.pl
		--input &lt;file&gt;</code>
	</li>

	<li>
		Start comphom: <code>comphom --input &lt;file&gt;.ct [--output
		&lt;file&gt;.out]</code>
	</li>
</ul>

<p>
	 It is also possible to compute homology groups for arbitrary
	 triangulations. Just see the README for more information.
</p>

<p>
	As always, I am grateful for any feedback about this particular
	project. Contact details are <a
	href="http://canmore.annwfn.net/about/#contact">available
	elsewhere on this site</a> (you can also find contact details in
	the source code).
</p>
</div>
</content>

</entry>
<entry>
<title type="html">New version of IMR and the BPF HOWTO</title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2008/09/06/new_version_of_imr_and_the_bpf_howto/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2008/09/06/new_version_of_imr_and_the_bpf_howto/index.html</id>
<published>2008-09-06T13:47:42+02:00</published>
<updated>2008-09-06T13:47:42+02:00</updated>
<category term="Programming" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>
	A reader of my blog discussed with the article about the BPF
	with me. He wanted to use the BPF for his own project and had
	read the <a
	href="http://canmore.annwfn.net/freebsd/bpf.html">HowTo</a> but
	several problems could not be solved.
</p>

<p>
	During this e-mail discussion I found several flaws in the
	article and in the &quot;IMR&quot; demo program (concerning the
	use of the <code>BPF_WORDALIGN</code> macro). Hence, I updated
	the <a
	href="http://canmore.annwfn.net/freebsd/bpf.html">original
	article</a> and <a
	href="http://canmore.annwfn.net/programming/index.html#imr">IMR</a>.
</p>

<p>
	I hope these new versions will become even more useful as their
	predecessors.
</p>
</div>
</content>

</entry>
<entry>
<title type="html">Hyppolyta (or: How to scan your book collection)</title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2007/10/21/hyppolyta_or_how_to_scan_your_book_collection/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2007/10/21/hyppolyta_or_how_to_scan_your_book_collection/index.html</id>
<published>2007-10-21T13:33:43+02:00</published>
<updated>2007-10-21T13:33:43+02:00</updated>
<category term="FreeBSD" />
<category term="Programming" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">

<p>
	It started as a simple idea: Use a barcode scanner to sort a
	collection of books. Of course, the idea grew and became much
	more versatile and interesting. 
</p>

<p>
	And now I finally managed to upload all information about a
	project that has been on my agenda for several weeks. The
	program is called <code>Hyppolyta</code>; it is a simple Perl
	script. If you are armed with a barcode scanner and lots of
	books (or other items of value that have a barcode), this
	project could be very interesting for you.  
</p>

<p>
	You are able to download the program package on my <a
	href="http://canmore.annwfn.net/programming/index.html">programming
	subsection</a>. There is also a simple <a
	href="http://canmore.annwfn.net/programming/hyppolyta.html">documentation
	available</a> which should be read before using
	<code>Hyppolyta</code>.
</p>

<p>
	Essentially, the program is finished, but to facilitate things,
	several helper/wrapper applications might be added &quot;real
	soon now&quot;. It is therefore advisable to come back for
	updates. 
</p>

<p>
	You are, as always, encouraged to change the source code if you
	think some part should be rewritten. It would be nice, however,
	if you notified me of changes so that they are available in
	the &quot;official version&quot;, too.
</p>
</div>
</content>

</entry>
<entry>
<title type="html">gaim-latex revisited </title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2006/05/15/gaim-latex_revisited/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2006/05/15/gaim-latex_revisited/index.html</id>
<published>2006-05-15T09:01:29+02:00</published>
<updated>2006-05-15T09:01:29+02:00</updated>
<category term="FreeBSD" />
<category term="Programming" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>
Being the playful nerd I am, I changed some things in the plugin's sourcecode. There is a <a href="http://canmore.annwfn.net/freebsd/latex.h.diff">diff file</a> available, although the list of changes is rather small: 
</p>

<ul>
<li>The packages <code>amssymb</code> and <code>amsmath</code> are now used, thus providing you with more symbols and equations.</li>

<li>
I changed the deprecated <code>equation</code> environment to the <code>gather</code> environment. I don't know if that makes sense.
</li>
</ul>

<p>
Still, rendering some symbols such as <code>\LaTeX</code> doesn't work. Apparently, this is a restriction of LaTeX's math mode. However, the LaTeX plugin for <a href="http://kopete.kde.org/">kopete</a> seems to handle this. 
</p>

<p>
EDIT: I found a solution: If the plugin ignores any errors LaTeX encounters while trying to build the <code>.dvi</code>, the use of <code>\TeX</code> works in math mode. Download and apply <a href="http://canmore.annwfn.net/freebsd/latex.c.diff">this diff</a> if you want a more kopete-like solution. 
</p>
</div>
</content>

</entry>
<entry>
<title type="html">Using LaTeX code with Instant Messengers</title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2006/05/12/using_latex_code_with_instant_messengers/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2006/05/12/using_latex_code_with_instant_messengers/index.html</id>
<published>2006-05-12T17:21:13+02:00</published>
<updated>2006-05-12T17:21:13+02:00</updated>
<category term="FreeBSD" />
<category term="Programming" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>
Explaining maths via Internet is a lot easier if you are able to displayformulas correctly, instead of typing things like:
</p>

<pre>
e^(x + i*y ) = e^( x ) ( cos( y ) + i * sin( y )
</pre>

<p>
Surprisingly, this problem is not quite solved. During my searches I found found the <a href="http://www.student.cs.uwaterloo.ca/~kzorin/texim.php">TeXIM Plugin</a>, which should work with Gaim and amsn, thus allowing both Windows, MacOS, Linux and FreeBSD users to chat.
</p>

<p>
I, however, tried <a href="http://sourceforge.net/projects/gaim-latex">gaim-latex</a>. The version in the ports of FreeBSD didn't work, so I downloaded the release version (0.3) at sourceforge and compiled it (you have to use <code>gmake</code> instead of the standard FreeBSD <code>make</code>). The resulting binary <code>LaTeX.so</code> is to be copied to <code>~/.gaim/plugins</code>. Then Gaim has to be restarted and told to use this plugin - done.
</p>

<p>
There are also a number of other plugins out there, for example a MathMode plugin for Miranda (an ICQ client for Windows). But they don't work like gaim-latex or Kopete's plugin: Instead of typing <code>$$ my Tex code $$</code> you have to use strings like <code>[MathMode] [/MathMode]</code> or something like that. There is definitely a need for some standards - or aren't there mathematicians longing for LaTeX conversations (<i>please</i> note the spelling!)?
</p>
</div>
</content>

</entry>
<entry>
<title type="html">New version of GPSCon </title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2006/03/22/new_version_of_gpscon/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2006/03/22/new_version_of_gpscon/index.html</id>
<published>2006-03-22T14:59:03+02:00</published>
<updated>2006-03-22T14:59:03+02:00</updated>
<category term="FreeBSD" />
<category term="Programming" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>
I finally rewrote my console-based GPS mapping program 
&quot;GPSCon&quot;. Users may now use command-line switches.
Furthermore,
referencing maps automatically works better and I daresay that the
program is now actually usable by other people than me. GPSCon is
downloadable on my <a
href="http://canmore.annwfn.net/programming/index.html#gpscon">homepage</a>. 
</p>

<p>
Quick introduction for users who have used GPSCon before (you should also take a closer look at
the file README):
</p>

<ul>
<li>Create a reference file that contains POI (points of interest) data
such as your favourite geocaching locations</li>
<li>Start GPScon like this: <code>./gpscon -d /dev/cuaa0 -l gpscon.log
-r poi_data.txt -s</code></li>
<li>The <code>-s</code> tells GPSCon not to use auto-referencing, which
might be better in some cases</li>
</ul>

<p>
Have fun with GPSCon and drop me a line if you like it.
</p>
</div>
</content>

</entry>
<entry>
<title type="html">Counting traffic </title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2006/03/05/counting_traffic/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2006/03/05/counting_traffic/index.html</id>
<published>2006-03-05T22:04:53+02:00</published>
<updated>2006-03-05T22:04:53+02:00</updated>
<category term="FreeBSD" />
<category term="Programming" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>
To keep track of the internet traffic my family is causing, I wrote a little perl script that runs on the Soekris and displays the output of <i>ipfstat</i>. This works because ipf is able to count traffic by using rules such as:</p>

<code>
	count in on sis0 all<br />
	coun out on sis0 all
</code>

<p>The perl script just parses the output of <code>ipfstat -noia</code> and displays it in a more or less fancy way. You may find the script among other things in the <a href="http://canmore.annwfn.net/freebsd/soekris/">Soekris directory</a> on my homepage.</p>

<p>
Perhaps this is of some interest to other Soekris owners.
</p>
</div>
</content>

</entry>

</feed>
