Goal: 藉由有趣的「海龜繪圖」學會基礎的 Python 程式設計
本篇著重在以 Python 海龜繪圖模擬藝術圖形, 討論與生成式藝術的關聯.

本篇我們列舉一些網路上見到的, 用電腦程式或某些軟體產生美麗的圖形的例子, 挑選數學味道較重的, 許多都是用程式語言 Processing 來繪製, (或是 在 Processing 打開 Python mode, 語法是 Python, 但是繪圖指令是 Processing 才有的)
我們之後會再分篇討論是否可以用 Python 來製作類似的效果.


“Talk is cheap. Show me the code.”
― Linus Torvalds

老子第41章
上德若谷
大白若辱
大方無隅
大器晚成
大音希聲
大象無形
道隱無名

拳打千遍, 身法自然

“There’s no shortage of remarkable ideas, what’s missing is the will to execute them.” – Seth Godin
「很棒的點子永遠不會匱乏,然而缺少的是執行點子的意志力。」—賽斯.高汀

本系列文章之連結

  • 從turtle海龜動畫學習Python-高中彈性課程1 link

  • 從turtle海龜動畫 學習 Python - 高中彈性課程系列 2 安裝 Python, 線上執行 Python link

  • 從turtle海龜動畫 學習 Python - 高中彈性課程系列 3 烏龜繪圖 所需之Python基礎 link

  • 從turtle海龜動畫 學習 Python - 高中彈性課程系列 4 烏龜開始畫圖 link

  • 從turtle海龜動畫 學習 Python - 高中彈性課程系列 5 用函數封裝重複性指令-呼叫函數令烏龜畫正 n 邊形 link

  • 從turtle海龜動畫 學習 Python - 高中彈性課程系列 6 畫多重旋轉圓,螺旋正方形 link

  • 從turtle海龜動畫 學習 Python - 7 遞歸 recursive - 高中彈性課程系列 link

  • 從turtle海龜動畫 學習 Python - 高中彈性課程系列 8 碎形 (分形 fractal) link

  • 從turtle海龜動畫 學習 Python - 高中彈性課程系列 8.1 碎形 L-system link

  • 從turtle海龜動畫 學習 Python - 高中彈性課程系列 9 Python 物件導向介紹 link

  • 從turtle海龜動畫 學習 Python - 高中彈性課程系列 9.1 Python 物件導向的練習 link

  • 從turtle海龜動畫 學習 Python - 高中彈性課程系列 10 藝術畫 自定義海龜形狀 link

  • 從turtle海龜動畫 學習 Python - 高中彈性課程系列 10.1 藝術畫 python繪製天然雪花結晶 https://blog.csdn.net/m0_47985483/article/details/122262036 link

  • 從turtle海龜動畫 學習 Python - 高中彈性課程系列 10.2 藝術畫 Python 製作生成式藝術
    link

  • 從turtle海龜動畫 學習 Python - 高中彈性課程系列 11.1 氣泡排序 - 用 turtle 呈現演算法之執行動作 link

  • 從turtle海龜動畫 學習 Python - 高中彈性課程系列 11.2 maze 迷宮 - 用 turtle 呈現演算法之執行動作 link


文章目录

  • 本系列文章之連結
  • 主題: 列舉一些網路上見到的, 用電腦產生美麗圖形的例子, 挑選數學味道較重的,
  • Sher Minn Chong 螢幕保護程式與生成式藝術
  • Coding Cassowary
    • Generative art in Python: Basic Tiling
    • Generative art in Python: Nested Squares
  • How To Draw With Code | Casey Reas
  • Hari Dulal: Generative Art Tutorial for Beginners- Introduction to Processing
    • Perlin Noise 數位藝術家很常用的方法 用來產生流體的美
  • Eric Davidson, TheBuffED
  • 极创意MAXIDEA: 顛覆傳統的AR投影儀,能編輯投影區域,讓現實更虛幻
  • 20211007【潮玩科技】藝術科技體驗展
  • Processing艺术编程: 从迷宫生成算法到创意编程, AI遷移學習畫畫
  • Loren Sherman: Generative Art
  • Brain Flicks: 用 Python 的 turtle 模組畫美麗的設計藝術圖 Top 15 Python Design Using Turtle
  • codewithnaim: Create a favorite design python turtle Graphics
  • more videos
  • References

