Esempio n. 1
0
 private void setConstants() {
   r = radius.getValue();
   fr = frequ.getValue();
   l = stick.getValue();
   rr = r / fr;
   rrabs = Math.abs(rr);
   dt = (tmax.getValue() - tmin.getValue()) / tResolution.getValue();
 }
Esempio n. 2
0
 public double xValue(double t) {
   if (t < 0.1) {
     b = bb.getValue();
     if ((b < 0.0) || (b > Math.PI / 2)) {
       bb.setValue(Math.max(0, Math.min(b, Math.PI / 2))); // This does not belong here
       b = bb.getValue();
     }
     a = 3.0 * Math.cos((b - Math.PI / 8) * 4 / 3);
     b = Math.tan(b);
   }
   return a * (Math.cos(t) / sinsq(t) + (1 - b) * (2 / sinsq(t) - 1) / Math.sqrt(2.0));
 }
Esempio n. 3
0
 protected Vector3D value(double t) {
   double r = Math.exp(Slope.getValue() * t);
   double x = 2 * r * Math.cos(t) / (1 + r * r);
   double y = 2 * r * Math.sin(t) / (1 + r * r);
   double z = (1 - r * r) / (1 + r * r);
   return new Vector3D(x, y, z);
 }
Esempio n. 4
0
 protected double force(double r) {
   if (Math.abs(r) < 0.01) return 0;
   else return -aa.getValue() / (r * r);
 }
Esempio n. 5
0
 public Vector3D surfacePoint(double u, double v) {
   double x = aa.getValue() * v;
   double y = bb.getValue() * u;
   double z = cc.getValue() * (u * u * u - 3 * u * v * v);
   return new Vector3D(x, y, z);
 }