|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteinshader.math.SlerpDemo
public class SlerpDemo
Tests the SLERP algorithm.
The SLERP algorithm is tested using the rotations for three amino
acids in the 1JUN.pdb file: CYS 273, GLY 274, and GLY 275, which
form Loop 1 of Model 1 (which happens to be on Chain A).
Values calculated by the SegmentFactory for the three vectors [N B T]
were printed out by debugging code and are used here testing whether
the SLERP interpolation seems reasonable.
| Field Summary | |
|---|---|
static int |
BANNER_WIDTH
The banner width is the number of asterisks to print on the line line above or below a banner title. |
| Constructor Summary | |
|---|---|
SlerpDemo()
Creates a SlerpDemo object vectors and quaternions that can be used for testing. |
|
| Method Summary | |
|---|---|
String |
createRepeats(char ch,
int n)
Returns a String with the character given as an argument repeated n number of times. |
void |
interpolateAndPrint(Quaternion quat1,
Quaternion quat2,
double t)
Interpolates between the two quaternions given as arguments and then prints the result quaterion along with the [N B T] equivalent to the quaternion. |
void |
interpolateQ1AndQ1()
Interpolates between Q1 (for CYS 273) and itself and prints the results. |
void |
interpolateQ1AndQ2()
Interpolates between Q1 (for CYS 273) and Q2 (for GLY 274) and prints the results. |
void |
interpolateQ2AndQ3()
Interpolates between Q2 (for GLY 274) and Q3 (for GLY 275) and prints the results. |
static void |
main(String[] args)
Creates a SlerpDemo object and uses it to the SLERP algorithm. |
void |
printBanner(String title,
String message)
Prints a banner with a row of asterisks above and below the title, and then a message right below the banner. |
void |
printColumnVectors(Vec3d N,
Vec3d B,
Vec3d T)
Prints the 3 column vectors to standard out. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BANNER_WIDTH
| Constructor Detail |
|---|
public SlerpDemo()
| Method Detail |
|---|
public void interpolateQ1AndQ2()
public void interpolateQ2AndQ3()
public void interpolateQ1AndQ1()
public void printBanner(String title,
String message)
title - the title to place in the banner.message - a message to print right below the banner.
public String createRepeats(char ch,
int n)
ch - the char to repeat.n - the number of times to repeat ch.
public void printColumnVectors(Vec3d N,
Vec3d B,
Vec3d T)
N - normal - the 3rd column vector of the rotation matrix.B - binormal - the 2nd column vector of the rotation matrix.T - tangent - the 1st column vector of the rotation matrix.
public void interpolateAndPrint(Quaternion quat1,
Quaternion quat2,
double t)
quat1 - the first quaternion for the interplation.quat2 - the second quaternion for the interplation.t - the parameter t should be between 0.0 and 1.0.public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||