主題: 列舉一些網路上見到的, 用電腦產生美麗圖形的例子, 挑選數學味道較重的,

以下我們列舉一些網路上見到的, 用電腦程式或某些軟體產生美麗的圖形的例子, 挑選數學味道較重的, 許多都是用程式語言 processing 來繪製, (或是 在 Processing 打開 Python mode, 語法是 Python, 但是繪圖指令是 Processing 才有的)
我們之後會再分篇討論是否可以用 Python 來製作類似的效果.

Sher Minn Chong 螢幕保護程式與生成式藝術

exploring the beauty of algorithms with generative art - talk
https://youtu.be/Y1bPsh1mFUI link
SM C (Sher Minn Chong)
本影片講者來自馬來西亞, 她提到這些早年的螢幕保護程式其實就是生成式藝術的濫觴!
(可惜 Linux RedHat 7 或 8 的那些碎形的螢幕保護程式, 當時曾令我極為驚嘆, 這個演講並沒有講到, 我一直不知如何找到他們的原始碼.)


本影片講者自己做的:

Koch 島圍繞著8個小 Koch 島所形成的磁磚:

Coding Cassowary

他有一系列用 Python 繪製 generative art 的教學:
https://www.youtube.com/playlist?list=PLBLV84VG7Md9oO4MUOhyqz7gBFOzx8XIw link

Generative art in Python: Basic Tiling

https://youtu.be/Cm_SzDlQ2cM link

Generative art in Python: Basic Tiling
觀看次數:1,405次
2022年2月20日

This video is the the start for a a new series of videos on how you can create generative art in Python using the Turtle module. In this first video I cover one of the most basic techniques in generative art which is tiling. The canvas is divided recursively into a number of small areas. In each of these areas a line is randomly drawn in one of two possible ways. And with just a few levels of recursion this can already lead to some surprising results.

Contents
00:00 Introduction
01:35 Turtle basics
04:00 Vertical and horizontal lines
06:02 Recursive tiling
10:24 First results
12:05 Diagonal lines


我照著他的影片走一遍, 把第一份tiling 的線條是垂直的程式碼試成功:

# Generative art in Python Basic Tiling.py
# 20220704 Noted by Prof. P-J Lai MATH NKNU
# 初版, 沒有使用 theme.py
##https://youtu.be/Cm_SzDlQ2cM
##Generative art in Python: Basic Tilingfrom turtle import *
#from theme import set_theme
import randomsetup(800, 800)def tiling(x, y, s, level):# We have reached the final level recursion# and we now drawif level == 0:# 隨機畫直線段或橫線段if random.random() < 0.5:penup()goto(x,y-s)pendown()goto(x, y+s)else:penup()goto(x-s, y)pendown()goto(x+s, y)# Split the screen and go to next level of recursionelse:s /= 2level -= 1# 左上區塊繼續分支tiling(x-s, y+s, s, level)# 右上區塊tiling(x+s, y+s, s, level)# 左下區塊tiling(x-s, y-s, s, level)# 右下區塊tiling(x+s, y-s, s, level)################
width(2)
hideturtle()
tracer(False)tiling(0,0,400,5)tracer(True)
exitonclick()

Generative art in Python: Nested Squares

https://youtu.be/XruRIaB01Ls link

Coding Cassowary
329 位訂閱者
In this video we have a look at an early piece of computer-generated art. The canvas is tiled with squares. Within each of these “outer” squares there are a bunch of “inner” squares stacked into one another. Random offsets in either direction make for a 3D-like overall effect.

