news 2025/12/25 17:58:20

叮当猫相关图片

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
叮当猫相关图片

fromturtleimport*defgotos(x,y):penup()goto(x,y)pendown()# 眼睛defeyes():tracer(False)a=2.5foriinrange(120):if0<=i<30or60<=i<90:a-=0.05lt(3)fd(a)else:a+=0.05lt(3)fd(a)tracer(True)# 胡须defbeard():gotos(-37,135)seth(165)fd(60)gotos(-37,125)seth(180)fd(60)gotos(-37,115)seth(193)fd(60)gotos(37,135)seth(15)fd(60)gotos(37,125)seth(0)fd(60)gotos(37,115)seth(-13)fd(60)# 嘴巴defmouth():gotos(5,148)seth(270)fd(100)seth(0)circle(120,50)seth(230)circle(-120,100)# 围巾defscarf():fillcolor('#e70010')begin_fill()seth(0)fd(200)circle(-5,90)fd(10)circle(-5,90)fd(207)circle(-5,90)fd(10)circle(-5,90)end_fill()# 鼻子defnose():gotos(4,148)fillcolor('#e70010')begin_fill()circle(20)end_fill()# 黑眼睛defblack_eyes():seth(0)gotos(-20,195)fillcolor('#000000')begin_fill()circle(13)end_fill()pensize(6)gotos(20,205)seth(75)circle(-10,150)pensize(3)gotos(-17,200)seth(0)fillcolor('#ffffff')begin_fill()circle(5)end_fill()gotos(0,0)# 脸defface():fd(183)fillcolor('#ffffff')begin_fill()lt(45)circle(120,100)seth(90)eyes()seth(180)penup()fd(60)pendown()seth(90)eyes()penup()seth(180)fd(64)pendown()seth(215)circle(120,100)end_fill()# 头型defhead():penup()circle(150,40)pendown()fillcolor('#00a0de')begin_fill()circle(150,280)end_fill()# 画哆啦A梦defDoraemon():# 头部head()# 围脖scarf()# 脸face()# 眼睛black_eyes()# 红鼻子nose()# 嘴巴mouth()# 胡须beard()# 身体gotos(0,0)seth(0)penup()circle(150,50)pendown()seth(30)fd(40)seth(70)circle(-30,270)fillcolor('#00a0de')begin_fill()seth(230)fd(80)seth(90)circle(1000,1)seth(-89)circle(-1000,10)# print(pos())seth(180)fd(70)seth(90)circle(30,180)seth(180)fd(70)# print(pos())seth(100)circle(-1000,9)seth(-86)circle(1000,2)seth(230)fd(40)# print(pos())circle(-30,230)seth(45)fd(81)seth(0)fd(203)circle(5,90)fd(10)circle(5,90)fd(7)seth(40)circle(150,10)seth(30)fd(40)end_fill()# 左手seth(70)fillcolor('#ffffff')begin_fill()circle(-30)end_fill()# 脚gotos(103.74,-182.59)seth(0)fillcolor('#ffffff')begin_fill()fd(15)circle(-15,180)fd(90)circle(-15,180)fd(10)end_fill()gotos(-96.26,-182.59)seth(180)fillcolor('#ffffff')begin_fill()fd(15)circle(15,180)fd(90)circle(15,180)fd(10)end_fill()# 右手gotos(-133.97,-91.81)seth(50)fillcolor('#ffffff')begin_fill()circle(30)end_fill()# 口袋gotos(-103.42,15.09)seth(0)fd(38)seth(230)begin_fill()circle(90,260)end_fill()gotos(5,-40)seth(0)fd(70)seth(-90)circle(-70,180)seth(0)fd(70)# 铃铛gotos(-103.42,15.09)fd(90)seth(70)fillcolor('#ffd200')# print(pos())begin_fill()circle(-20)end_fill()seth(170)fillcolor('#ffd200')begin_fill()circle(-2,180)seth(10)circle(-100,22)circle(-2,180)seth(180-10)circle(100,22)end_fill()goto(-13.42,15.09)seth(250)circle(20,110)seth(90)fd(15)dot(10)gotos(0,-150)if__name__=='__main__':setup(1.0,1.0)title("Doraemon")bgcolor('skyblue')speed(0)pensize(3)hideturtle()Doraemon()gotos(300,-100)write('永\n远\n爱\n你',font=("Bradley Hand ITC",50,"bold"))mainloop()



