public void InitStar() { Draw3D D3D = new Draw3D(); Point3D projectPoint = new Point3D(); if (zoom < 1) { zoom = 1; } scale = (256 / zoom); scalePoint = new Point3D(scale, scale, scale); projectPoint = D3D.DrawAzimuth(currentPoint, elevation, azimuth, rotaPoint, movePoint, scalePoint); renderDepth = (projectPoint.Z / centerX); }
public Canvas Project3D() { Draw3D D3D = new Draw3D(); projectPoint = new Point3D(); if (zoom < 1) { zoom = 1; } scale = (256 / zoom); scalePoint = new Point3D(scale, scale, scale); projectPoint = D3D.DrawAzimuth(currentPoint, elevation, azimuth, rotaPoint, movePoint, scalePoint); renderDepth = projectPoint.Z / centerX; starGFX.Margin = new Thickness(-(starGFX.Width / 2), -(starGFX.Height / 2), 0, 0); starSEL.Margin = new Thickness(-(starGFX.Width * 2) / 2, -(starGFX.Height * 2) / 2, 0, 0); starCanvas.Margin = new Thickness(centerX +projectPoint.X, centerY + projectPoint.Y, 0, 0); return starCanvas; }
public void InitStar() { Draw3D D3D = new Draw3D(); Point3D projectPoint = new Point3D(); starGFX.Width = 2; starGFX.Height = 2; scale = (centerX / zoom); if (scale < 1) scale = 1; scalePoint = new Point3D(scale, scale, scale); projectPoint = D3D.DrawAzimuth(currentPoint, elevation, azimuth, rotaPoint, movePoint, scalePoint); renderDepth = (projectPoint.Z / centerX); distanceDepth = (distance/zoom); renderD = starColor.Color.ScA * (float)(distanceDepth); }
private Line DrawLine(Point3D start, Point3D end,double elevation,double azimuth,double reverse =1,Point3D rotationPoint = default(Point3D)) { Draw3D D3D = new Draw3D(); Line returnLine = new Line(); Point3D startPoint = D3D.DrawAzimuth(start, elevation, azimuth,rotationPoint); Point3D endPoint = D3D.DrawAzimuth(end, elevation, azimuth,rotationPoint); returnLine.X1 = (startPoint.X*reverse)+centerX; returnLine.X2 = (endPoint.X*reverse)+centerY; returnLine.Y1 = (startPoint.Y*reverse)+centerY; returnLine.Y2 = (endPoint.Y*reverse)+centerY; depthPoint = startPoint; return returnLine; }