$リアルタイムCGの基礎+Android+レイトレ


・2つの直線の方程式を作る。

Q = V1*t1 + P1
Q = V2*t2 + P2

Q:交点
P1:線分1の始点
V1:線分1のベクトル
t1:線分1のPからQまでの距離
P2:線分2の始点
V2:線分2のベクトル
t2:線分2のPからQまでの距離


※t1もしくはt2を求めれば、交点Qを求められる。

・繋げてt1,t2の両方が存在する一つの式にする。

V1*t1 + P1 = V2*t2 + P2

V1*t1 - V2*t2 + P1 - P2 = 0

・ベクトルを展開し連立方程式にする。

V1.x*t1 - V2.x*t2 + P1.x - P2.x = 0
V1.y*t1 - V2.y*t2 + P1.y - P2.y = 0

・変数表記の簡略化

x:t1
y:t2
a:V1.x
b:V2.x
c:P1.x
d:P2.x
e:V1.y
f:V2.y
g:P1.y
h:P2.y

ax - by + c - d = 0 ..(1)
ex - fy + g - h = 0 ..(2)

A)加減法を使って連立方程式を解く。

・f,bをそれぞれの式にかける

fax - fby + fc - fd = 0
bex - fby + bg - bh = 0

fax - fby + fc - fd = bex - fby + bg - bh

fax + fc - fd = bex + bg - bh

fax - fd = bex + bg - bh - fc

fax = bex + bg - bh - fc + fd

fax - bex = bg - bh - fc + fd

(fa - be)x = bg - bh - fc + fd

x = ( bg - bh - fc + fd ) / (fa - be)

x = ( b(g - h) - f(c - d) ) / (fa - be)

・変数表記を戻す

t1 = ( V2.x*(P1.y - P2.y) - V2.y*(P1.x - P2.x) ) / (V2.y*V1.x - V2.x*V1.y)



B)代入法を使って連立方程式を解く。

・(1)式をyについての式に変形

ax - by + c - d = 0 ..(1)

- by + c - d = -ax

- by - d = -ax - c

- by = -ax - c + d

y = (-ax - c + d) / (-b)

y = (ax + c - d) / b

y = ax/b + c/b - d/b

・(2)式に代入

ex - fy + g - h = 0 ..(2)

ex - f(ax/b + c/b - d/b) + g - h = 0

ex - fax/b - fc/b + fd/b + g - h = 0

ex - fax/b + fd/b + g - h = fc/b

ex - fax/b + g - h = fc/b - fd/b

ex - fax/b - h = fc/b - fd/b - g

ex - fax/b = fc/b - fd/b - g + h

ex - fax/b = f(c - d)/b - g + h

(e - fa/b)x = f(c - d)/b - g + h

x =(f(c - d)/b - g + h) / (e - fa/b)


・変数表記を戻す

t1 = ( V2.y*(P1.x - P2.x)/V2.x - P1.y + P2.y ) / (V1.y -V2.y*V1.x/V2.x)


■まとめ

加減法で求めた式
t1 = ( V2.x*(P1.y - P2.y) - V2.y*(P1.x - P2.x) ) / (V2.y*V1.x - V2.x*V1.y)

代入法で求めた式
t1 = ( V2.y*(P1.x - P2.x)/V2.x - P1.y + P2.y ) / (V1.y -V2.y*V1.x/V2.x)

どちらでも同じt1値が求まる。

t1<0 の時は、P点より後ろ反対方向に交点がある。
t1>1 の時は、P+V点より先に交点がある。

交わらない時は、式の後半の『/』以降で0が発生する。

代入法版は、線分2のxが0でも0除算が発生してしまうので、

加減法版の式の方が例外が少なく扱いやすい。
http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml

glTexImage2Dでデプスバッファを作る際、

dataが0でも、

formatをGL_DEPTH_COMPONENT
typeをGL_UNSIGNED_BYTE

にしないと上手く動作しない。

$リアルタイムCGの基礎+Android


ブルームフィルタ(Bloom-filter)

通常の画像ではRGBの各色は1.0で飽和してしまい、

たとえば太陽光の強い白も、紙の白も同じ白になってしまう。

