Setting SphereVisual3D center

Jun 13, 2012 at 10:03 PM
Edited Jun 13, 2012 at 10:11 PM

Hey Objo. I'm trying to change the center of a SphereVisual3D object and make it a 2D object by setting the Z parameter to 0. The problem is it won't flatten the sphere. Is there any way to do this? Or is there any other way to make a 2D filled in circle using your toolkit? Thanks. Here's my code:


private void Mouse_Down(object sender, MouseButtonEventArgs e)
     lineOne = (Point3D)GetPoints(e);

private void Mouse_Up(object sender, MouseButtonEventArgs e)
     lineTwo = (Point3D)GetPoints(e);
     SphereVisual3D sphere = new SphereVisual3D();
     sphere.Center = new Point3D((lineOne.X + lineTwo.X) / 2, (lineOne.Y + lineTwo.Y) / 2, 0);
     sphere.Radius = Math.Abs(lineOne.X - lineTwo.X) / 2;
Jun 15, 2012 at 5:09 AM

Try a ScaleTransform3D(1,1,0). I am not sure it will look good, but it should flatten the sphere..