public class FEUtilities extends Object
Constructor and Description |
---|
FEUtilities() |
Modifier and Type | Method and Description |
---|---|
static double |
calcAngle(Line2D line1,
Line2D line2)
Calculate the angle (in radians) in between the given vectors.
|
static double |
calcLengthRatio(Line2D line1,
Line2D line2)
Calculate the ratio of line1's length and line2's length.
|
static double |
computeAngle(double xhead,
double yhead,
double xtail,
double ytail)
Given a 2D vector, find the angle (in radians) formed between
this vector and the horizontal vector pointing in the positive
x direction.
|
static double |
distance(double x1,
double y1,
double x2,
double y2)
Return the Euclidean distance between
two points, (x1, y1) and (x2, y2).
|
static double |
distanceSquared(double x1,
double y1,
double x2,
double y2)
Return the square of the distance between
two points, (x1, y1) and (x2, y2).
|
static double |
dotProduct(double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
Return the dot product of the vector (x1, y1)(x2, y2)
and the vector (x2, y2)(x3, y3).
|
static double |
dotProduct(double p1xh,
double p1yh,
double p1xt,
double p1yt,
double p2xh,
double p2yh,
double p2xt,
double p2yt)
Return the dot product of the vector (p1xh, p1yh)(p1xt, p1yt)
and the vector (p2xh,p2yh)(p2xt, p2yt)
h = head, t = tail, tail-------->head
|
static double |
findArea(Point2D p1,
Point2D p2,
Point2D p3)
Given three points each represents the vertex of a triangle,
return the area of this triangle.
|
static double |
findSlope(double p1x,
double p1y,
double p2x,
double p2y)
Find the slope of the line formed by two points
(p1x, p1y) and (p2x, p2y).
|
static double |
pathLength(double[] xvals,
double[] yvals,
int num)
Return the total pathlength by summing over the distance of
consecutive points in the array.
|
static double |
pathLength(double[] xvals,
double[] yvals,
int startIndex,
int endIndex)
calculate the path length starting from the startIndex to the
endIndex (inclusive) of the points in the array.
|
public static double calcAngle(Line2D line1, Line2D line2)
public static double calcLengthRatio(Line2D line1, Line2D line2)
public static double computeAngle(double xhead, double yhead, double xtail, double ytail)
public static double distance(double x1, double y1, double x2, double y2)
public static double distanceSquared(double x1, double y1, double x2, double y2)
public static double dotProduct(double x1, double y1, double x2, double y2, double x3, double y3)
public static double dotProduct(double p1xh, double p1yh, double p1xt, double p1yt, double p2xh, double p2yh, double p2xt, double p2yt)
public static double findArea(Point2D p1, Point2D p2, Point2D p3)
public static double findSlope(double p1x, double p1y, double p2x, double p2y)
public static double pathLength(double[] xvals, double[] yvals, int num)
public static double pathLength(double[] xvals, double[] yvals, int startIndex, int endIndex)
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.