2005年11月14日月曜日

Linkers & Loaders

だいぶ前に購入したLinkers & Loadersをやっと読み終えました。

一般的にはプログラムの作成時に行われる「リンク」と、プログラム実行時に行われる「ロード」ですが、これらについて詳しい解説、歴史が書かれています。
解説されているアーキテクチャもWindowsからUNIXからIBMのメインフレームまで、幅広く各種のリンク・ロードの仕組みと特徴について触れられています。
WindowsのDLLがどういう仕組みでリンクされロードされるのか、Linuxの共有ライブラリについてはどうか、Javaのリンク、インクリメンタルリンクの仕組み、リンク時最適化についてなどなど、一般のソフトウェア開発者も知っておいて損はない内容が多いです。
まぁ僕はUNIXに関する内容については若干読み飛ばしちゃいましたけども :-P


Linkers & Loaders


2005年11月9日水曜日

FreeBSDでPOPFile

最近SPAMが多いのでSPAMフィルタとしてPOPFileというソフトを使っています。
しばらく前からWindows版をメインPCに入れて使っていたのですが、起動が若干遅くなってしまうので家サーバ(FreeBSD 5.3)に入れて使ってみることにしました。
メインPC -> 家サーバ -> プロバイダのメールサーバ と家サーバを介してメールを受信します。

インストールメモ
portsからPOPFileをmake install

cd /usr/ports/mail/popfile
make WITH_POPFILE_JAPANESE=YES install clean


起動スクリプトを作成
cd /usr/local/etc/rc.d
vi popfile.sh

popfile.shの内容は以下の通り
#!/bin/sh
#

# PROVIDE: popfile
# REQUIRE: NETWORKING SERVERS
# BEFORE: LOGIN
# KEYWORD: FreeBSD shutdown

. /etc/rc.subr

name="popfile"
rcvar=`set_rcvar`
command="/usr/local/sbin/popfile.sh"
command_interpreter="/usr/bin/perl"
procname="/usr/local/share/popfile/popfile.pl"

export POPFILE_USER="/var/db/popfile"

load_rc_config $name
run_rc_command "$1"


パーミッションの設定
chmod +x popfile.sh


再起動後、http://localhost:8080/ でPOPFileの設定画面が出てきたらインストール成功!あとはその画面から各種設定を行います。

2005年11月8日火曜日

Graphics Gems 1

以前からずっと欲しかった Graphics Gems を少し前にやっと購入しました。