Contents:
00:00 Introduction
02:07 draw_squares( )
05:15 Drawing the outer squares
06:50 Drawing the inner squares
09:20 Shrinkage
10:58 set_theme( )

以下是我嘗試的程式碼, 特別注意, 這份會用到他加寫的 theme.py,
我是照著他的影片, 自己打入他的 theme.py 的 codes 存成 theme.py,
需要在一開始引入
from theme import set_theme
其實不使用也沒關係, theme.py 只是一個畫布呈現風格的設定檔, 較方便使用而已:

# Generative_art_in_Python_NestedSquares_set_theme.py
#比前一版 Generative_art_in_Python_NestedSquares.py
# 增加 from theme import set_theme
# 20220630 Noted by Prof. P-J Lai MATH NKNU# Generative art in Python_Nested Squares# https://youtu.be/XruRIaB01Ls##Coding Cassowaryfrom turtle import *
from theme import set_theme
import randomdef draw_square(x, y, s):penup()goto(x-s/2, y-s/2)pendown()for i in range(4):forward(s)left(90)##setup(800, 800)
##width(2)
##hideturtle()
##tracer(False)
set_theme(thickness=2)
############
# codes:noise = 5
size = 100
shrink = 15for x in range(-300+int(size/2), 300, size):for y in range(-400+int(size/2), 400, size):# the draw the outer squaredraw_square(x, y, size)# determine the offsetsx_off = random.uniform(-noise, noise)y_off = random.uniform(-noise, noise)# draw the inner suqaresfor i in range(6):draw_square(x+i*x_off, y+i*y_off, size-i*shrink)################
tracer(True)
exitonclick()

以下是執行的結果:

How To Draw With Code | Casey Reas

How To Draw With Code | Casey Reas, https://youtu.be/_8DMEHxOLQE
link

有很多數學的 motiv

YouTube上的:

Creators

For Casey Reas, software is the most natural medium to work with. He uses code to express his thoughts—starting with a sketch, composing it in code, and witnessing the imagery that it ultimately creates. We visit his studio to see how he uses color to convey emotion and how his programming language Processing is closing the gap between software and object.

The Creators Project is a partnership between Intel and VICE: http://thecreatorsproject.com/

Casey Reas 有一本書:
Casey Reas, Processing, second edition, A Programming Handbook for Visual Designers and Artists.

裡面有很多用 Processing 畫的有數學動機的美麗圖案, 讀者可以試著用 Python 重現看看,


Hari Dulal: Generative Art Tutorial for Beginners- Introduction to Processing

https://youtu.be/dGleb-w14w4 link
他的 YouTube站的影片, 有一系列 Generative Art 的入門影片, 有一些不是太難, 但是也很有數學之美的圖案, 也有難度較高的, 也是用 Processing 寫的,

  • Generative Art Tutorial for Beginners- Introduction to Processing
    https://youtu.be/dGleb-w14w4 link

  • Generative Art- Sinusoidal Circles
    https://youtu.be/DQAEfXFjn-A link

  • Generative Art- Sinusoidal Circles in Processing
    https://youtu.be/YOSSfVrzFwc link

  • Sinusoidal circles
    https://youtu.be/9Y9DipPhsb4 link

  • Generative Art Tutorial for Beginners- Trippy Rectangles Animation in Processing
    https://youtu.be/US-Y9q-wqV0 link

  • Sierpinski triangle (Fractal Triangle) from fractal tree…
    https://youtu.be/t_TO94uqvSU link
    碎形樹的動畫, 海龜繪圖較困難

  • Spot-light effect效果, 海龜繪圖較困難
    Generative Art- Spot-light effect and fractal tree in Processing
    https://youtu.be/N1I4WIquDN8 link

  • Generative Art- Kaleidoscope
    https://youtu.be/PMi2YZg8_zI link

Perlin Noise 數位藝術家很常用的方法 用來產生流體的美

Generative Art using Perlin Noise in Processing
https://youtu.be/Z3tZM-Jxl7Y link
Hari Dulal


