Hi,
Can somebody please convert the following LISP command to C#.Net.
(setq A90A(POLAR A90 (DTR 32.0) A81))
I have tried this:
A90A = new Point3d(A90.X + (A81 * Math.Cos(32)), A90.Y + (A81 * Math.Sin(32)), A90.Z);
I am getting the resultant angle in Autocad as 33.09581, I need to get 32.00000.
Regards
Sudarsan
Solved! Go to Solution.
Solved by hgasty1001. Go to Solution.
Hi,
Try this little functions:
public Point3d Polar(Point3d bpoint, double r, double theta)
{
return new Point3d(bpoint.X + r * Math.Cos(theta), bpoint.Y + r * Math.Sin(theta), bpoint.Z);
}
public double d2r(double degree)
{
return (Math.PI * degree) / 180;
}
So your code will looks like:
A90=Polar(A90,A81,d2r(32));
Gaston Nunez