Ejemplo n.º 1
0
        private void Calculate()
        {
            var hyperboloid = new HyperboloidOfRevolution((double)AValue.Value, (double)CValue.Value);
            var height      = (double)HValue.Value;
            var mass        = 1;

            IxyValue.Text = hyperboloid.CalculateBodyInertiaMomentOxy(height, mass).ToString();
            IxzValue.Text = hyperboloid.CalculateBodyInertiaMomentOxz(height, mass).ToString();
            IyzValue.Text = hyperboloid.CalculateBodyInertiaMomentOyz(height, mass).ToString();
            IxValue.Text  = hyperboloid.CalculateBodyInertiaMomentOx(height, mass).ToString();
            IyValue.Text  = hyperboloid.CalculateBodyInertiaMomentOy(height, mass).ToString();
            IzValue.Text  = hyperboloid.CalculateBodyInertiaMomentOz(height, mass).ToString();
        }
Ejemplo n.º 2
0
        private void AddToChartButton_Click(object sender, EventArgs e)
        {
            var height = (double)HValue.Value;
            var mass   = 1;
            var Ixy    = hyperboloid.CalculateBodyInertiaMomentOxy(height, mass);
            var Ixz    = hyperboloid.CalculateBodyInertiaMomentOxz(height, mass);
            var Iyz    = hyperboloid.CalculateBodyInertiaMomentOyz(height, mass);
            var Ix     = hyperboloid.CalculateBodyInertiaMomentOx(height, mass);
            var Iy     = hyperboloid.CalculateBodyInertiaMomentOy(height, mass);
            var Iz     = hyperboloid.CalculateBodyInertiaMomentOz(height, mass);

            ;
            ParametrsChart.Series["Ixy"].Points.AddY(Ixy);
            ParametrsChart.Series["Ixz"].Points.AddY(Ixz);
            ParametrsChart.Series["Iyz"].Points.AddY(Iyz);
            ParametrsChart.Series["Ix"].Points.AddY(Ix);
            ParametrsChart.Series["Iy"].Points.AddY(Iy);
            ParametrsChart.Series["Iz"].Points.AddY(Iz);
        }