Hari Dulal 這個站對於原理, 幾乎很少解說,
Perlin Noise 是數位藝術家很常用的方法, 常用來產生流體的美, 詳細的說明可以看
I.2 Introduction - Perlin Noise and p5.js Tutorial
https://youtu.be/Qf4dIN99e2w link

Coding Challenge #24 Perlin Noise Flow Field
https://youtu.be/BjoM9oKOAKY link


Live Stream #46 Perlin Noise and Flow Fields
彩色的
https://youtu.be/sor1nwNIP9A link
The Coding Train

Eric Davidson, TheBuffED

在 github上有不少難度較高的設計, Eric Davidson, https://github.com/erdavids/Generative-Art link

Basic Introduction to Circle Packing
https://youtu.be/QkJHDIwPQ9E link

极创意MAXIDEA: 顛覆傳統的AR投影儀,能編輯投影區域,讓現實更虛幻

https://youtu.be/EWE5N4mQJSQ link

极创意MAXIDEA
22.7萬 位訂閱者

AR投影儀小助手,有了它,就可以全地形無縫完美投影,家裏隨便什麽東西、犄角旭旯隨便什麽地兒都能拿來顯示,而且還是在現實物體上疊加虛擬動畫,讓妳不用戴AR眼鏡就能看到夢幻的AR效果。

20211007【潮玩科技】藝術科技體驗展

20211007【潮玩科技】藝術科技體驗展
https://youtu.be/aF6TXriRBT8 link

Now 財經 新聞
19萬 位訂閱者
【Now財經台】以科技創作數碼化的藝術作品,是不少藝術家追求的方向,隨著NFT興起,解決了版權保護、交易對價以及收藏等難題,數碼藝術變得有價有市。

要用到 演算法, 人工智能

Processing艺术编程: 从迷宫生成算法到创意编程, AI遷移學習畫畫

https://www.youtube.com/channel/UCpvDfd3kBdGvNV9Sw6fSH_A/featured link

Processing艺术编程
770 位訂閱者
迷宫生成算法虽然原理简单,但我们可以用它串联起很多有意思的领域。


AI遷移學習畫畫:
设计师之光,最好的Processing中文教程,Processing之完全介绍
https://youtu.be/6SEUWJ82OXI link

rocessing以其超强的视觉表现力和易学的语法成为很多设计师和艺术家的得力武器,以及大量编程初学者的入门语言。,


Loren Sherman: Generative Art

https://youtu.be/cKzK88y3o1Q link

Loren Sherman
515 位訂閱者
This is all just a bunch of lines of code.

Brain Flicks: 用 Python 的 turtle 模組畫美麗的設計藝術圖 Top 15 Python Design Using Turtle

用 Python 的 turtle 模組畫美麗的設計藝術圖
https://youtu.be/hPsjMTz-aDQ link
Brain Flicks
2250 位訂閱者
How to design beautiful art work in Python Using Turtle.
Using Turtle Library in Python we can design anything like shown in this video.
This video is just an introduction or say output of the codes that we will be going to see further this this series.
In upcoming videos i will explain the code in best possible way i can.
Comment Down the design you Like the most and Any name if you got any name for any design. Feel free to comment down below.
Codes will be given either on my website or on GitHub Soon.
Keep Supporting Keep Loving And KEEP CREATING

Our Website►https://www.gyanbucket.com

codewithnaim: Create a favorite design python turtle Graphics

https://youtu.be/rG2MeJiixnM link
codewithnaim
64 位訂閱者
In this tutorial to provide the knowledge of -PYTHON TURTLE GRAPHICS- to learn the python and practice from here and this python function.

#python create a tree with turtle design
https://youtu.be/G37YAx6IqAc

#python create a star turtle design
https://youtu.be/OoYab3LX-Q8

more videos

#python Create sun rises | turtle tutorial_#03
https://youtu.be/GfQCd5vDiZw

new design turtle tutorial_01
https://www.youtube.com/watch?v=aFTqZ…