辞書的に使おうかと思っているので、とりあえず目次だけは把握しておかないと。
というわけで、適当に訳した目次を以下にメモ。適当なので間違いがあれば指摘してあげてください。あと未訳の部分も気が向いたら随時訳していきます。



  1. 便利な2D幾何学 (Useful 2D Geometry)

  2. 便利な三角法 (Useful Trigonometry)

  3. 選択点の三角関数 (Trigonometric Functions at Select Points)

  4. 三角形 (Triangles)

  5. 三角形内にランダムな点を生成する (Generating Random Points in Triangles)

  6. 高速な線エッジの交点計算 (Fast Line-Edge Intersections on a Uniform Grid)

  7. 領域の交わり:円と面 (Area of Intersection: Circle and a Half-Plane)

  8. 領域の交わり:円と太線 (Area of Intersection: Circle and a Thick Line)

  9. 点から線への垂線の距離 (Vertical Distance from a Point to a Line)

  10. 点が線の上にあるかどうかの高速なテスト (A Fast 2D Point-on-line Test)

  11. 円と矩形の交わりを早く調べる (Fast Circle-Rectangle Intersection Checking)

  12. 整数格子上の円の整数の半径 (Circles of Integral Radius on Integer Lattices)

  13. グラフラベルのいい数字 (Nice Numbers for Graph Labels)

  14. ルックアップテーブルを用いたサンプリングジッターの効率的な生成 (Efficient Generation of Sampling Jitter Using Look-up Tables)

  15. 多角形のアンチエイリアス付きで高速なスキャンラインコンバージョン (Fast Anti-Aliasing Polygon Scan Conversion)

  16. 一般的な凸多角形のスキャンコンバージョンとクリッピング (Generic Convex Polygon Scan Conversion and Clipping)

  17. 凹多角形のスキャンコンバージョン (Concave Polygon Scan Conversion)

  18. 任意の多角形の高速なスキャンコンバージョン (Fast Scan Conversion of Arbitrary Polygons)

  19. デジタル直線描画 (Digital Line Drawing)

  20. Symmetric Double Step Line Algorithm

  21. アンチエイリアス付きの直線のレンダリング (Rendering Anti-Aliased Lines)

  22. 2Dの太線のベベル接続塗りつぶしアルゴリズム (An Algorithm for Filling in 2D Wide Line Bevel Joints)

  23. ラスター格子上での太線のレンダリング (Rendering Fat Lines on a Raster Grid)

  24. 2次元クリッピング:ベクトル的なアプローチ (Two-Dimensional Clipping: A Vector-Based Approach)

  25. ラスター格子上で平面図形を周期的に敷き詰める (Periodic Tilings of the Plane on a Raster Grid)

  26. Anti-Aliasing Filters that Minimize "Bumpy" Sampling

  27. リサンプリング処理に共通するフィルタ (Filters for Common Resampling Tasks)

  28. Smoothing Enlarged Monochrome

  29. Median Finding on a 3-by-3 Grid

  30. Ordered Dithering

  31. 一般的なラスター画像回転の高速なアルゴリズム (A Fast Algorithm for General Raster Rotation)

  32. 便利な1対1ピクセル変換 (Useful 1-to-1 Pixel Transforms)

  33. アルファ合成 (Alpha Blending)

  34. Frame Buffers and Color Maps

  35. Reading a Write-Only Write Mask

  36. デジタル「ディゾルブ」エフェクト (A Digital "Dissolve" Effect)

  37. Mapping RGB Triples Onto Four Bits

  38. What Are the Coordinates of a Pixel?

  39. Proper Treatment of Pixels as Integers

  40. Normal Coding

  41. Recording Animation in Binary Order for Progressive Temporal Refinement

  42. 1-to-1 Pixel Transforms Optimized Through Color-Map Manipulation

  43. シードフィルアルゴリズム (A Seed Fill Algorithm)

  44. フレームバッファ中の領域の塗り潰し Filling a Region in a Frame Buffer

  45. Precalculating Addresses for Fast Fills, Circles, and Lines

  46. A Simple Method for Color Quantization: Octree Quantization

  47. Useful 3D Geometry

  48. An Efficient Bounding Sphere

  49. Intersection of Two Lines in Three-Space

  50. Intersection of Three Planes

  51. Digital Cartography for Computer Graphics

  52. Albers Equal-Area Conic Map Projection

  53. Spheres-to-Voxels Conversion

  54. A Simple Method for Box-Sphere Intersection Testing

  55. 3D Grid Hashing Function

  56. Backface Culling

  57. Fast Dot Products for Shading

  58. Scanline Depth Gradient of a Z-Buffered Triangle

  59. Simulating Fog and Haze

  60. Interpretation of Texture Map Indices

  61. Multidimensional Sum Tables

  62. A Simple Ray Rejection Test

  63. Intersection of a Ray with a Sphere

  64. An Efficient Ray-Polygon Intersection

  65. Fast Ray-Polygon Intersection

  66. Fast Ray-Box Intersection

  67. Shadow Attenuation for Ray Tracing Transparent Objects

  68. 3次、4次の根 (Cubic and Quartic Roots)

  69. ベジェ曲線を基に根を見つける (A Bezier Curve-Based Root-Finder)

  70. Using Sturm Sequences To Bracket Real Roots of Polynomial Equations

  71. 高速で低精度な平方根 (A High-Speed, Low Precision Square Root)

  72. A Fast Approximation To the Hypotenuse

  73. A Fast Approximation To 3D Euclidian Distance

  74. Full-Precision Constants

  75. Converting Between Bits and Digits

  76. Storage-free Swapping

  77. ランダムな整数の生成 (Generating Random Integers)

  78. Fast 2D-3D Rotation

  79. Bit Patterns for Encoding Angles

  80. Bit Interleaving for Quad- or Octrees

  81. 高速なHSLからRGBへの変換 (A Fast HSL-to-RGB Transform)

  82. Matrix Identities

  83. Transforming Axes

  84. 高速な行列の掛け算 (Fast Matrix Multiplication)

  85. 仮想トラックボール (A Virtual Trackball)

  86. Matrix Orthogonalization

  87. Rotation Tools

  88. 逆行列化 (Matrix Inversion)

  89. Matrices and Transformations

  90. Efficient Post-Concatenation of Transformation Matrices

  91. Transformation Identities

  92. Fixed-Point Trigonometry with CORDIC Iterations

  93. Using Quaternions for Coding 3D Transformations

  94. 3D Viewing and Rotation Using Orthonormal Bases

  95. The Use of Coordinate Frames in Computer Graphics

  96. Forms, Vectors, and Transforms

  97. Properties of Surface-Normal Transformations

  98. Transforming Axis-Aligned Bounding Boxes

  99. Defining Surfaces From Sampled Data

  100. Defining Surfaces From Contour Data

  101. Computing Surface Normals for 3D Models

  102. Calculation of Reference Frames Along a Space Curve

  103. Planar Cubic Curves

  104. Explicit Cubic Spline Interpolation Formulas

  105. 高速なスプライン曲線の描画 (Fast Spline Drawing)

  106. Bezier曲線の特性 (Some Properties of Bezier Curves)

  107. Tutorial on Forward Differencing

  108. Integration of Bernstein Basis Functions

  109. 曲線上の最近点問題の解法 (Solving the Nearest-Point-on-Curve Problem)

  110. An Algorithm for Automatically Fitting Digitized Curves

  111. Graphics Gems ヘッダーファイル

  112. 2D・3DベクトルCライブラリ

  113. Cでのメモリ確保

  114. 2つの便利なCのマクロ

  115. How to Build Circular Structures in C

  116. How to Use C Register Variables to Point to 2D Arrays


