ASKER
ASKER
import java.text.DecimalFormat;
public class Data1 {
public static void main(String args[]) {
DecimalFormat df = new DecimalFormat("00.00");
double h = 30;
double r = 5;
double a = 0;
double b = 0;
System.out.println("angle a\t angel b x");
for(double x = 0; x < 60; x +=0.25){
//b = ArcCos([r(x+r) + h sqrt(-r^2+(x+r)^2+h^2)] / [(x+r)^2+h^2]) ................... (eq. 7)
b = Math.acos((r*(x+r) - h*Math.sqrt(-Math.pow(r,2)+Math.pow((x+r),2)+
Math.pow(h,2))) / (Math.pow((x+r),2)+Math.pow(h,2)));
// a = (1/r)*sqrt((x+r)^2+h^2-r^2) -h/r - ArcCos([r(x+r) - h sqrt(-r^2+(x+r)^2+h^2)] / [(x+r)^2+h^2]) ... (eq. 11)
a=(1/r)*Math.sqrt(Math.pow((x+r),2)+Math.pow(h,2)-Math.pow(r,2))-(h/r)-
Math.acos((r*(x+r)-h*Math.sqrt(-1*Math.pow(r,2)+Math.pow((x+r),2)+
Math.pow(h,2)))/((Math.pow((x+r),2)+Math.pow(h,2))));
// System.out.println(" " + df.format(a*(180/Math.PI)) + " " + df.format(b*(180/Math.PI)) + " " + df.format(x));
System.out.println(" " + df.format(a) + " " + df.format(b) + " " + df.format(x));
}
}
}
ASKER
ASKER
ASKER
The Math / Science topic primarily includes discussions of mathematics, physics, statistics and economic analysis, but also biology, chemistry and other sciences.
TRUSTED BY
Also, if a is defined as taking two parameters then how do you drop one? How do you get from a(x,b) to just a(x)? The only way I could think of where that would make sense would be if b cancelled out of the equation, but it's not going to.
We need a lot more info before we can answer this question.