Friday, November 30, 2012

High Speed DNS Resolving with Bind and OpenDNS (debian based OS)


# apt-get install bind9
# nano /etc/resolv.conf

erase everything, add "nameserver 127.0.0.1"

# nano /etc/bind/named.conf.options

options {

forwarders { 208.67.222.222; 208.67.220.220; };
...
};

# etc/init.d/bind9 restart

Tuesday, November 13, 2012

Project Euler Problem 381

For a prime p let

Find 

I haven't solved it yet entirely...I am stuck, that is what I got so far.
Tipp: https://en.wikipedia.org/wiki/Wilson_theorem
See Mathworld and Wiki on Modular arithmetic!


Algorithmic Botany - L(indenmayer)-systems

An L-system or Lindenmayer system is a parallel rewriting system, namely a variant of a formal grammar, most famously used to model the growth processes of plant development, but also able to model the morphology of a variety of organisms.

There is a book on "The Algorithmic Beauty of Plants" by Przemyslaw Prusinkiewicz and Aristid Lindenmayer. You can find it here:

http://algorithmicbotany.org/papers/#abop


L-System Structure:
The recursive nature of the L-system rules leads to self-similarity and thereby fractal-like forms are easy to describe with an L-system

Example: Fractal plant

variables : X F
constants : + − [ ]
start  : X
rules  : (X → F-[[X]+X]+F[+FX]-X), (F → FF)
angle  : 25°
Here, F means "draw forward", - means "turn left 25°", and + means "turn right 25°". X does not correspond to any drawing action and is used to control the evolution of the curve. [corresponds to saving the current values for position and angle, which are restored when the corresponding ] is executed.




other CG Examples:

'Weeds', generated using an L-system in 3D.


L-system trees form convincing models of natural patterns

for further information see: https://en.wikipedia.org/wiki/L-system

Sunday, November 4, 2012

Introduction to Mathematical Thinking - Done

So another Stanford/Coursera Course is over. I got a message from Paul (one of the Prof's TA's):
Thank you for your feedback, Pierre. I wanted to personally let you know that I really appreciate the help you've given to other students throughout the course.
Saved my rainy sunday. :)

Thursday, November 1, 2012

Why 1+1 equals 2

From the Principia Mathematica by Russell and Whitehead (Volume I, 1st edition, page 379)

"From this proposition it will follow, when arithmetical addition has been defined, that 1+1=2." —Volume I, 1st edition, page 379 (page 362 in 2nd edition; page 360 in abridged version). (The proof is actually completed in Volume II, 1st edition, page 86, accompanied by the comment, "The above proposition is occasionally useful.")