Shade 스크립트(Python)로 미비우스 바퀴 만들기
script.py
import math
scene = xshade.scene()
scene.begin_creating()
r = 10
for n in range(0,360,3):
for rr in [-1.5,-1.2, -0.9, -0.6, -0.3, 0.0, 0.3, 0.6, 0.9, 1.2,1.5]:
nn = n / 2
x1 = (r) * math.cos(n * math.pi/180)
y1 = (r) * math.sin(n * math.pi/180)
x2 = x1 + (rr) * math.sin(nn * math.pi/180) * math.cos(n * math.pi/180)
y2 = y1 + (rr) * math.sin(nn * math.pi/180) * math.sin(n * math.pi/180)
z2 = (rr) * math.cos(nn * math.pi/180)
scene.create_sphere(None,(x2, y2, z2),0.6)
scene.end_creating()

For 문서의
hineri.py
nn = n / 2
하면, 회전 횟수 등 변화가 발생할 수 있다hineri.py
nn = n
↓
hineri.py
nn = n * 6
↓
hineri.py
nn = n * 2
↓
hineri.py
nn = n * 2.5
↓
hineri.py
nn = n * math.cos(n * math.pi/180)
↓
hineri.py
for n in range(0,360,1):
~~
nn = n * 17
↓
Reference
이 문제에 관하여(Shade 스크립트(Python)로 미비우스 바퀴 만들기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/santarou6/items/2856ce018b3ce5627f8f텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)