turtle tutorial 01
https://youtu.be/mnuI2m1TUrs

best to very nice turtle graph
https://youtu.be/TA2Usp0rtA8

turtle graphic python best graphic
https://youtube.com/shorts/FYvdXHHV9n…

installing vs code to full setup in python programmer
https://youtu.be/0pTNEoAkW-U

#this tutorial code in--import turtle as tu
import colorsys as cs
tu.setup(800,800)
tu.speed(0)
tu.tracer(10)
tu.width(2)
tu.bgcolor("black")
for j in range(25):for i in range(15):tu.color(cs.hsv_to_rgb(i/15, j/25, 1))tu.right(90)tu.circle(200-j*4,90)tu.left(90)tu.circle(200-j*4,90)tu.right(180)tu.circle(50,24)
tu.hideturtle()
tu.done()

References

  • Casey Reas, Processing, second edition, A Programming Handbook for Visual Designers and Artists.

  • How To Draw With Code | Casey Reas, https://youtu.be/_8DMEHxOLQE
    link

  • Generative Art- Kaleidoscope
    https://youtu.be/PMi2YZg8_zI

  • Eric Davidson, 在 github上有不少難度較高的設計, Eric Davidson, https://github.com/erdavids/Generative-Art
    link

  • Eric Davidson, Basic Introduction to Circle Packing
    https://youtu.be/QkJHDIwPQ9E link

  • 美麗的圖形 https://www.pinterest.com/drnagy18/fonalgrafika1/ link

  • Python带你找回童年的万花尺, http://baijiahao.baidu.com/s?id=1651085589151024260 link

  • 使用python成为藝術家, https://my.oschina.net/u/4531265/blog/4278176 link

  • 等等!等高線居然可以有非凡的藝術氣質?!https://www.getit01.com/p2018041735235656/ link

  • Python——畫一棵漂亮的樱花樹, https://blog.csdn.net/weixin_43943977/article/details/102691392 link
    非常漂亮的樹!

  • 生成式藝術和演算法創作07 L, https://zhuanlan.zhihu.com/p/50712698 link

  • Michael Hansmeyer:塑造不可思议, https://v.youku.com/v_show/id_XNDc4MDM2NzA4.html link

  • https://youtu.be/qtPi0JvmWbs
    Generative Art
    生成藝術暑期工作營
    東南大學建築學院 建築運算與應用研究所

  • (Sher Minn Chong) exploring the beauty of algorithms with generative art - talk
    https://youtu.be/Y1bPsh1mFUI link

  • Sher Minn Chong Make art with JavaScript!
    https://youtu.be/HiCK8e1ElRQ link

