惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
S
Securelist
D
Docker
The Register - Security
The Register - Security
GbyAI
GbyAI
Recorded Future
Recorded Future
Engineering at Meta
Engineering at Meta
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
罗磊的独立博客
博客园 - 【当耐特】
F
Full Disclosure
WordPress大学
WordPress大学
腾讯CDC
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
SecWiki News
SecWiki News
L
Lohrmann on Cybersecurity
I
InfoQ
MyScale Blog
MyScale Blog
量子位
Cyberwarzone
Cyberwarzone
博客园 - 三生石上(FineUI控件)
The Hacker News
The Hacker News
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
博客园_首页
H
Help Net Security
K
Kaspersky official blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Webroot Blog
Webroot Blog
Blog — PlanetScale
Blog — PlanetScale
V
Vulnerabilities – Threatpost
Y
Y Combinator Blog
The Cloudflare Blog
P
Proofpoint News Feed
V
Visual Studio Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tailwind CSS Blog
爱范儿
爱范儿
P
Privacy International News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
The GitHub Blog
The GitHub Blog
C
Cybersecurity and Infrastructure Security Agency CISA
B
Blog RSS Feed

博客园 - AndrewCheng

TableAdapter和多组数据结果 即时查看程序输出的VS插件 让.Net验证控件与自定义验证合作无间 把你的应用程序添加到IE工具栏 - AndrewCheng - 博客园 拦截并分发运行时动态创建控件的事件 程序设计中的调试方法总结 从SQL Server 数据库转换为Access注意事项 昆明喷码机耗材科技有限公司 软件版本后缀所代表的含义 论坛网址 工作格言 加密 web.config - AndrewCheng - 博客园 C#正则表达式 - AndrewCheng - 博客园 论坛等级分类 - AndrewCheng - 博客园 SQL Server和Oracle的常用函数对比 屏蔽IE浏览器javasccipt的方法 VS2005断开VSS后再次连接上VSS时注意事项 asp.net2.0页面按钮点击无效的解决办法 delegate与event示例程序
C#实现的正余玄函数图象
AndrewCheng · 2007-04-24 · via 博客园 - AndrewCheng

主要用到了GDI+中直线的绘制方法

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

namespace yuxuan
{
    
public partial class Form1 : Form
    
{
        
public Form1()
        
{
            InitializeComponent();
        }


        
private void Form1_Load(object sender, EventArgs e)
        
{
            
            
        }


        
private void Form1_Paint(object sender, PaintEventArgs pe)
        
{
            
//余玄曲线

            
int minX = 0, maxX = 360;
            
const float PI = 3.14F;
            
int endX = 0;
            
float endY = 0;

            Graphics g 
= pe.Graphics;
            Pen pen 
= new Pen(Color.Blue);
            
for (int i = minX; i <= maxX; i += 1)
            
{
                endX 
= i + 1;
                endY 
= 80*(float)Math.Cos(endX * PI / 180)+80;
                g.DrawLine(pen, i, 
80*(float)Math.Cos(i * PI / 180)+80, endX, endY);
                
            }


            
//正玄曲线

            
for (int i = minX; i <= maxX; i += 1)
            
{
                endX 
= i + 1;
                endY 
= 80 * (float)Math.Sin(endX * PI / 180+ 80+200;
                g.DrawLine(pen, i, 
80 * (float)Math.Sin(i * PI / 180+ 80+200, endX, endY);

            }



            
//g.DrawLine(pen, 10, 100, 200, 100);
        }

    }

}