$\left[ \begin {array}{ccc} \sin \left( \phi \right) \cos \left(
\theta \right) &-R\sin \left( \phi \right) \sin \left( \theta \right)
&R\cos \left( \phi \right) \cos \left( \theta \right)
\\ \noalign{\medskip}\sin \left( \phi \right) \sin \left( \theta
\right) &R\sin \left( \phi \right) \cos \left( \theta \right) &R\cos
\left( \phi \right) \sin \left( \theta \right) \\ \noalign{\medskip}
\cos \left( \phi \right) &0&-R\sin \left( \phi \right) \end {array}
\right]$
Samstag, 30. Juli 2011
Schey 003: Surface Integral over Half Sphere
test
Dienstag, 12. Juli 2011
Web 002: Interactive Figure
I wrote a script to illustrate the superposition principle. The more cosine functions are superpositioned, the more precise can the position be described (by integrating over the probability density). Naturally, all information about the momentum is lost, since the probability of each momentum component becomes smaller and smaller with increasing superposition number.
The foregoing is illustrated by the below figure.
What I want to achieve now is to have this be interactive on the web. Since the only variable in the calculation is an integer (the number of superpositions), I would like to introduce something like a knob, which the user can click and turn and by doing so increase/decrease the number of superpositions. While he is doing this, the figure should update dynamically, i.e. for every selection the correct wavefunction should be displayed.
How can this be done? What are the general requirements for this? We will see.
Montag, 11. Juli 2011
Web 001: Setting up Apache and Running phpinfo() on Mac OS X
Ok, so you just want that phpinfo() running within two minutes on your local Mac because you want to develop your website from your $HOME/Sites directory. Easy. Here's the out-of-the-box solution to that (its done on Mac OS 10.6, PHP and Apache are from the default installation).
- cp /etc/apache/http.conf /etc/apache/back_http.conf # No backup, no mercy.
- sudo vi /etc/apache/http.conf
- You need to change two lines: Locate "DocumentRoot" and set the path behind it to '/Users/yourUserHomeDirectory/Sites'. Then locate the <Directory "/Library/WebServer/Documents"> line and change the path to the one you entered above.
- Remove the '#' sign infront of the line starting with "LoadModule php5_module"
- Save the file and exit.
sudo /sbin/apachectl restart
You can use the two following scripts as a default template. Copy the text and place them two files within the ~/Sites directory.
The index.html file:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"Then enter the following into a file called phpinfo.php and place it in the ~/Sites directory as well.
"http://www.w3.org/TR/xhtml1/D
TD/xhtml1-transitional.dtd">
<html>
<head>
<title>Index Testing PHP</title>
</head>
<body>
<br /><br />
/Users/yourUserHomeDirectory/Sites/index.html
<form method="POST" action="phpinfo.php">
<input type="submit">
</form>
</body>
</html>
<?php phpinfo(); ?>
Set permissions for phpinfo.php to 755 in order to be executable by Apache. Now enter http://localhost/~yourUserHomeDirectory/ into a browser. This will display a minimal page showing the path you entered above and a button. Hit the button and the phpinfo.php script will execute. This should be it.
In case you have trouble getting it running, feel free to leave a comment.
Freitag, 8. Juli 2011
Schey 002: Surface Integral
In Maple:
Schey, Ex. II.5,b.
> 2*Pi*a^2*int(r*(a^2-r^2)^(-1/2),r=0..a) assuming a>0;
3
2 Pi a
>
Schey, Ex. II.5,b.
Donnerstag, 7. Juli 2011
Shell 007: Zero Padding
Zero padding is useful when naming files and everything should be nicely aligned when listed.
This can be done by using
This can be done by using
for i in 000{1..9) 10
do
echo $i
done
Abonnieren
Posts (Atom)