Exemplo n.º 1
0
        public SceneDescription GetScene(int frame, double fps)
        {
            SceneDescription result = new SceneDescription();

            result.CameraAperture = 2.0;

            double t = frame / fps;

            double r = 600 - t * 2.53;

            // factor of attenuation of camera's sinusoidal motions (the closer to black hole - the calmer the flight is)
            double calmFactor = Math.Pow((600 - r) / 575, 20);

            double phi   = t * 3;
            double theta = 84
                           + 8 * Math.Sin(phi * Math.PI / 180) * (1 - calmFactor) // precession
                           + 3 * calmFactor;

            result.ViewAngle       = phi;
            result.ViewDistance    = r;
            result.ViewInclination = theta;
            result.CameraAperture  = 24.00 / 500.0 * r + 3.2;
            result.CameraTilt      = 8.0 * Math.Cos(phi * Math.PI / 180) * (1 - calmFactor);
            result.CameraYaw       = calmFactor * 1.0; // we will be 'landing' on the accretion disc...

            return(result);
        }
        public SceneDescription GetScene(int frame, double fps)
        {
            SceneDescription result = new SceneDescription();
            result.CameraAperture = 2.0;

            double t = frame / fps;

            double r = 600 - t * 2.53;

            // factor of attenuation of camera's sinusoidal motions (the closer to black hole - the calmer the flight is)
            double calmFactor = Math.Pow((600 - r) / 575, 20);

            double phi = t*3;
            double theta = 84
                + 8 * Math.Sin(phi * Math.PI / 180) * (1 - calmFactor) // precession
                + 3 * calmFactor;

            result.ViewAngle = phi;
            result.ViewDistance = r;
            result.ViewInclination = theta;
            result.CameraAperture = 24.00/500.0*r + 3.2;
            result.CameraTilt = 8.0 * Math.Cos(phi * Math.PI / 180) * (1 - calmFactor);
            result.CameraYaw =  calmFactor * 1.0; // we will be 'landing' on the accretion disc...

            return result;
        }
Exemplo n.º 3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sizex">Image width</param>
 /// <param name="sizey">Image height</param>
 /// <param name="scene">Scene description</param>
 /// <param name="frame">Number of frame rendered</param>
 /// <param name="quality">Render quality (default: Medium)</param>
 public RayProcessor(int sizex, int sizey, SceneDescription scene, int frame, RenderQuality quality, string outputPath)
 {
     this.sizex = sizex;
     this.sizey = sizey;
     this.frame = frame;
     sceneDescription = scene;
     this.Quality = quality;
     this.OutputPath = outputPath;
 }
 public RayIllustrationGenerator(SceneDescription scene)
 {
     this.sceneDescription = scene;
 }