1.0以上の画像を取り出し、ぼかしをかけ、最初の画像に合成してやることで

より強い光を表現する。
$リアルタイムCGの基礎+Android


大気モデルライティング(Atmospheric model lighiting)

太陽が真上の場合と真横に来た場合で、光が届くまでの大気の厚さに差がある。

写真は、真横(真正面)に光源がある場合を比較している。

左は宇宙空間のように大気が存在しない場合、右は大気の厚さに比例して減衰分を計算に入れた場合




~ライトモデルを作る~

$リアルタイムCGの基礎+Android


観察者の視線をE

観察者の位置をP

大気圏までの半径をr

求める座標をQ

地球の中心Sは(0,0,0)

とする。

PQ間が太陽光が地表に届くまでの距離

PQ間の距離tを求める。


Q = E*t + P ...(1)

Qx^2 + Qy^2 + Qz^2 = r^2 ...(2)

の連立方程式をtについて解く。

式(1)を式(2)へ代入

(Ex*t + Px)^2 + (Ey*t + Py)^2 + (Ez*t + Pz)^2 = r^2

展開
(Ex*t)^2 + 2*(Ex*t)*Px + Px^2
+ (Ey*t)^2 + 2*(Ey*t)*Py + Py^2
+ (Ez*t)^2 + 2*(Ez*t)*Pz + Pz^2
= r^2

(Ex^2)*t^2 + 2*t*(Ex*Px) + Px^2
+ (Ey^2)*t^2 + 2*t*(Ey*Py) + Py^2
+ (Ez^2)*t^2 + 2*t*(Ez*Pz) + Pz^2
= r^2

tでまとめる
(Ex^2 + Ey^2 + Ez^2)*t^2
+ 2*t*(Ex*Px + Ey*Py + Ez*Pz)
+ (Px^2 + Py^2 + Pz^2)
= r^2

Eは単位ベクトルなので1
t^2
+ 2*t*(Ex*Px + Ey*Py + Ez*Pz)
+ (Px^2 + Py^2 + Pz^2)
= r^2

簡略化
b = (Ex*Px + Ey*Py + Ez*Pz) = E・P
c = (Px^2 + Py^2 + Pz^2)
t^2 + 2*t*b + c = r^2
t^2 + 2*t*b = r^2 - c

因数分解
(t + b)^2 - b^2 = r^2 - c
(t + b)^2 = r^2 - c + b^2

両辺を√
t + b = sqrt( r^2 - c + b^2 )

bを右辺に移動
t = sqrt( r^2 - c + b^2 ) - b

まとめ
b = (Ex*Px + Ey*Py + Ez*Pz)
c = (Px^2 + Py^2 + Pz^2)
t = sqrt(r^2 - c + b^2) - b


モデル化
r = 1.0にする。
観察者の座標は、『地表』をイメージしたP(0,p,0)にする。

b = Ey*p
t = (sqrt(1.0 - p^2 + b^2) - b)


$リアルタイムCGの基礎+Android


画角(Perspective)

視点をF、

視線(レイキャスト)ベクトルE、

投影画面(レイを飛ばす元座標)をPとすると、

E = normalize(P - F)

で放射状のレイを飛ばすことで、画角を作れる。



$リアルタイムCGの基礎+Android




~直線と平面の交点を求める~

面法線をNとする。

直線の方程式
Q = E*t + P ...(1)

平面の方程式の一般形。

ax + by + cz + d = 0

a b c は法線、x y z は従法線という平面に平行で法線と直行するベクトル

dはベクトルN上の任意点(x0,y0,z0)までの距離なので、dの式が作る。

d = a*x0 + b*y0 + c*z0

最初の式に代入する

ax + by + cz + a*x0 + b*y0 + c*z0 = 0

a(x + x0) + b(y + y0) + c(z + z0) = 0

となり、もう一つの良く使われる別の平面の方程式が出来上がる。

内積表記を使う

N・(Q + S) = 0

Nx*(Qx + Sx) + Ny*(Qy + Sy) + Nz*(Qz + Sz) = 0 ...(2)


求めるのはt。tについての方程式を作る。


(2)式に(1)式を代入する。