/// <summary>/// 创建哆啦A梦(Doraemon)的几何图形 - 基于Python turtle代码重制版/// </summary>privatevoidCreateGeometricShapes(BlockTableRecordbtr){// 哆啦A梦尺寸参数(基于Python代码提取)constdoubleHEAD_RADIUS=150.0;// 头部半径constdoubleBODY_WIDTH=203.0;// 身体宽度constdoubleEYE_RADIUS=13.0;// 黑眼珠半径constdoubleWHITE_EYE_RADIUS=5.0;// 白眼珠半径constdoubleNOSE_RADIUS=20.0;// 鼻子半径constdoubleBELL_RADIUS=20.0;// 铃铛半径constdoubleHAND_RADIUS=30.0;// 手部半径constdoubleFOOT_WIDTH=90.0;// 脚部宽度constdoubleFOOT_HEIGHT=15.0;// 脚部高度// 颜色定义(基于Python代码)// 蓝色身体: #00a0de -> 近似颜色索引// 白色: #ffffff -> 颜色索引 7// 红色: #e70010 -> 颜色索引 1// 黑色: #000000 -> 颜色索引 0// 黄色铃铛: #ffd200 -> 颜色索引 2// ========== 1. 头部(蓝色圆形)==========Circlehead=newCircle(newPoint3d(0,50,0),Vector3d.ZAxis,HEAD_RADIUS);head.ColorIndex=5;// 蓝色 (接近#00a0de)btr.AppendEntity(head);// ========== 2. 脸部(白色区域)==========// 脸型(模拟Python代码中的复杂形状)Polylineface=newPolyline();// 根据Python代码中的face()函数,脸是近似椭圆形的白色区域// 简化实现:创建一个椭圆形状doublefaceCenterX=0;doublefaceCenterY=50;doublefaceWidth=HEAD_RADIUS*1.1;doublefaceHeight=HEAD_RADIUS*0.7;// 创建椭圆(用多段线近似)for(inti=0;i<=36;i++){doubleangle=i*10*Math.PI/180;doublex=faceCenterX+faceWidth*Math.Cos(angle)/2;doubley=faceCenterY+faceHeight*Math.Sin(angle)/2;face.AddVertexAt(i,newPoint2d(x,y),0,0,0);}face.Closed=true;face.ColorIndex=7;// 白色btr.AppendEntity(face);// ========== 3. 眼睛(黑色眼珠+白色高光)==========// 左眼CircleleftEye=newCircle(newPoint3d(-20,95,0),Vector3d.ZAxis,EYE_RADIUS);leftEye.ColorIndex=0;// 黑色btr.AppendEntity(leftEye);// 左眼高光CircleleftEyeHighlight=newCircle(newPoint3d(-17,100,0),Vector3d.ZAxis,WHITE_EYE_RADIUS);leftEyeHighlight.ColorIndex=7;// 白色btr.AppendEntity(leftEyeHighlight);// 右眼CirclerightEye=newCircle(newPoint3d(20,105,0),Vector3d.ZAxis,EYE_RADIUS);rightEye.ColorIndex=0;// 黑色btr.AppendEntity(rightEye);// 右眼睫毛(模拟Python代码中的弧线)ArcrightEyeLash=newArc(newPoint3d(20,205,0),10,75*Math.PI/180,225*Math.PI/180);rightEyeLash.ColorIndex=0;// 黑色btr.AppendEntity(rightEyeLash);// ========== 4. 鼻子(红色圆形)==========Circlenose=newCircle(newPoint3d(4,48,0),Vector3d.ZAxis,NOSE_RADIUS);nose.ColorIndex=1;// 红色btr.AppendEntity(nose);// ========== 5. 胡须(6根)==========// 左上方胡须LineleftUpperWhisker=newLine(newPoint3d(-37,35,0),newPoint3d(-97,70,0));// 长度60,角度165°leftUpperWhisker.ColorIndex=0;btr.AppendEntity(leftUpperWhisker);// 左中间胡须LineleftMiddleWhisker=newLine(newPoint3d(-37,25,0),newPoint3d(-97,25,0));// 长度60,角度180°leftMiddleWhisker.ColorIndex=0;btr.AppendEntity(leftMiddleWhisker);// 左下方胡须LineleftLowerWhisker=newLine(newPoint3d(-37,15,0),newPoint3d(-97,-20,0));// 长度60,角度193°leftLowerWhisker.ColorIndex=0;btr.AppendEntity(leftLowerWhisker);// 右上方胡须LinerightUpperWhisker=newLine(newPoint3d(37,35,0),newPoint3d(97,70,0));// 长度60,角度15°rightUpperWhisker.ColorIndex=0;btr.AppendEntity(rightUpperWhisker);// 右中间胡须LinerightMiddleWhisker=newLine(newPoint3d(37,25,0),newPoint3d(97,25,0));// 长度60,角度0°rightMiddleWhisker.ColorIndex=0;btr.AppendEntity(rightMiddleWhisker);// 右下方胡须LinerightLowerWhisker=newLine(newPoint3d(37,15,0),newPoint3d(97,-20,0));// 长度60,角度-13°rightLowerWhisker.ColorIndex=0;btr.AppendEntity(rightLowerWhisker);// ========== 6. 嘴巴(红色微笑)==========// 嘴部弧线(根据Python代码中的mouth()函数)ArcmouthArc1=newArc(newPoint3d(5,-52,0),// 半径120,角度50°120,270*Math.PI/180,320*Math.PI/180);mouthArc1.ColorIndex=1;// 红色btr.AppendEntity(mouthArc1);ArcmouthArc2=newArc(newPoint3d(-115,-52,0),// 半径-120,角度100°120,230*Math.PI/180,330*Math.PI/180);mouthArc2.ColorIndex=1;// 红色btr.AppendEntity(mouthArc2);// ========== 7. 围巾(红色)==========Polylinescarf=newPolyline();scarf.AddVertexAt(0,newPoint2d(-100,0),0,0,0);scarf.AddVertexAt(1,newPoint2d(100,0),0,0,0);scarf.AddVertexAt(2,newPoint2d(100,-10),0,0,0);scarf.AddVertexAt(3,newPoint2d(-100,-10),0,0,0);scarf.Closed=true;scarf.ColorIndex=1;// 红色btr.AppendEntity(scarf);// ========== 8. 身体(蓝色)==========Polylinebody=newPolyline();doublebodyTopY=-30;doublebodyBottomY=-180;body.AddVertexAt(0,newPoint2d(-BODY_WIDTH/2,bodyTopY),0,0,0);body.AddVertexAt(1,newPoint2d(BODY_WIDTH/2,bodyTopY),0,0,0);body.AddVertexAt(2,newPoint2d(BODY_WIDTH/2,bodyBottomY),0,0,0);body.AddVertexAt(3,newPoint2d(-BODY_WIDTH/2,bodyBottomY),0,0,0);body.Closed=true;body.ColorIndex=5;// 蓝色btr.AppendEntity(body);// ========== 9. 口袋(白色圆形)==========Circlepocket=newCircle(newPoint3d(0,-80,0),Vector3d.ZAxis,70);pocket.ColorIndex=7;// 白色btr.AppendEntity(pocket);// 口袋内圆CirclepocketInner=newCircle(newPoint3d(0,-80,0),Vector3d.ZAxis,50);pocketInner.ColorIndex=4;// 青色(接近口袋颜色)btr.AppendEntity(pocketInner);// ========== 10. 铃铛(黄色)==========Circlebell=newCircle(newPoint3d(0,-40,0),Vector3d.ZAxis,BELL_RADIUS);bell.ColorIndex=2;// 黄色btr.AppendEntity(bell);// 铃铛项圈(红色)LinebellCollar1=newLine(newPoint3d(-13,-40,0),newPoint3d(-2,-60,0));bellCollar1.ColorIndex=1;// 红色btr.AppendEntity(bellCollar1);LinebellCollar2=newLine(newPoint3d(13,-40,0),newPoint3d(2,-60,0));bellCollar2.ColorIndex=1;// 红色btr.AppendEntity(bellCollar2);// 铃铛中心点CirclebellCenter=newCircle(newPoint3d(0,-40,0),Vector3d.ZAxis,2);bellCenter.ColorIndex=0;// 黑色btr.AppendEntity(bellCenter);// 铃铛垂线LinebellLine=newLine(newPoint3d(0,-60,0),newPoint3d(0,-65,0));bellLine.ColorIndex=0;// 黑色btr.AppendEntity(bellLine);// ========== 11. 手部(白色圆形)==========// 左手CircleleftHand=newCircle(newPoint3d(-133,-91,0),Vector3d.ZAxis,HAND_RADIUS);leftHand.ColorIndex=7;// 白色btr.AppendEntity(leftHand);// 右手CirclerightHand=newCircle(newPoint3d(133,-91,0),Vector3d.ZAxis,HAND_RADIUS);rightHand.ColorIndex=7;// 白色btr.AppendEntity(rightHand);// ========== 12. 脚部(白色椭圆形)==========// 左脚PolylineleftFoot=newPolyline();leftFoot.AddVertexAt(0,newPoint2d(-103,-182),0,0,0);leftFoot.AddVertexAt(1,newPoint2d(-13,-182),0,0,0);leftFoot.AddVertexAt(2,newPoint2d(-13,-197),0,0,0);leftFoot.AddVertexAt(3,newPoint2d(-103,-197),0,0,0);leftFoot.Closed=true;leftFoot.ColorIndex=7;// 白色// 添加圆角效果(近似)leftFoot.SetBulgeAt(1,0.5);leftFoot.SetBulgeAt(3,0.5);btr.AppendEntity(leftFoot);// 右脚PolylinerightFoot=newPolyline();rightFoot.AddVertexAt(0,newPoint2d(13,-182),0,0,0);rightFoot.AddVertexAt(1,newPoint2d(103,-182),0,0,0);rightFoot.AddVertexAt(2,newPoint2d(103,-197),0,0,0);rightFoot.AddVertexAt(3,newPoint2d(13,-197),0,0,0);rightFoot.Closed=true;rightFoot.ColorIndex=7;// 白色// 添加圆角效果(近似)rightFoot.SetBulgeAt(0,0.5);rightFoot.SetBulgeAt(2,0.5);btr.AppendEntity(rightFoot);// ========== 13. 尾巴(蓝色小球)==========Circletail=newCircle(newPoint3d(-130,-120,0),Vector3d.ZAxis,15);tail.ColorIndex=5;// 蓝色btr.AppendEntity(tail);// ========== 14. 签名文字 ==========DBTextsignature=newDBText();signature.Position=newPoint3d(0,-220,0);signature.Height=12;signature.TextString="Doraemon";signature.ColorIndex=5;// 蓝色signature.HorizontalMode=TextHorizontalMode.TextCenter;signature.AlignmentPoint=signature.Position;btr.AppendEntity(signature);// ========== 15. 爱的文字(模仿Python代码)==========DBTextloveText=newDBText();loveText.Position=newPoint3d(250,-150,0);loveText.Height=20;loveText.TextString="永远爱你";loveText.ColorIndex=1;// 红色loveText.HorizontalMode=TextHorizontalMode.TextLeft;loveText.VerticalMode=TextVerticalMode.TextTop;loveText.AlignmentPoint=loveText.Position;btr.AppendEntity(loveText);}
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2025/12/15 18:19:12

