/// <summary> /// convert the 3D sphere to a 2D sphere /// </summary> /// <param name="distance">from the user to the screen</param> /// <returns></returns> private Sphere2D ToSphere2D(double distance) { Point2D center2D = center.Projection(distance); double temp = (double)Math.Sqrt(center.X * center.X + center.Y * center.Y); double radius2D = (radius + temp) * distance / (distance - center.Z) - center2D.Magnitude; Sphere2D sphere2D = new Sphere2D(center2D, radius2D); return(sphere2D); }
public void Draw(Graphics gr, Pen pen, double distance) { new Line2D(p1.Projection(distance), p2.Projection(distance)).Draw(gr, pen); endPoints[1].Draw(gr, Color.Red, distance); }
/// <summary> /// Draw the line to the screen /// </summary> /// <param name="gr"></param> /// <param name="distance"></param> public void Draw(Graphics gr, double distance) { gr.DrawLine(pen, p1.Projection(distance).PointF, p2.Projection(distance).PointF); }