N・(E*t + P + S) = 0

簡易化
V = P + S
とおく。

N・(E*t + V) = 0

Nx*(Ex*t + Vx) + Ny*(Ey*t + Vy) + Nz*(Ez*t + Vz) = 0

展開
Nx*Ex*t + Nx*Vx + Ny*Ey*t + Ny*Vy + Nz*Ez*t + Nz*Vz = 0

tでまとめる。
t*(Nx*Ex + Ny*Ey + Nz*Ez) + Nx*Vx + Nz*Vy + Nz*Vz = 0

t*(N・E) + (N・V) = 0

両辺から(N・V)を引く
t*(N・E) = -(N・V)

両辺を(N・E)で割る。
t* = -(N・V)/(N・E)

まとめ
V = P + S
t = -(N・V)/(N・E)
$リアルタイムCGの基礎+Android


レイトレーシング(Ray-traching)

レイキャストを繰り返し行い、光(ray)の発生元を逆追跡(traching)する方法。

影を正確に落とせる。




$リアルタイムCGの基礎+Android


フォンシェーディングなど、ライトモデルはそのままポリゴンと同じ感じで使える。



$リアルタイムCGの基礎+Android


衝突面から別のレイを飛ばし(レイキャストし)反射する回数を増やす。



$リアルタイムCGの基礎+Android


アンビエント

反射を繰り返しても最終的にどこにもレイが衝突しなかった場合に使う色

ポリゴンだと定義が曖昧だが、レイトレーシングはシミュレーションなので収まるところに収まる。
$リアルタイムCGの基礎+Android

レイキャスティング(Ray-casting)

視点から光(ray)を投げかけ(casting)し交差点を求める方法




~球体と直線との衝突式を求める~

Z軸の正方向が奥行きにする。

レイを飛ばす方向をE(Ex,Ey,Ez)とする。(単位ベクトル)

レイを飛ばす座標をP(Px,Py,Pz)とする。

球の座標をS(Sx,Sy,Sz)とする。

球の半径をrとする。

最終的にもとめる、レイと球の衝突座標をQ(Qx,Qy,Qz)とする。

リアルタイムCGの基礎+Android


レイ(光線)と球との当たり判定を取る。

レイに関して、【パラメータ形式】の直線の方程式(y = ax + b)を当てはめる。

Q = E*t + P ...(1)

Pの位置から、Eの方向へ、t進んだところでQに到達することになる。

進んだ距離tを求めればQが求められる。

不明な変数がtとQの二つがあるため、連立二次方程式を使って求めるため、もうひとつ球の式を持ってくる。

球については、【陰関数形式】の球の方程式(x^2 + y^2 + z^2 = r^2)を当てはめる。

(Qx - Sx)^2 + (Qy - Sy)^2 + (Qz - Sz)^2 = r^2 ...(2)


(2)式に(1)式を代入する。

(Ex*t + Px - Sx)^2 + (Ex*t + Px - Sy)^2 + (Ex*t + Px - Sz)^2 = r^2

式の簡略化
x = Px - Sx
y = Py - Sy
z = Pz - Sz
とする。
(Ex*t + x)^2 + (Ex*t + y)^2 + (Ex*t + z)^2 = r^2

まず(Ex*t + x)^2に関してだけ展開
(Ex*t + x)^2
= (Ex*t + x)*(Ex*t + x)
= (Ex*t)^2 + 2*(Ex*t)*x + x^2
= (Ex^2)*t^2 + 2*t*(Ex*x) + x^2

全部を展開、
(Ex^2)*t^2 + 2*t*(Ex*x) + x^2
+ (Ey^2)*t^2 + 2*t*(Ey*y) + y^2
+ (Ez^2)*t^2 + 2*t*(Ez*z) + z^2
= r^2

更に、
= (Ex^2 + Ey^2 + Ez^2)*t^2 + 2*t*(Ex*x + Ey*y + Ez*z) + (x^2 + y^2 + z^2) =r^2

更に、
a = (Ex^2 + Ey^2 + Ez^2) = 1 (Eは単位ベクトルなので1)
b = (Ex*x + Ey*y + Ez*z)
t^2 + 2*t*b + (x^2 + y^2 + z^2) = r^2