2005年8月12日金曜日

2次元ベクトルと点の位置関係

外積を利用して2次元ベクトルと点の位置関係を判定します。

product2D.png



Pが正の値なら、ベクトルABの進行方向に対して左側に点Cが存在する。
Pが負の値なら、ベクトルABの進行方向に対して右側に点Cが存在する。

2005年8月2日火曜日

C++の設計と進化

発売(2004年12月)前に予約までして買った「C++の設計と進化」をやっと読み終えました!結構内容が濃いので読むのに時間がかかりましたが、非常に面白かった&勉強になりました。Bjarne Stroustrupがどう考えてC++の機能を取捨選択し文法を決めていったのか、その理由とともに述べられておりC++に対する理解が深まりました。また、随所でコンパイラの実装面に触れているところも面白かったです。

個人的に一番面白かったのはテンプレートの章かなー。継承とかも面白かった。
おすすめです!

C++の設計と進化

2005年3月22日火曜日

BizTablet

WACOMから最近BizTabletというタブレットが発売されたのですが
4000円くらいと安いのと、少し前からOneNoteを使い始めた影響もあり、面白そうなので買ってしまいました!

早速接続してOneNoteや、Officeのドキュメントにしばらく落書きしてみましたが・・・なかなか難しいですね。画面解像度1600x1200であの小さなタブレットで文字やら数式やら図を書くというのは練習が必要なようです。でも、書いたときの感触とかペンの感度はそれなりに良いかな。
せっかく買ったのでこれから徐々になれていこうと思います!

WACOM BizTablet

2005年1月14日金曜日

OneNote2003

以前から少し気になっていたMicrosoftのOneNote2003というアプリケーションを先日から試しているのですが、なかなか便利です。
最初は、何か考え事をするときに紙と鉛筆で書いていたものをOneNoteに書いていってみようかと思って使い始めたのですが、それよりもWebページをコピー&ペーストできるのがすごく便利です。(ページによっては多少レイアウトが崩れますが…)
今までは「このWebページ保存しておきたいな」と思うとIEの「名前を付けて保存」とかで保存していたのですが、OneNoteならファイルも増殖せず、検索(grep)も簡単です。簡単に検索できるというのは重要なポイントです。

ネットワーク越しにノートを共有してホワイトボード的にも使えるらしいので試してみたいなー。

今は60日間の体験版をダウンロードして使っているのですが、購入してしまいそうな勢いです。

OneNote 2003
OneNote 2003 特別優待パッケージ (Office XP、Office 2003 を持ってる人向け)

  © Blogger template 'Isolation' by Ourblogtemplates.com 2008

Back to TOP