File:Hypocycloid-4.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 340 × 340 pixels, file size: 4 KB)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    English: Hypocycloid with k=4
     This W3C-unspecified vector image was created with Inkscape .


    c#ban a leprogramozása(forráskód):


    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Drawing.Drawing2D; using System.Text; using System.Windows.Forms;

    namespace WindowsApplication1 {

       public partial class Form1 : Form
       {
           Graphics mygr;
           Pen mypen;
           public Form1()
           {
               
               InitializeComponent();
           }
    
           private void Form1_Paint(object sender, PaintEventArgs e)
           {
               mygr = CreateGraphics();
               mypen = new Pen(Color.Red, 3);
           }
    
           private void button1_Click(object sender, EventArgs e)
           {
               
               kor(100);
           }
          private PointF F(double u,int R)
          {
              PointF SP = new PointF();
              SP.X=(float)(R*Math.Pow(Math.Cos(u),3));
              SP.Y = (float)(R *Math.Pow(Math.Sin(u),3));
                  return (SP);
          }
           private void kor(int R)
           {
               int db = 50;
               double a = 0;
               double b = 2 * Math.PI;
               double h = Math.Abs(b - a)/db;
               double u = a;
               PointF P0, P1;
               P0=new PointF();
               P1=new PointF();;
               P0 = F(u,R);
               mygr.TranslateTransform(100, 100);
              
               for (int i = 2; i <= db+1; i++)
               {
                   
                  
                   u = u + h;
                   P1 = F(u, R);
                    mygr.DrawLine(mypen,P0,P1);
                    P0 = P1;
                   
               }
    
           }
       }
    

    }

    Licensing

    Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
    In some countries this may not be legally possible; if so:
    I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    3,923 byte

    image/svg+xml

    be20fc5ff652551bc98c2e22c32a34f91251daa9

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current19:40, 10 March 2007Thumbnail for version as of 19:40, 10 March 2007340 × 340 (4 KB)wikimediacommons>Joelholdsworth~commonswiki== Summary == {{en|Hypocycloid with <math>k=4</math>}} {{Created with Inkscape}} == Licensing == {{PD-self}}

    There are no pages that use this file.