import numpy as np import matplotlib.pyplot as plt # ========================================== # 圆的基本信息 # 1.圆半径 r = 2.0 # 2.圆心坐标 a, b = (0., 0.) # ========================================== # 方法一:参数方程 theta = np.arange(0, 2*np.pi, 0.01) x = a + r *…
沉淀再出发:用python画各种图表 一.前言 最近需要用python来做一些统计和画图,因此做一些笔记. 二.python画各种图表 2.1.使用turtle来画图 import turtle as t #turtle库是python的内部库,直接import使用即可 import time def draw_diamond(turt): for i in range(1,3): turt.forward(100) #向前走100步 turt.right(45) #海龟头向右转45度 turt…
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Typ…
// WinThreadTest.cpp : Defines the entry point for the application. // #include "stdafx.h" #include "WinThreadTest.h" #include <windows.h> #define MAX_LOADSTRING 100 // Global Variables: HINSTANCE hInst; // current instance TCHAR…
计算机图形学课程作业-----画圆 Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim G As Graphics = PictureBox1.CreateGraphics() Dim Br As SolidBrush = New SolidBrush(Color.Blue) Dim x0…