public Point3D Function double double int code switch code case return

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
public Point3D Function(double u, double v, int code)
{
switch (code)
{
case 0:
return BezierSurface.drawBezierSurface(u, v);
case 1:
return new Point3D(5 * Math.Cos(u) * Math.Atan(v), 5 * Math.Sin(u) * Math.Tanh(v), 5 * Math.Tanh(u * v));
case 2:
return new Point3D((5 + Math.Cos(u)) * Math.Cos(v), (5 + Math.Cos(u)) * Math.Sin(v), 5 * Math.Sin(u));
case 3:
return new Point3D(2 * Math.Cos(u), Math.Sin(u), v);
default:
return new Point3D(0, 0, 0);
}
}