##
org.proteinshader.math

Class HermiteDemo

java.lang.Object
**org.proteinshader.math.HermiteDemo**

public class **HermiteDemo**

- extends Object

Performs some simple tests on the Hermite class.

**Field Summary** |

`static int` |
**SEGMENTS**
The number of segments to divide the curve into is 10,
so the total number of points printed will be 11,
including the points for t = 0.0 and t = 1.0. |

**Method Summary** |

`static void` |
**main**(String[] args)
Creates a start and end point (each with a tangent vector)
to plug into a Hermite object. |

`static void` |
**printCurve**(Hermite hermite)
Uses the Hermite object to obtain and print interpolated points
from parameter t = 0.0 to t = 1.0. |

`static void` |
**printStartAndEndPoints**(Point3d p1,
Point3d p2,
Vec3d tan1,
Vec3d tan2)
Prints the start and end points along with their tangents. |

**Methods inherited from class java.lang.Object** |

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait` |

###
SEGMENTS

public static final int **SEGMENTS**

- The number of segments to divide the curve into is 10,
so the total number of points printed will be 11,
including the points for t = 0.0 and t = 1.0.

**See Also:**- Constant Field Values

###
HermiteDemo

public **HermiteDemo**()

###
main

public static void **main**(String[] args)

- Creates a start and end point (each with a tangent vector)
to plug into a Hermite object. A helper method is then used to
increment parameter t from 0.0 to 1.0 while printing the
points (and tangents) in between the start and end points.
When graphed, these point should form a curve.

###
printStartAndEndPoints

public static void **printStartAndEndPoints**(Point3d p1,
Point3d p2,
Vec3d tan1,
Vec3d tan2)

- Prints the start and end points along with their tangents.

**Parameters:**`p1`

- the start point`p2`

- the end point`tan1`

- the tangent of the start point.`tan2`

- the tangent of the end point.

###
printCurve

public static void **printCurve**(Hermite hermite)

- Uses the Hermite object to obtain and print interpolated points
from parameter t = 0.0 to t = 1.0.

The total number of points is SEGMENTS + 1, and each point is
printed along with its tangent.

**Parameters:**`hermite`

- a Hermite object with a start and end point.

*Copyright © 2007-2008*