예제 #1
0
        public static double[,] XYToIntensities(IntensityMode mode, int[] xs, int[] ys, int width, int height, int sampleWidth)
        {
            double NormPDF(double x, double mu, double sigma)
            {
                return((1 / (sigma * Math.Sqrt(2 * Math.PI))) * Math.Exp(-0.5 * (x - mu / sigma) * (x - mu / sigma)));
            }

            double[,] output = new double[height, width];
            if (mode == IntensityMode.gaussian)
            {
                for (int i = 0; i < xs.Length; i++)
                {
                    for (int j = -2 * sampleWidth; j < 2 * sampleWidth; j++) // 2 Standard deviations is ~0.95, i.e. close enough
                    {
                        for (int k = -2 * sampleWidth; k < 2 * sampleWidth; k++)
                        {
                            if (xs[i] + j > 0 && xs[i] + j < width && ys[i] + k > 0 && ys[i] + k < height)
                            {
                                output[ys[i] + k, xs[i] + j] += NormPDF(Math.Sqrt(j * j + k * k), 0, sampleWidth);
                            }
                        }
                    }
                }
            }
            else if (mode == IntensityMode.density)
            {
                (int x, int y)[] points = xs.Zip(ys, (x, y) => (x, y)).ToArray();
예제 #2
0
    /// <summary>
    /// Updates AI in the PeakFade phase. Enemies should ramp down in difficulty/number until the game intensity is below the 'relaxUpperBound'
    /// </summary>
    private void UpdatePeakFade()
    {
        // If the game intensity is lower than the 'relaxUpperBound', enter 'Relax' mode. Equivalently, if no more enemies remain,
        // enter relax mode and heal the player before starting the next epoch.
        bool enterRelaxMode = (gameIntensity <= epochSettings.relaxUpperBound || enemyMob.EnemyCount == 0);

        // If the AIDirector should transition to 'Relax' mode
        if (enterRelaxMode)
        {
            // Enter relax mode, maintaining the game intensity to a minimum for 'relaxDuration' seconds ramping up in difficulty again
            intensityMode = IntensityMode.Relax;

            Debug.LogWarning("Enter RELAX mode");
        }

        // Compute the difficulty the user is facing. The higher the game intensity, the higher the factor. The game will then adjust to reduce difficulty
        float difficultyFactor = gameIntensity / epochSettings.peakIntensityThreshold;

        // If the AI Director should adapt the enemies' stats to the user's skill level
        if (adaptEnemyStats)
        {
            // Update the enemies' stats to give the user an easier time if the difficulty is too high
            enemyMob.SetEnemyStrength(1 / difficultyFactor);
            enemyMob.SetEnemyDefense(1 / difficultyFactor);
        }

        // If the AI Director should adapt the enemies' behavior to the user's skill level
        if (adaptEnemyBehavior)
        {
            // Update the enemies' behavior to give the user an easier time if the difficulty is too high
            enemyMob.SetEnemySpeed(1 / difficultyFactor);
            enemyMob.SimultaneousAttackers = (int)(Mathf.Max(1, defaultEnemyAISettings.simultaneousAttackers / difficultyFactor));
            enemyMob.Settings.attackRate   = (defaultEnemyAISettings.attackRate * difficultyFactor * 1.7f);
            enemyMob.SetBattleCircleRadius(defaultEnemyAISettings.battleCircleRadius + (difficultyFactor / 4));

            Debug.Log("Set simultaneous attackers to: " + enemyMob.SimultaneousAttackers);
            Debug.Log("Set attack rate to: " + enemyMob.Settings.attackRate);

            // If at least '1/peakFadeDespawnRate' seconds have passed since the last enemy was de-spawned
            if ((Time.time - lastEnemyDespawnTime) >= (1.0f / epochSettings.peakFadeDespawnRate))
            {
                // De-spawn another enemy. This ensures that game intensity doesn't rise much higher than the threshold
                enemyMob.DespawnEnemy();

                Debug.Log("DESPAWN ENEMY");

                // Update the last time an enemy was killed by the AIDirector.
                lastEnemyDespawnTime = Time.time;
            }
            else
            {
                Debug.Log("Only " + (Time.time - lastEnemyDespawnTime) + "s have passed since last enemy despawn.");
            }
        }

        Debug.LogWarning("Difficulty factor: " + difficultyFactor);
    }
예제 #3
0
        //double _max_intensity; // max ray intensity updated on

        public Renderer()
        {
            this._feature_size   = 20.0;
            this._ray_color_mode = RayColorMode.RayColorWavelen;
            this._intensity_mode = IntensityMode.IntensityIgnore;
            _styles_color[(int)Style.StyleForeground] = new Rgb(1.0, 1.0, 1.0, 1.0);
            _styles_color[(int)Style.StyleBackground] = new Rgb(0.0, 0.0, 0.0, 1.0);
            _styles_color[(int)Style.StyleRay]        = new Rgb(1.0, 0.0, 0.0, 1.0);
            _styles_color[(int)Style.StyleSurface]    = new Rgb(0.5, 0.5, 1.0, 1.0);
            _styles_color[(int)Style.StyleGlass]      = new Rgb(0.8, 0.8, 1.0, 1.0);
        }
예제 #4
0
    /// <summary>
    /// Update the AI in 'BuildUp' mode. Enemies should start to spawn in order to reach the 'peakThreshold' intensity.
    /// </summary>
    private void UpdateBuildUp()
    {
        // Debug.Log ("Currently in BUILD UP mode. Number of enemies spawned: " + enemiesSpawned + ". Enemies remaining: " + enemyMob.EnemyCount);

        // If all enemies have been spawned this epoch and all of them are dead, the user killed all the enemies before reaching the SustainPeak mode
        if (enemiesSpawned == epochSettings.maxEnemies && enemyMob.EnemyCount == 0)
        {
            // The current epoch is finished since all enemies are dead. Thus, skip directly to RELAX mode to get ready for the next epoch
            intensityMode = IntensityMode.Relax;

            Debug.LogWarning("All enemies killed. Skip to RELAX mode");

            // Return from this function. This avoids spawning another enemy before entering RELAX mode.
            return;
        }

        // If there are less enemies spawned than the current epoch permits, keep spawning enemies until the max is reached.
        if (enemyMob.EnemyCount < epochSettings.maxEnemies)
        {
            // If at least '1/buildUpSpawnRate' seconds have passed since the last enemy was spawned, it is time to spawn another enemy. Note that
            // 'epochSettings.buildUpSpawnRate' enemies should be spawned every second.
            if ((Time.time - lastEnemySpawnTime) >= (1 / epochSettings.buildUpSpawnRate))
            {
                // Spawn a new enemy in the level. The difficulty setting and 'maxEnemyWorth' is directly proportional to the current epoch number
                enemySpawner.SpawnEnemy(epoch, epoch, enemyMob);

                Debug.LogWarning("Spawn an enemy");

                // Update the time at which the last enemy was spawned.
                lastEnemySpawnTime = Time.time;

                // Increment the number of enemies spawned this epoch.
                enemiesSpawned++;
            }
        }

        // If the game's intensity has reached the peak intensity threshold, sustain this peak before ramping down again
        if (gameIntensity >= epochSettings.peakIntensityThreshold)
        {
            // Sustain the peak intensity threshold for 'sustainPeakDuration' and then ramp down the intensity
            intensityMode = IntensityMode.SustainPeak;

            Debug.LogWarning("Enter SUSTAIN PEAK mode");
        }
    }
예제 #5
0
    /// <summary>
    /// Update the AI Director whilst it is in 'SustainPeak' mode. The enemy onslaught should be constant for 'sustainPeakDuration'
    /// seconds and then ramp down accordingly.
    /// </summary>
    private IEnumerator UpdateSustainPeak()
    {
        // Choose a random amount of time (between a min and a max) to sustain the peak intensity of the game
        float sustainPeakDuration = UnityEngine.Random.Range(epochSettings.sustainPeakDuration.min,
                                                             epochSettings.sustainPeakDuration.max);

        Debug.LogWarning("Wait for " + sustainPeakDuration + " seconds");

        // Wait for 'sustainPeakDuration' seconds. This allows the game to maintain its intensity for sufficiently long before ramping back down
        for (float timer = sustainPeakDuration; timer >= 0.0f; timer -= Time.deltaTime)
        {
            yield return(null);
        }

        Debug.LogWarning("Enter PEAK FADE mode");

        // Switch to PeakFade mode. Since the peak intensity has been maintained for long enough, the difficulty should start ramping down
        intensityMode = IntensityMode.PeakFade;
    }
예제 #6
0
    /// <summary>
    /// Sarts the next epoch. Each epoch is essentially a wave of enemies controlled in difficulty by the AIDirector.
    /// </summary>
    private void StartNextEpoch()
    {
        // Increment the epoch we are at. Each epoch represents a succession of build up, sustain peak, peak fade and relax modes.
        epoch++;

        // Reset the enemy's spawn counter to zero. This variable keeps track of the number of enemies spawned in the current epoch.
        enemiesSpawned = 0;

        // Reset the enemy settings to default
        enemyMob.SimultaneousAttackers = defaultEnemyAISettings.simultaneousAttackers;
        enemyMob.Settings.attackRate   = defaultEnemyAISettings.attackRate;
        enemyMob.SetBattleCircleRadius(defaultEnemyAISettings.battleCircleRadius);

        // Update the settings for the next epoch.
        UpdateEpochSettings();

        // Switch to BuildUp mode. Each new epoch starts in BuildUp mode, which spawns enemies until the player's anxiety is high enough
        intensityMode = IntensityMode.BuildUp;

        Debug.LogWarning("START A NEW EPOCH: " + epoch);
    }
예제 #7
0
        public static double[,] XYToIntensities(IntensityMode mode, int[] xs, int[] ys, int width, int height, int sampleWidth)
        {
            double NormPDF(double x, double mu, double sigma)
            {
                return((1 / (sigma * Math.Sqrt(2 * Math.PI))) * Math.Exp(-0.5 * (x - mu / sigma) * (x - mu / sigma)));
            }

            double[,] output = new double[height, width];
            if (mode == IntensityMode.Gaussian)
            {
                double[,] intermediate = new double[height, width];
                int radius = 2; // 2 Standard deviations is ~0.95, i.e. close enough
                for (int i = 0; i < xs.Length; i++)
                {
                    if (xs[i] >= 0 && xs[i] < width && ys[i] >= 0 && ys[i] < height)
                    {
                        intermediate[ys[i], xs[i]] += 1;
                    }
                }

                double[] kernel = new double[2 * radius * sampleWidth + 1];
                for (int i = 0; i < kernel.Length; i++)
                {
                    kernel[i] = NormPDF(i - kernel.Length / 2, 0, sampleWidth);
                }

                for (int i = 0; i < height; i++)
                {
                    for (int j = 0; j < width; j++)
                    {
                        double sum       = 0;
                        double kernelSum = 0; // The kernelSum can be precomputed, but this gives incorrect output at the edges of the image
                        for (int k = -radius * sampleWidth; k <= radius * sampleWidth; k++)
                        {
                            if (i + k >= 0 && i + k < height)
                            {
                                sum       += intermediate[i + k, j] * kernel[k + kernel.Length / 2];
                                kernelSum += kernel[k + kernel.Length / 2];
                            }
                        }

                        output[i, j] = sum / kernelSum;
                    }
                }

                for (int i = 0; i < height; i++)
                {
                    for (int j = 0; j < width; j++)
                    {
                        double sum       = 0;
                        double kernelSum = 0;
                        for (int k = -radius * sampleWidth; k <= radius * sampleWidth; k++)
                        {
                            if (j + k >= 0 && j + k < width)
                            {
                                sum       += output[i, j + k] * kernel[k + kernel.Length / 2];
                                kernelSum += kernel[k + kernel.Length / 2];
                            }
                        }

                        output[i, j] = sum / kernelSum;
                    }
                }
            }
            else if (mode == IntensityMode.Density)
            {
                (int x, int y)[] points = xs.Zip(ys, (x, y) => (x, y)).ToArray();
예제 #8
0
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;

                if (Type != null)
                {
                    hashCode = hashCode * 59 + Type.GetHashCode();
                }

                if (Visible != null)
                {
                    hashCode = hashCode * 59 + Visible.GetHashCode();
                }

                if (LegendGroup != null)
                {
                    hashCode = hashCode * 59 + LegendGroup.GetHashCode();
                }

                if (Name != null)
                {
                    hashCode = hashCode * 59 + Name.GetHashCode();
                }

                if (UId != null)
                {
                    hashCode = hashCode * 59 + UId.GetHashCode();
                }

                if (Ids != null)
                {
                    hashCode = hashCode * 59 + Ids.GetHashCode();
                }

                if (CustomData != null)
                {
                    hashCode = hashCode * 59 + CustomData.GetHashCode();
                }

                if (Meta != null)
                {
                    hashCode = hashCode * 59 + Meta.GetHashCode();
                }

                if (MetaArray != null)
                {
                    hashCode = hashCode * 59 + MetaArray.GetHashCode();
                }

                if (HoverLabel != null)
                {
                    hashCode = hashCode * 59 + HoverLabel.GetHashCode();
                }

                if (Stream != null)
                {
                    hashCode = hashCode * 59 + Stream.GetHashCode();
                }

                if (UiRevision != null)
                {
                    hashCode = hashCode * 59 + UiRevision.GetHashCode();
                }

                if (X != null)
                {
                    hashCode = hashCode * 59 + X.GetHashCode();
                }

                if (Y != null)
                {
                    hashCode = hashCode * 59 + Y.GetHashCode();
                }

                if (Z != null)
                {
                    hashCode = hashCode * 59 + Z.GetHashCode();
                }

                if (I != null)
                {
                    hashCode = hashCode * 59 + I.GetHashCode();
                }

                if (J != null)
                {
                    hashCode = hashCode * 59 + J.GetHashCode();
                }

                if (K != null)
                {
                    hashCode = hashCode * 59 + K.GetHashCode();
                }

                if (Text != null)
                {
                    hashCode = hashCode * 59 + Text.GetHashCode();
                }

                if (TextArray != null)
                {
                    hashCode = hashCode * 59 + TextArray.GetHashCode();
                }

                if (HoverText != null)
                {
                    hashCode = hashCode * 59 + HoverText.GetHashCode();
                }

                if (HoverTextArray != null)
                {
                    hashCode = hashCode * 59 + HoverTextArray.GetHashCode();
                }

                if (HoverTemplate != null)
                {
                    hashCode = hashCode * 59 + HoverTemplate.GetHashCode();
                }

                if (HoverTemplateArray != null)
                {
                    hashCode = hashCode * 59 + HoverTemplateArray.GetHashCode();
                }

                if (DelaunaYAxis != null)
                {
                    hashCode = hashCode * 59 + DelaunaYAxis.GetHashCode();
                }

                if (AlphaHull != null)
                {
                    hashCode = hashCode * 59 + AlphaHull.GetHashCode();
                }

                if (Intensity != null)
                {
                    hashCode = hashCode * 59 + Intensity.GetHashCode();
                }

                if (IntensityMode != null)
                {
                    hashCode = hashCode * 59 + IntensityMode.GetHashCode();
                }

                if (Color != null)
                {
                    hashCode = hashCode * 59 + Color.GetHashCode();
                }

                if (VertexColor != null)
                {
                    hashCode = hashCode * 59 + VertexColor.GetHashCode();
                }

                if (FaceColor != null)
                {
                    hashCode = hashCode * 59 + FaceColor.GetHashCode();
                }

                if (CAuto != null)
                {
                    hashCode = hashCode * 59 + CAuto.GetHashCode();
                }

                if (CMin != null)
                {
                    hashCode = hashCode * 59 + CMin.GetHashCode();
                }

                if (CMax != null)
                {
                    hashCode = hashCode * 59 + CMax.GetHashCode();
                }

                if (CMid != null)
                {
                    hashCode = hashCode * 59 + CMid.GetHashCode();
                }

                if (ColorScale != null)
                {
                    hashCode = hashCode * 59 + ColorScale.GetHashCode();
                }

                if (AutoColorScale != null)
                {
                    hashCode = hashCode * 59 + AutoColorScale.GetHashCode();
                }

                if (ReverseScale != null)
                {
                    hashCode = hashCode * 59 + ReverseScale.GetHashCode();
                }

                if (ShowScale != null)
                {
                    hashCode = hashCode * 59 + ShowScale.GetHashCode();
                }

                if (ColorBar != null)
                {
                    hashCode = hashCode * 59 + ColorBar.GetHashCode();
                }

                if (ColorAxis != null)
                {
                    hashCode = hashCode * 59 + ColorAxis.GetHashCode();
                }

                if (Opacity != null)
                {
                    hashCode = hashCode * 59 + Opacity.GetHashCode();
                }

                if (FlatShading != null)
                {
                    hashCode = hashCode * 59 + FlatShading.GetHashCode();
                }

                if (Contour != null)
                {
                    hashCode = hashCode * 59 + Contour.GetHashCode();
                }

                if (LightPosition != null)
                {
                    hashCode = hashCode * 59 + LightPosition.GetHashCode();
                }

                if (Lighting != null)
                {
                    hashCode = hashCode * 59 + Lighting.GetHashCode();
                }

                if (HoverInfo != null)
                {
                    hashCode = hashCode * 59 + HoverInfo.GetHashCode();
                }

                if (HoverInfoArray != null)
                {
                    hashCode = hashCode * 59 + HoverInfoArray.GetHashCode();
                }

                if (ShowLegend != null)
                {
                    hashCode = hashCode * 59 + ShowLegend.GetHashCode();
                }

                if (XCalendar != null)
                {
                    hashCode = hashCode * 59 + XCalendar.GetHashCode();
                }

                if (YCalendar != null)
                {
                    hashCode = hashCode * 59 + YCalendar.GetHashCode();
                }

                if (ZCalendar != null)
                {
                    hashCode = hashCode * 59 + ZCalendar.GetHashCode();
                }

                if (Scene != null)
                {
                    hashCode = hashCode * 59 + Scene.GetHashCode();
                }

                if (IdsSrc != null)
                {
                    hashCode = hashCode * 59 + IdsSrc.GetHashCode();
                }

                if (CustomDataSrc != null)
                {
                    hashCode = hashCode * 59 + CustomDataSrc.GetHashCode();
                }

                if (MetaSrc != null)
                {
                    hashCode = hashCode * 59 + MetaSrc.GetHashCode();
                }

                if (XSrc != null)
                {
                    hashCode = hashCode * 59 + XSrc.GetHashCode();
                }

                if (YSrc != null)
                {
                    hashCode = hashCode * 59 + YSrc.GetHashCode();
                }

                if (ZSrc != null)
                {
                    hashCode = hashCode * 59 + ZSrc.GetHashCode();
                }

                if (ISrc != null)
                {
                    hashCode = hashCode * 59 + ISrc.GetHashCode();
                }

                if (JSrc != null)
                {
                    hashCode = hashCode * 59 + JSrc.GetHashCode();
                }

                if (KSrc != null)
                {
                    hashCode = hashCode * 59 + KSrc.GetHashCode();
                }

                if (TextSrc != null)
                {
                    hashCode = hashCode * 59 + TextSrc.GetHashCode();
                }

                if (HoverTextSrc != null)
                {
                    hashCode = hashCode * 59 + HoverTextSrc.GetHashCode();
                }

                if (HoverTemplateSrc != null)
                {
                    hashCode = hashCode * 59 + HoverTemplateSrc.GetHashCode();
                }

                if (IntensitySrc != null)
                {
                    hashCode = hashCode * 59 + IntensitySrc.GetHashCode();
                }

                if (VertexColorSrc != null)
                {
                    hashCode = hashCode * 59 + VertexColorSrc.GetHashCode();
                }

                if (FaceColorSrc != null)
                {
                    hashCode = hashCode * 59 + FaceColorSrc.GetHashCode();
                }

                if (HoverInfoSrc != null)
                {
                    hashCode = hashCode * 59 + HoverInfoSrc.GetHashCode();
                }

                return(hashCode);
            }
        }
예제 #9
0
        public bool Equals([AllowNull] Mesh3D other)
        {
            if (other == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return((Type == other.Type && Type != null && other.Type != null && Type.Equals(other.Type)) &&
                   (Visible == other.Visible && Visible != null && other.Visible != null && Visible.Equals(other.Visible)) &&
                   (LegendGroup == other.LegendGroup && LegendGroup != null && other.LegendGroup != null && LegendGroup.Equals(other.LegendGroup)) &&
                   (Name == other.Name && Name != null && other.Name != null && Name.Equals(other.Name)) &&
                   (UId == other.UId && UId != null && other.UId != null && UId.Equals(other.UId)) &&
                   (Equals(Ids, other.Ids) || Ids != null && other.Ids != null && Ids.SequenceEqual(other.Ids)) &&
                   (Equals(CustomData, other.CustomData) || CustomData != null && other.CustomData != null && CustomData.SequenceEqual(other.CustomData)) &&
                   (Meta == other.Meta && Meta != null && other.Meta != null && Meta.Equals(other.Meta)) &&
                   (Equals(MetaArray, other.MetaArray) || MetaArray != null && other.MetaArray != null && MetaArray.SequenceEqual(other.MetaArray)) &&
                   (HoverLabel == other.HoverLabel && HoverLabel != null && other.HoverLabel != null && HoverLabel.Equals(other.HoverLabel)) &&
                   (Stream == other.Stream && Stream != null && other.Stream != null && Stream.Equals(other.Stream)) &&
                   (UiRevision == other.UiRevision && UiRevision != null && other.UiRevision != null && UiRevision.Equals(other.UiRevision)) &&
                   (Equals(X, other.X) || X != null && other.X != null && X.SequenceEqual(other.X)) &&
                   (Equals(Y, other.Y) || Y != null && other.Y != null && Y.SequenceEqual(other.Y)) &&
                   (Equals(Z, other.Z) || Z != null && other.Z != null && Z.SequenceEqual(other.Z)) &&
                   (Equals(I, other.I) || I != null && other.I != null && I.SequenceEqual(other.I)) &&
                   (Equals(J, other.J) || J != null && other.J != null && J.SequenceEqual(other.J)) &&
                   (Equals(K, other.K) || K != null && other.K != null && K.SequenceEqual(other.K)) &&
                   (Text == other.Text && Text != null && other.Text != null && Text.Equals(other.Text)) &&
                   (Equals(TextArray, other.TextArray) || TextArray != null && other.TextArray != null && TextArray.SequenceEqual(other.TextArray)) &&
                   (HoverText == other.HoverText && HoverText != null && other.HoverText != null && HoverText.Equals(other.HoverText)) &&
                   (Equals(HoverTextArray, other.HoverTextArray) || HoverTextArray != null && other.HoverTextArray != null && HoverTextArray.SequenceEqual(other.HoverTextArray)) &&
                   (HoverTemplate == other.HoverTemplate && HoverTemplate != null && other.HoverTemplate != null && HoverTemplate.Equals(other.HoverTemplate)) &&
                   (Equals(HoverTemplateArray, other.HoverTemplateArray) ||
                    HoverTemplateArray != null && other.HoverTemplateArray != null && HoverTemplateArray.SequenceEqual(other.HoverTemplateArray)) &&
                   (DelaunaYAxis == other.DelaunaYAxis && DelaunaYAxis != null && other.DelaunaYAxis != null && DelaunaYAxis.Equals(other.DelaunaYAxis)) &&
                   (AlphaHull == other.AlphaHull && AlphaHull != null && other.AlphaHull != null && AlphaHull.Equals(other.AlphaHull)) &&
                   (Equals(Intensity, other.Intensity) || Intensity != null && other.Intensity != null && Intensity.SequenceEqual(other.Intensity)) &&
                   (IntensityMode == other.IntensityMode && IntensityMode != null && other.IntensityMode != null && IntensityMode.Equals(other.IntensityMode)) &&
                   (Color == other.Color && Color != null && other.Color != null && Color.Equals(other.Color)) &&
                   (Equals(VertexColor, other.VertexColor) || VertexColor != null && other.VertexColor != null && VertexColor.SequenceEqual(other.VertexColor)) &&
                   (Equals(FaceColor, other.FaceColor) || FaceColor != null && other.FaceColor != null && FaceColor.SequenceEqual(other.FaceColor)) &&
                   (CAuto == other.CAuto && CAuto != null && other.CAuto != null && CAuto.Equals(other.CAuto)) &&
                   (CMin == other.CMin && CMin != null && other.CMin != null && CMin.Equals(other.CMin)) &&
                   (CMax == other.CMax && CMax != null && other.CMax != null && CMax.Equals(other.CMax)) &&
                   (CMid == other.CMid && CMid != null && other.CMid != null && CMid.Equals(other.CMid)) &&
                   (ColorScale == other.ColorScale && ColorScale != null && other.ColorScale != null && ColorScale.Equals(other.ColorScale)) &&
                   (AutoColorScale == other.AutoColorScale && AutoColorScale != null && other.AutoColorScale != null && AutoColorScale.Equals(other.AutoColorScale)) &&
                   (ReverseScale == other.ReverseScale && ReverseScale != null && other.ReverseScale != null && ReverseScale.Equals(other.ReverseScale)) &&
                   (ShowScale == other.ShowScale && ShowScale != null && other.ShowScale != null && ShowScale.Equals(other.ShowScale)) &&
                   (ColorBar == other.ColorBar && ColorBar != null && other.ColorBar != null && ColorBar.Equals(other.ColorBar)) &&
                   (ColorAxis == other.ColorAxis && ColorAxis != null && other.ColorAxis != null && ColorAxis.Equals(other.ColorAxis)) &&
                   (Opacity == other.Opacity && Opacity != null && other.Opacity != null && Opacity.Equals(other.Opacity)) &&
                   (FlatShading == other.FlatShading && FlatShading != null && other.FlatShading != null && FlatShading.Equals(other.FlatShading)) &&
                   (Contour == other.Contour && Contour != null && other.Contour != null && Contour.Equals(other.Contour)) &&
                   (LightPosition == other.LightPosition && LightPosition != null && other.LightPosition != null && LightPosition.Equals(other.LightPosition)) &&
                   (Lighting == other.Lighting && Lighting != null && other.Lighting != null && Lighting.Equals(other.Lighting)) &&
                   (HoverInfo == other.HoverInfo && HoverInfo != null && other.HoverInfo != null && HoverInfo.Equals(other.HoverInfo)) &&
                   (Equals(HoverInfoArray, other.HoverInfoArray) || HoverInfoArray != null && other.HoverInfoArray != null && HoverInfoArray.SequenceEqual(other.HoverInfoArray)) &&
                   (ShowLegend == other.ShowLegend && ShowLegend != null && other.ShowLegend != null && ShowLegend.Equals(other.ShowLegend)) &&
                   (XCalendar == other.XCalendar && XCalendar != null && other.XCalendar != null && XCalendar.Equals(other.XCalendar)) &&
                   (YCalendar == other.YCalendar && YCalendar != null && other.YCalendar != null && YCalendar.Equals(other.YCalendar)) &&
                   (ZCalendar == other.ZCalendar && ZCalendar != null && other.ZCalendar != null && ZCalendar.Equals(other.ZCalendar)) &&
                   (Scene == other.Scene && Scene != null && other.Scene != null && Scene.Equals(other.Scene)) &&
                   (IdsSrc == other.IdsSrc && IdsSrc != null && other.IdsSrc != null && IdsSrc.Equals(other.IdsSrc)) &&
                   (CustomDataSrc == other.CustomDataSrc && CustomDataSrc != null && other.CustomDataSrc != null && CustomDataSrc.Equals(other.CustomDataSrc)) &&
                   (MetaSrc == other.MetaSrc && MetaSrc != null && other.MetaSrc != null && MetaSrc.Equals(other.MetaSrc)) &&
                   (XSrc == other.XSrc && XSrc != null && other.XSrc != null && XSrc.Equals(other.XSrc)) &&
                   (YSrc == other.YSrc && YSrc != null && other.YSrc != null && YSrc.Equals(other.YSrc)) &&
                   (ZSrc == other.ZSrc && ZSrc != null && other.ZSrc != null && ZSrc.Equals(other.ZSrc)) &&
                   (ISrc == other.ISrc && ISrc != null && other.ISrc != null && ISrc.Equals(other.ISrc)) &&
                   (JSrc == other.JSrc && JSrc != null && other.JSrc != null && JSrc.Equals(other.JSrc)) &&
                   (KSrc == other.KSrc && KSrc != null && other.KSrc != null && KSrc.Equals(other.KSrc)) &&
                   (TextSrc == other.TextSrc && TextSrc != null && other.TextSrc != null && TextSrc.Equals(other.TextSrc)) &&
                   (HoverTextSrc == other.HoverTextSrc && HoverTextSrc != null && other.HoverTextSrc != null && HoverTextSrc.Equals(other.HoverTextSrc)) &&
                   (HoverTemplateSrc == other.HoverTemplateSrc && HoverTemplateSrc != null && other.HoverTemplateSrc != null && HoverTemplateSrc.Equals(other.HoverTemplateSrc)) &&
                   (IntensitySrc == other.IntensitySrc && IntensitySrc != null && other.IntensitySrc != null && IntensitySrc.Equals(other.IntensitySrc)) &&
                   (VertexColorSrc == other.VertexColorSrc && VertexColorSrc != null && other.VertexColorSrc != null && VertexColorSrc.Equals(other.VertexColorSrc)) &&
                   (FaceColorSrc == other.FaceColorSrc && FaceColorSrc != null && other.FaceColorSrc != null && FaceColorSrc.Equals(other.FaceColorSrc)) &&
                   (HoverInfoSrc == other.HoverInfoSrc && HoverInfoSrc != null && other.HoverInfoSrc != null && HoverInfoSrc.Equals(other.HoverInfoSrc)));
        }