更に、(x^2 + y^2 + z^2)を右辺に移動し、両辺にb^2を足す
t^2 + 2*t*b + b^2 = r^2 - (x^2 + y^2 + z^2) + b^2

左辺を因数分解
(t + b)^2 = r^2 - (x^2 + y^2 + z^2) + b^2

両辺を√
t + b = ±sqrt(r^2 - (x^2 + y^2 + z^2) + b^2)

bを右辺に移動
t = ±sqrt(r^2 - (x^2 + y^2 + z^2) + b^2) - b

tを選択。
$リアルタイムCGの基礎+Android
球の表面との交差点
t1 = -sqrt(r^2 - (x^2 + y^2 + z^2) + b^2) - b
球との裏面との交差点(E Nベクトルが交差していない)
t2 = +sqrt(r^2 - (x^2 + y^2 + z^2) + b^2) - b

t1>0 & t2>0 Pより前(E方向)に球がある
t1<0 & t2>0 球の中にPがある
t1<0 & t2<0 Pの後ろに球がある


まとめ
x = Px - Sx
y = Py - Sy
z = Pz - Sz
b = (Ex*x + Ey*y + Ez*z)
t = -sqrt(r^2 - (x^2 + y^2 + z^2) + b^2) - b


ガウシアンブラー(gaussian blur)
リアルタイムCGの基礎+Android-gaussian-blur

ピクセルシェーダーが登場してから、一般的によくつかわれるぼかしの方法。
それまでは縮小した絵をバイリニアフィルタで広げるという方法が使われていた。

バイリニアフィルタの場合だと、
矩形かつ1ドット幅でしかブラー(=ぼかし)がかからなかったのに対し、
自由な範囲で正円が保障されたブラーをかけることができる。


ガウシアンブラー処理は、XYの2パスに分解することができる。
2パスにすることで、膨大な計算量を大幅に減らすことができ、
リソースの限られているGPU(シェーダー)と相性がいい。


gnuplot> s = 2
gnuplot> plot [-10:10] 1/(sqrt(2*pi)*s)*exp(-x*x/(2*s*s))
リアルタイムCGの基礎+Android
※gnuplotでグラフ化。σ=2の時の波形

σ(s)を大きくすると強度を変えられる。
サンプリング範囲が広くなると遅くなり、狭いままだとオーバーするとエッジが立つ。



$リアルタイムCGの基礎+Android

アンドロイドSDKのインストールイメージ

メモ:

SDKのインストーラは.zip を使ったほうがいい。
windowsインストーラーは、デフォルト設定がライブラリリリース毎に変わりかねないから。

Eclipseはかなり積極的に推奨されている。ので使ってみようかと思う。

コマンドラインで使うのなら、androind-sdk/tools と androind-sdk/platform-tools
にパスを通しておいたほうがいい。



$リアルタイムCGの基礎+Android
※続

http://developer.android.com/sdk/eclipse-adt.html#installing
$リアルタイムCGの基礎+Android

Installing the ADT Plugin
ADTプラグインのインストール

The sections below provide instructions on how to download and install ADT into your Eclipse environment.
以下のセクションでは、Eclipse環境へのADTの、ダウンロードとインストール方法の手順を提供します。

If you encounter problems, see the Troubleshooting section.
もし問題があれば、『トラブルシューティング』(Troubleshooting)セクションをご覧ください。


Preparing Your Development Computer
開発用コンピュータの準備

ADT is a plugin for the Eclipse IDE.
ADTはEclipseIDEのプラグインです。

Before you can install or use ADT, you must have a compatible version of Eclipse installed on your development computer.
ADTをインストールもしくは使う前に、互換性のあるEclipseを開発用コンピュータにインストールされていなくてはいけません。