LobeChat是否支持会话加密?端到端安全传输可能性

LobeChat 是否支持会话加密&#xff1f;端到端安全传输的可能性 在大语言模型&#xff08;LLM&#xff09;迅速渗透进个人生活与企业系统的当下&#xff0c;AI助手不再只是回答“今天天气如何”的工具&#xff0c;而是开始处理诸如医疗咨询、法律建议、财务规划等高度敏感的对…

作者头像 李华
网站建设 2025/12/15 18:19:00

ensp下载官网功能类比:网络仿真与AI推理有何共通点?

网络仿真与AI推理的深层共鸣&#xff1a;从eNSP到Qwen3-32B的系统思维演进 在智能系统设计的前沿&#xff0c;我们正见证一场静默却深刻的范式迁移。工程师们早已习惯用eNSP&#xff08;Enterprise Network Simulation Platform&#xff09;这样的工具&#xff0c;在虚拟环境中…

作者头像 李华
网站建设 2025/12/15 18:18:16

n8n 教程(三)用 n8n + 飞书,打造你的第一个“自动化助理”系列

准备工作:我们的“武器库” n8n: 自动化的“大脑”。(前文有详细介绍 Docker 本地部署,安全又免费) 飞书账号: 自动化的“手脚”。 一点点耐心: 跟着我做,保证通关! 1:在飞书“生”一个机器人 首先,我们要去飞书开放平台“领养”一个机器人。 1.1 登录 飞书开放…

作者头像 李华
网站建设 2025/12/15 18:18:03

利用Qwen3-14B进行多步骤任务规划的实践案例分享

利用Qwen3-14B进行多步骤任务规划的实践案例分享 在企业智能化转型加速的今天&#xff0c;一个客服系统是否“聪明”&#xff0c;不再仅仅取决于它能多快回复“您好&#xff0c;请问有什么可以帮您&#xff1f;”——真正的挑战在于&#xff1a;当用户说“我三个月前订的设备还…

作者头像 李华
网站建设 2025/12/25 13:35:11

多设备兼容与数智协同:解码低空飞行规模化应用背后的技术支撑

在低空飞行活动日益频繁、应用场景持续丰富的背景下&#xff0c;飞行服务需要跳出单一工具调度的局限&#xff0c;形成安全、高效、开放的飞行服务生态。星图云开放平台基于海量政府、企业和个人用户的低空飞行需求&#xff0c;打造多设备兼容和数智协同的智航低空飞行应用平台…

作者头像 李华