Пример #1
0
        void TwoSetVenn(NVennSeries venn)
        {
            venn.ClearContours();

            venn.AddVennContour(VennShape.Ellipse, new NPointF(-15, 0), new NSizeF(50, 50), 0, 0);
            venn.AddVennContour(VennShape.Ellipse, new NPointF(15, 0), new NSizeF(50, 50), 0, 1);
        }
Пример #2
0
        void FourSetVenn(NVennSeries venn)
        {
            venn.ClearContours();

            venn.AddVennContour(VennShape.Ellipse, new NPointF(-12.5f, -10f), new NSizeF(60, 35), 135, 0);
            venn.AddVennContour(VennShape.Ellipse, new NPointF(12.5f, -10f), new NSizeF(60, 35), 45, 1);
            venn.AddVennContour(VennShape.Ellipse, new NPointF(-2.5f, 5), new NSizeF(60, 35), 135, 2);
            venn.AddVennContour(VennShape.Ellipse, new NPointF(2.5f, 5), new NSizeF(60, 35), 45, 3);
        }
        void ThreeSetVenn(NVennSeries venn)
        {
            const int   nSetCount       = 3;
            const float fStartAngle     = -((float)Math.PI / 2);
            const float fScale          = 14;
            const float fCenterX        = 0;
            const float fCenterY        = 0;
            float       fIncrementAngle = (float)(2 * Math.PI / nSetCount);

            venn.ClearContours();

            for (int i = 0; i < nSetCount; i++)
            {
                float fAngle = fStartAngle + i * fIncrementAngle;
                float x      = (float)Math.Round(fCenterX + Math.Cos(fAngle) * fScale, 1);
                float y      = (float)Math.Round(fCenterY + Math.Sin(fAngle) * fScale, 1);

                venn.AddVennContour(VennShape.Ellipse, new NPointF(x, y), new NSizeF(50, 50), 0, i);
            }
        }