Check the System Requirements document for a list of Eclipse versions that are compatible with the Android SDK.
AndroidSDK用として互換性のあるEclipseバージョンのリストについては、『システム要件』(System Requirements)ドキュメントを確認してください。

 ・If Eclipse is already installed on your computer, make sure that it is a version that is compatible with ADT and the Android SDK.
  もしEclipseが既にコンピュータへインストールされていれば、ADTとAndroidSDKに互換性があるバージョンであることを確認してください。

 ・If you need to install or update Eclipse, you can download it from this location:
  もし、Eclipseのインストールかアップデートが必要なら、ここからダウンロードできます:

    http://www.eclipse.org/downloads/

  The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is recommended.
  "Exlipse Classic"バージョンを推奨します 。別の方法では、EclipseのJavaもしくはRCPバージョンを推奨します。

Additionally, before you can configure or use ADT, you must install the Android SDK starter package, as described in Downloading the SDK Starter Package.
付け加えると、ADTの設定または使用前に、ダウンロードしたSDKスターターパッケージに説明にあるように、AndroidSDKスターターパッケージをインストールしておかなければいけません。

Specifically, you need to install a compatible version of the Android SDK Tools and at least one development platform.
具体的には、開発プラットフォームにAndroidSDKツールの互換性のあるバージョンの最新版をインストールする必要があります。

To simplify ADT setup, we recommend installing the Android SDK prior to installing ADT.
簡略化したADTセットアップ、ADTをインストールの前にAndroidSDKのインストールをすることを推奨します。

When your Eclipse and Android SDK environments are ready, continue with the ADT installation as described in the steps below.
EclipseとAndroidSDKの環境が整ったら、下記のステップの説明にあるようにADTのインストールを継続してください。


Downloading the ADT Plugin
ADTプラグインのダウンロード

Use the Update Manager feature of your Eclipse installation to install the latest revision of ADT on your development computer.
Eclipseインストレーションのアップデートマネージャ機能をつかって、開発用コンピュータに最新リビジョンのADTをインストールしてください。

Assuming that you have a compatible version of the Eclipse IDE installed, as described in Preparing for Installation, above, follow these steps to download the ADT plugin and install it in your Eclipse environment.
互換性のあるバージョンのEclipseIDEが、前記、Preparing for Installationの説明どおりにインストールされているとすれば、以下のダウンロードステップに従い、ADTプラグインをEclipse環境にインストールしてください。

1 .Start Eclipse, then select Help > Install New Software....
 Eclipseを起動し、Help>Install New Software....を選択してください。

2. Click Add, in the top-right corner.
 右上隅のAddをクリックしてください。

3. In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location:
表示されたAdd Repositoryダイアログでは、『Name』に"ADT Plugin"、『Location』に次のURLを入れてください。

https://dl-ssl.google.com/android/eclipse/

4. Click OK
 『OK』をクリックしてください。
Note: If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).
 注:プラグインの取得でトラブルが発生している場合、URLの"https"のかわりに"http"を試してみてください。(httpsはセキュリティ上の理由から好まれます)

5. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
 Developer Toolsの横にあるチェックボックスを選択し、『Next』をクリックしてください。

6. In the next window, you'll see a list of the tools to be downloaded. Click Next.
 次のウィンドウでは、ダウンロードされたツールのリストが見れます。『Next』をクリックしてください。

7. Read and accept the license agreements, then click Finish.
 ライセンス契約を読んで受け入れてください。よろしければ、『Finish』をクリックしてください。

Note: If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.
 注:もし、ソフトウェアの信頼性や妥当性が確立できていないという、セキュリティ警告を受けた場合は、『OK』をクリックしてください。

8. When the installation completes, restart Eclipse.
 インストールが完了したら、Eclipseを再起動してください。


Configuring the ADT Plugin
ADTプラグインの設定

After you've successfully downloaded the ADT as described above, the next step is to modify your ADT preferences in Eclipse to point to the Android SDK directory:
前記説明どおりにADTをのダウンロード成功後、次のステップは、ADTのEclipseが指し示すAndroidSDKディレクトリの選択を変更することです:

1. Select Window > Preferences... to open the Preferences panel (Mac OS X: Eclipse > Preferences).
 Window > Preferences を選択し、Preferencesウィンドウを開きます。(Mac OS の場合、 Eclipse > Preferences)

2. Select Android from the left panel.
 左のパネルから『Android』を選択します。

You may see a dialog asking whether you want to send usage statistics to Google.
 Googleに利用統計の送信を望むかどうかを、尋ねるダイアログを見ることがあります。
 
