All Projects → Amd794 → Python123

Amd794 / Python123

Licence: other
玩转python内置turtle库, 创造精美绘画

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Python123

joseki
Pure Go library for working with RDF, a powerful framework for representing informations as graphs.
Stars: ✭ 27 (+42.11%)
Mutual labels:  turtle
trtl
Tk-powered Ruby turtle graphics
Stars: ✭ 65 (+242.11%)
Mutual labels:  turtle
stardog-language-servers
Language Servers for Stardog Languages
Stars: ✭ 19 (+0%)
Mutual labels:  turtle
ont-api
ONT-API (OWL-API over Apache Jena)
Stars: ✭ 20 (+5.26%)
Mutual labels:  turtle
rdfshape-api
API for validating and transforming RDF, ShEx, SHACL and more.
Stars: ✭ 31 (+63.16%)
Mutual labels:  turtle
FloweringTree
Plain, old and simple Flowering Tree Class
Stars: ✭ 108 (+468.42%)
Mutual labels:  turtle
rio
RDF parsers library
Stars: ✭ 56 (+194.74%)
Mutual labels:  turtle
rdf-editor
The OpenLink Structured Data Editor enables editing of RDF documents (in TURTLE notation) stored in a variety of HTTP accessible documents. Actual document access requires the target document is served from a system that supports at least one of the following open standards: Linked Data Platform (LDP), WebDAV, SPARQL 1.1 Update, or the SPARQL Gr…
Stars: ✭ 92 (+384.21%)
Mutual labels:  turtle
basex-rdf
RDF parsing for BaseX
Stars: ✭ 16 (-15.79%)
Mutual labels:  turtle
Rdflib
RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.
Stars: ✭ 1,584 (+8236.84%)
Mutual labels:  turtle
semantic-web
Storing ontologies/vocabularies from the web. Wish anybody can translate some of them.
Stars: ✭ 114 (+500%)
Mutual labels:  turtle

Python 海龟创意绘画

瘦小的圆角矩形 瘦小的圆角矩形


Author Mifen
E-mail [email protected]
Blog 博客地址

演示

Symbols The following characters have a geometric interpretation.

# Character Meaning
1 F Move forward by line length drawing a line
2 f Move forward by line length without drawing a line
3 + Turn left by turning angle
4 - Turn right by turning angle
5 / Reverse direction (ie: turn by 180 degrees)
6 [ Push current drawing state onto stack
7 ] Pop current drawing state from the stack
8 # Increment the line width by line width increment
9 ! Decrement the line width by line width increment
10 @ Draw a dot with line width radius
11 { Open a polygon
12 } Close a polygon and fill it with fill colour
13 < Multiply the line length by the line length scale factor
14 > Divide the line length by the line length scale factor
15 & Swap the meaning of + and -
16 ( Decrement turning angle by turning angle increment
17 ) Increment turning angle by turning angle increment

以下符号字符的几何解释。

# 字符 含义
1 F 按行绘制一条线向前移动
2 f 按线条长度向前移动而不绘制线条
3 + 通过转动角度向左转动
4 - 通过转动角度向右转动
5 / 反向(即:转动180度)
6 [ 将当前绘图状态推入堆栈
7 ] 从堆栈弹出当前绘图状态
8 # 按线宽增量增加线宽
9 ! 通过线宽增量减小线宽
10 @ 绘制带有线宽半径的点
12 } 关闭多边形并用填充颜色填充
13 < 将线长乘以线长比例因子
14 > 将线长除以线长比例因子
15 & 交换+和 - 的含义
16 ( 通过转动角度增量减小转动角度
17 ) 通过转动角度增量来增加转动角度
18 { 打开多边形

函数介绍

  • draw_path(length, angle, path, expalnation)
    • 主要用来绘制海龟行走路径
      • length ---->每次行走的距离
      • angle ---->偏移的角度
      • path ---->初始路径图案,即0阶的形状
      • expalnation ---->用来记录打印每一步操作
  • apply_rules(path, rules)
    • 主要是转换每一阶段的path
      • path ---->初始路径图案,即0阶的形状
      • rules ---->转换的规则
  • getColor()
    • 提供一个随机rgb值
  • initialization()
    • 初始化各种参数
  • Introduction(x=-600, y=-350)
    • 注解
      • 默认海龟初始位置(-600,-350)
  • run(n,angle,length,path,rules)
    • 启动程序
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].