從turtle海龜動畫 學習 Python - 高中彈性課程系列 10.2 藝術畫 Python 製作生成式藝術略覽相关推荐

  1. 從turtle海龜動畫 學習 Python - 高中彈性課程系列 10.1 藝術畫 python繪製天然雪花結晶

    本篇主要是討論用 python 模擬自然界的雪花結晶形狀, (注意: 非網路上常提到的 雪花算法). "Talk is cheap. Show me the code." ― Li ...

  2. 從turtle海龜動畫學習Python-高中彈性課程1

    Goal: 藉由有趣的「海龜動畫繪圖」學會基礎的 Python 程式設計 本篇介紹本彈性課程之開設由來, 以及一些供後續查閱之Python 之細節, 方便後面再回頭交叉索引之內容, 文獻等 " ...

  3. 從turtle海龜動畫 學習 Python - 高中彈性課程系列 3 烏龜繪圖 所需之Python基礎

    "Talk is cheap. Show me the code." ― Linus Torvalds 老子第41章 上德若谷 大白若辱 大方無隅 大器晚成 大音希聲 大象無形 道 ...

  4. 從turtle海龜動畫 學習 Python - 高中彈性課程系列 6 多重旋轉圓, 螺旋正方形

    Goal: 藉由有趣的「海龜動畫繪圖」學會基礎的 Python 程式設計 本篇介紹基礎的 Python 海龜動畫繪圖, 確實可以只以簡單的指令畫出極為複雜有趣或美麗的圖案: 多重旋轉之圓或多邊形, 多 ...

  5. 從turtle海龜動畫 學習 Python - 高中彈性課程系列 11.2 maze 迷宮 - 用 turtle 呈現演算法之執行動作

    Goal: 藉由有趣的「海龜動畫繪圖」學會基礎的 Python 程式設計 本篇介紹 Python 海龜繪圖 呈現迷宮演算法等 "Talk is cheap. Show me the code ...

  6. 從turtle海龜動畫 學習 Python - 高中彈性課程系列 9 Python 物件導向介紹

    "Talk is cheap. Show me the code." ― Linus Torvalds 老子第41章 上德若谷 大白若辱 大方無隅 大器晚成 大音希聲 大象無形 道 ...

  7. 從turtle海龜動畫 學習 Python - 高中彈性課程系列 6.1 內嵌正多邊形 類似禪繞圖

    Goal: 藉由有趣的「海龜動畫繪圖」學會基礎的 Python 程式設計 本篇介紹基礎的 Python 海龜動畫繪圖, 確實可以只以簡單的指令畫出極為複雜有趣或美麗的圖案: 內嵌正多邊形之圖案, 禪繞 ...

  8. 控制項學習四(屬性與事件)

    四.初探控制項屬性(Property)的建立 1.當我們建立一個控制項(或類別),可以建立控制項的屬性(property),屬性多半是一個值,或是指到另外一個物件,或是一個集合. 請注意,在該屬性宣告 ...

  9. ID3决策树中连续值的处理+周志华《機器學習》图4.8和图4.10绘制

    转载自 https://blog.csdn.net/Leafage_M/article/details/80137305 用一句话总结这篇博客的内容就是: 对于当前n条数据,相邻求平均值,得到n-1个 ...

最新文章

  1. CodeGen字段循环Field Loop
  2. 【算法笔记】莫比乌斯反演(包含定理,两种形式的证明及入门经典模板)
  3. hive 配置参数说明
  4. Github上LeakCanary编译报错CreateProcess error=2的解决方法
  5. 下拉框--请选择-- 浏览器渲染不同造成页面初始化不一致
  6. 文本分类问题不需要ResNet?小夕解析DPCNN设计原理(下)
  7. 1227讲解(递归deng)
  8. [极客大挑战 2019]EasySQL
  9. 阿里云、腾讯云纷纷宕机后,用户只能坐等损失?
  10. 推荐系统组队学习——GBDT+LR
  11. oracle汉字转换成拼音首字母和五笔首字母
  12. 小刘同学的第六十一篇博文
  13. 计算机 控制面板都打不开怎么办,控制面板打不开怎么办?控制面板打开办法大全...
  14. oracle建索引时报ora00955 名称已由现有对象使用,“ORA-00955: 名称已由现有对象使用” 这个错误是怎么回事?...
  15. Cibersort 算法 分析肿瘤样本免疫细胞组分
  16. 人工智能 α-β剪枝
  17. 基于Python热点新闻关键词数据分析系统
  18. c++学习笔记(6)
  19. 使用Python读取XMind格式测试用例,循环处理字符串
  20. 高数知识点整理——有理分式的不定积分(多项式的除法)

热门文章

  1. 浏览器扩展开发 - i18n 国际化多语言配置
  2. YouTube大转型:视频红人靠粉丝会员创收 不再依赖广告
  3. 数学与计算机科学研究生大学排名,计算数学专业考研院校排名
  4. 【唐诗学习】四、边塞诗派代表
  5. 天圆地方· 围棋界的盲棋天才 -- 鲍云
  6. idea框选为矩形解决方案
  7. centos使用storcli工具查看服务器硬盘和raid组信息
  8. 【vijos】1006 晴天小猪历险记之Hill(dijkstra)
  9. Java中的时区转换
  10. E-R图画法解析----概念模型的一种表示方法