If so, make your choice and click Proceed.
 もしそうなら、選択を決めて『Proceed』をクリックしてください。

You cannot continue with this procedure until you click Proceed.
 『Proceed』をクリックするまで、この手続きは継続できません。

3. For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory.
 メインパネルの『SDK Location』に対し、『Browse...』をクリックし、ダウンロードされたSDKディレクトリを見つけてください。

4. Click Apply, then OK.
 『Apply』をクリックしてください。よろしければ『OK』をクリックしてください。

Done! If you haven't encountered any problems, then the installation is complete.
終了!もし、問題が発生しなければ、インストールは完了です。

If you're installing the Android SDK for the first time, return to Installing the SDK to complete your setup.
もし、初めてのAndroidSDKのインストールだった場合、『Installing the SDK』に戻ってセットアップを完了してください。


Troubleshooting ADT Installation
ADTインストールのトラブル解決

If you are having trouble downloading the ADT plugin after following the steps above, here are some suggestions:
もし、前記ステップの後に、ADTプラグインのダウンロードトラブルがあれば、いくつかの提案があります:

If Eclipse can not find the remote update site containing the ADT plugin, try changing the remote site URL to use http, rather than https.
 もし、EclipseがADTプラグインを含む自動更新サイトを見つけられなければ、自動更新サイトのURLをhttpsではなくhttlに変えてみて下さい。

つまり、自動更新サイトの『Location』にセットしてください:
 
http://dl-ssl.google.com/android/eclipse/

If you are behind a firewall (such as a corporate firewall), make sure that you have properly configured your proxy settings in Eclipse.
 もし、ファイアーフォールがある場合(企業ファイアーフォール等)、Eclipseのプロキシー設定が正しく設定されているか確認してください。

In Eclipse, you can configure proxy information from the main Eclipse menu in Window (on Mac OS X, Eclipse) > Preferences > General > Network Connections.
 Eclipseの、Window (on Mac OS X, Eclipse) > Preferences > General > Network Connections からプロキシー情報を設定できます。


If you are still unable to use Eclipse to download the ADT plugin as a remote update site, you can download the ADT zip file to your local machine and manually install it:
もし、まだ、Eclipseからの自動更新サイトでADTプラグインがダウンロードを利用することができなければ、ADT zipファイルをダウンロードしローカルマシンに手作業でインストールすることができます。

1. Download the current ADT Plugin zip file from the table below (do not unpack it).
  以下の表から現在のADTプラグインzipファイルをダウンロードしてください(解凍はしないでださい)。

Name Package Size MD5 Checksum
ADT 11.0.0 ADT-11.0.0.zip 5520455 bytes 8f01ecf456f28a90ba3dcf89cfeb37dc

2. Follow steps 1 and 2 in the default install instructions (above).
 既定のインストール手順(前記)のステップ1と2に従ってください。

3. In the Add Site dialog, click Archive.
 サイト追加のダイアログで、『Archive』をクリックしてください。

4. Browse and select the downloaded zip file.
 ダウンロードされたzipファイルを『Brouse』し選択してください。 

5. Enter a name for the local update site (e.g., "Android Plugin") in the "Name" field.
 『Name』フィールドのローカル更新サイト(たとえば "Android Plugin") の名前を入力してください。

6. Click OK.
 『OK』をクリックしてください。

7. Follow the remaining procedures as listed for default installation above, starting from step 4.
 リスト表示された既定のインストール手続きの残りも前記に従って、ステップ4から開始してください。

To update your plugin once you've installed using the zip file, you will have to follow these steps again instead of the default update instructions.
一度zipファイルによりインストールされたプラグインの更新は、既定の更新手順の代わりに、再度これらのステップに従うようにしてください。


Other install errors
その他のインストールエラー

Note that there are features of ADT that require some optional Eclipse components (for example, WST).
いくつかの選択可能なEclipseコンポーネント(たとえばWST)を要求する、ADTの機能があることに注意してください。

If you encounter an error when installing ADT, your Eclipse installion might not include these components.
もし、ADTのインストールの際にエラーに遭遇したら、Eclipseのインストールはこれらのコンポーネントを含んでいない場合があります。

