1 Star 0 Fork 0

单曲循环/CADWINDGX

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
aaa.py 603 Bytes
一键复制 编辑 原始数据 按行查看 历史
asanosuzu 提交于 2022-10-10 14:54 . Initial commit
from numpy import *
from math import *
from matplotlib import pyplot as plt
x = [0.0, 1.0, 3.0]
y = [0.0, 1.0, 3.0]
k2 = (y[1]-y[0])/(x[1]-x[0])
k1 = (y[2]-y[1])/(x[2]-x[1])
theta1 = arctan(k1)
theta2 = arctan(k2)
theta = (theta1+theta2)/2+pi/2
z = [1, cos(theta)*1+1]
w = [1, sin(theta)*1+1]
print(theta1)
print(theta2)
print(theta)
print(cos(theta*pi/180)*1+1+sin(theta*pi/180)*1+1)
print(sin(theta*pi/180)*1+1)
plt.plot(x,y)
plt.plot(z,w)
plt.axis("equal")
plt.show()
# plt.plot(X1, R1, '*-')
# plt.grid(True)
# plt.legend()
# plt.axis("equal")
# plt.show()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/rorob/CADWINDGX.git
git@gitee.com:rorob/CADWINDGX.git
rorob
CADWINDGX
CADWINDGX
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385