For information about how to quickly add the necessary components to your Eclipse installation, see the troubleshooting topic ADT Installation Error: "requires plug-in org.eclipse.wst.sse.ui".
Eclipseインストールに必要なコンポーネントを迅速に加える方法についての情報は、トラブルシューティングのトピック『ADT Installation Error: "requires plug-in org.eclipse.wst.sse.ui"』を見てください。

For Linux users
Linuxユーザーの方

If you encounter this error when installing the ADT Plugin for Eclipse:
もし、EclipseのADTプラグインインストレーションの際にエラーに遭遇したら:

--
An error occurred during provisioning.
Cannot connect to keystore.
JKS
--

...then your development machine lacks a suitable Java VM.
...開発マシンには適切なJavaVMが存在しません。

Installing Sun Java 6 will resolve this issue and you can then reinstall the ADT Plugin.
Sun Java 6 をインストールすると、この結果を解決し、次にADTプラグインを再インストールできます。


Updating the ADT Plugin
ADTプラグインの更新

From time to time, a new revision of the ADT Plugin becomes available, with new features and bug fixes.
随時、新しい機能とバグ修整された、新しいリビジョンADTプラグインが利用可能になります。

Generally, when a new revision of ADT is available, you should update to it as soon as convenient.
一般的には、ADTの新しいリビジョンが利用可能になれば、できるだけ早く手近に更新するべきです。

In some cases, a new revision of ADT will have a dependency on a specific revision of the Android SDK Tools.
場合によっては、ADTの新しいリビジョンはAndroidSDKツールの特殊なリビジョンに依存します。

If such dependencies exist, you will need to update the SDK Tools component of the SDK after installing the new revision of ADT.
もし、そのような依存性が存在した場合、ADTの新しいリビジョンのインストールの後、AndroidSDKのSDKツールコンポーネントの更新が必要になります。

To update the SDK Tools component, use the Android SDK and AVD Manager, as described in Adding SDK Components.
SDKツールコンポーネントの更新は、SDKコンポーネントの追加の説明に従って、AndroidSDKとSVDマネージャーを使ってください。

To learn about new features of each ADT revision and also any dependencies on the SDK Tools, see the listings in the Revisions section. それぞれのADTリビジョンの新しい機能とSDKツールでの依存性について学ぶために、『Revisions』セクションのリストを見てください。

To determine the version currently installed, open the Eclipse Installed Software window using Help > Software Updates and refer to the version listed for "Android Development Tools".

現在インストールされているバージョンを判定するには、Help > Software Updates and refer to the version listed for "Android Development Tools"をつかって『Eclipse Installed Software』ウィンドウを開いてください。

Follow the steps below to check whether an update is available and, if so, to install it.
以下のステップに従って、アップデートが利用可能かチェックし、もし可能なら、インストールしてください。

1. Select Help > Check for Updates.
  Helpを選択肢、更新を確認してください。

If there are no updates available, a dialog will say so and you're done.
  もし利用可能な更新が無ければ、ダイアログにそのように表示されるので、完了です。

2. If there are updates available, select Android DDMS, Android Development Tools, and Android Hierarchy Viewer, then click Next.
  もし利用可能な更新があれば、Android DDMS、Android Development Tools、そしてAndroid Hierarchy Viewerを選択し、よろしければ『Next』をクリックしてください。

3. In the Update Details dialog, click Next.
 『Update Details』ダイアログで、『Next』をクリックしてください。

4. Read and accept the license agreement and then click Finish.
  ライセンス契約を読んで受け入れてください。よろしければ『Finish』をクリックしてください。

This will download and install the latest version of Android DDMS and Android Development Tools.
  これは、Android DDMSとAndroid Development Toolsの最新版をダウンロードしインストールします。

5. Restart Eclipse.
  Eclipseをリスタートします。

If you encounter problems during the update, remove the existing ADT plugin from Eclipse, then perform a fresh installation, using the instructions for Installing the ADT Plugin.
もし、更新中にエラーに遭遇したら、Eclipseから存在するADTプラグインを取り除いてください、そして『Installing the ADT Plugin』の手順を使って新規インストールを実行してください。