Fit twelve ribbon presets and compare shared cut and winding rules
This commit is contained in:
@@ -26,3 +26,45 @@ python3 generate.py --study --size 124 --output study.png
|
||||
参数对照图前三行分别只改面数(2、3、4、6)、连续性(0.28、0.52、0.76、1)、扭转角(−55°、−15°、25°、65°)。第四行依次展示纬带、螺旋、四瓣及三瓣组合。
|
||||
|
||||
每个像素沿视线与单位球壳相交两次。生成器在两个交点分别计算色带的覆盖情况,再根据基色、面内渐变和背景色绘制正面、背面与重叠部分。图形完全由参数生成。
|
||||
|
||||
## 十二款参考配方
|
||||
|
||||
`--preset 1` 至 `--preset 12` 按参考图底部从左到右、从上到下编号。默认读取扩展配方;加 `--baseline` 可以重现八项参数的拟合结果。
|
||||
|
||||
```sh
|
||||
python3 generate.py --preset 7 --size 512 --output petals.png
|
||||
python3 generate.py --preset 12 --baseline --output spiral-baseline.png
|
||||
python3 generate.py --preset 12 --width .38 --tilt 18 --output spiral-variant.png
|
||||
python3 compare.py original-board.png --output comparison.png
|
||||
```
|
||||
|
||||

|
||||
|
||||
下表为本次保留的八参数候选。背景统一为 `#461646`,完整精度保存在 `baseline.json`。搜索比较了多组排列、面数和随机起点,局部调整连续性、带宽、扭转和倾角,并对固定几何求解基色。筛选同时考虑颜色和前景形状。有限搜索可以提供可复现的候选,无法证明全局最优。
|
||||
|
||||
| 编号 | 排列 | 面数 | 连续性 | 带宽 | 扭转° | 倾角° | 基色 | RGB 误差,八项 → 扩展 |
|
||||
|---|---|---:|---:|---:|---:|---:|---|---|
|
||||
| 01 | 纬带 | 4 | 1.000 | 0.801 | -16.9 | -1.3 | #a17173, #673f5f, #be6c65 | 27.44 → 6.93 |
|
||||
| 02 | 螺旋 | 2 | 0.970 | 0.880 | -46.9 | 24.0 | #e6b6a3, #c76b5d, #5c0007 | 29.47 → 9.32 |
|
||||
| 03 | 纬带 | 2 | 1.000 | 0.766 | -7.1 | -88.9 | #774f6c, #c4907a | 20.55 → 6.87 |
|
||||
| 04 | 纬带 | 3 | 0.997 | 1.000 | -45.6 | -104.1 | #bb7578, #6c435b, #f4c198 | 27.97 → 10.00 |
|
||||
| 05 | 花瓣 | 2 | 1.000 | 0.583 | -16.1 | -1.3 | #896d80, #e2b6ab, #a0a0a0 | 14.47 → 7.67 |
|
||||
| 06 | 花瓣 | 2 | 0.955 | 0.913 | -5.0 | -7.2 | #c4846e, #c7625f, #a0a0a0 | 26.76 → 9.43 |
|
||||
| 07 | 花瓣 | 3 | 0.880 | 0.741 | 26.1 | -3.1 | #876d80, #ebb59e, #db6159 | 13.88 → 4.87 |
|
||||
| 08 | 纬带 | 3 | 1.000 | 0.797 | 6.5 | -0.1 | #d36458, #79808f, #490018 | 19.77 → 7.26 |
|
||||
| 09 | 纬带 | 3 | 1.000 | 0.764 | -19.6 | 173.9 | #9b7d84, #ae7c7d, #aa8680 | 30.17 → 9.05 |
|
||||
| 10 | 纬带 | 3 | 1.000 | 0.603 | -23.7 | -86.4 | #c3756c, #dc8d7f, #b3544a | 24.39 → 6.45 |
|
||||
| 11 | 纬带 | 3 | 1.000 | 0.538 | 17.9 | -5.8 | #a08193, #9d3f46, #cf9282 | 23.36 → 5.79 |
|
||||
| 12 | 螺旋 | 4 | 0.892 | 0.702 | 40.2 | 129.7 | #6e406c, #873049, #a0464a, #463962, #790000 | 28.65 → 7.42 |
|
||||
|
||||
### 扩展规则
|
||||
|
||||
- **逐带边界。** 在局部坐标中用两张曲面限定每条色带。`angles` 指定切面方向,`edges` 的常数项决定带的位置,横向与深度项控制斜率和俯仰,交叉项控制扭转,二次项控制弯曲和侧缘折返。不同带可以独立设定。`depth_power` 控制折返向球缘集中的程度。
|
||||
- **沿经度推进。** `latitude` 允许按纬角布置带边。12 号还使用 `wave` 指定密度、相位、俯仰、绕行数、扭转、弯曲和纬度间距插值。绕行数为 −2;沿经度转一圈,色带相位跨过两个间隔。球缘细带随相位收拢。
|
||||
- **翻面与混色。** 同一条视线可能只穿过前带、只穿过后带或穿过两带。每种交叠可以用 `inks` 从基色中选两个方向性混色端点;`creases` 允许只对指定色面作额外切分。六个共用基色为 `#ff8b76`、`#ffdfbb`、`#c1d0cb`、`#868292`、`#a56680`、`#efb6ad`。05、07 继续使用原花瓣几何,只扩展面内着色。
|
||||
|
||||
`recipes.json` 中每项包含设计参数和局部系数。扩展预设的面数由它的边界组合决定;可以继续修改带宽、倾角、扭转或替换一整套基色。对于自由调整面数和排列的探索,可以使用八参数模式。
|
||||
|
||||
### 比较口径
|
||||
|
||||
使用 750 × 1500 的输入海报,按原球心与半径截取同一正视图,统一到 100 × 100 像素。MAE 是整个裁框上三个 RGB 通道的平均绝对差,满量程 255。前景为任一通道与背景相差超过 25 的像素,IoU 为两幅前景的交集面积除以并集面积。两者都比较本次拟合使用的正视图。04 的斜向交叉、09 的错层折返、12 的极端细带仍可辨认出差异。
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
[
|
||||
{
|
||||
"layout": "rings",
|
||||
"faces": 4,
|
||||
"continuity": 1.0,
|
||||
"width": 0.80087,
|
||||
"twist": -16.88983,
|
||||
"tilt": -1.30015,
|
||||
"palette": [
|
||||
"#a17173",
|
||||
"#673f5f",
|
||||
"#be6c65"
|
||||
],
|
||||
"background": "#461646"
|
||||
},
|
||||
{
|
||||
"layout": "spiral",
|
||||
"faces": 2,
|
||||
"continuity": 0.96976,
|
||||
"width": 0.88019,
|
||||
"twist": -46.91601,
|
||||
"tilt": 23.9786,
|
||||
"palette": [
|
||||
"#e6b6a3",
|
||||
"#c76b5d",
|
||||
"#5c0007"
|
||||
],
|
||||
"background": "#461646"
|
||||
},
|
||||
{
|
||||
"layout": "rings",
|
||||
"faces": 2,
|
||||
"continuity": 1.0,
|
||||
"width": 0.76564,
|
||||
"twist": -7.07824,
|
||||
"tilt": -88.8686,
|
||||
"palette": [
|
||||
"#774f6c",
|
||||
"#c4907a"
|
||||
],
|
||||
"background": "#461646"
|
||||
},
|
||||
{
|
||||
"layout": "rings",
|
||||
"faces": 3,
|
||||
"continuity": 0.99712,
|
||||
"width": 1.0,
|
||||
"twist": -45.58357,
|
||||
"tilt": -104.05176,
|
||||
"palette": [
|
||||
"#bb7578",
|
||||
"#6c435b",
|
||||
"#f4c198"
|
||||
],
|
||||
"background": "#461646"
|
||||
},
|
||||
{
|
||||
"layout": "petals",
|
||||
"faces": 2,
|
||||
"continuity": 1.0,
|
||||
"width": 0.58315,
|
||||
"twist": -16.11004,
|
||||
"tilt": -1.33529,
|
||||
"palette": [
|
||||
"#896d80",
|
||||
"#e2b6ab",
|
||||
"#a0a0a0"
|
||||
],
|
||||
"background": "#461646"
|
||||
},
|
||||
{
|
||||
"layout": "petals",
|
||||
"faces": 2,
|
||||
"continuity": 0.95538,
|
||||
"width": 0.91315,
|
||||
"twist": -5.03226,
|
||||
"tilt": -7.18643,
|
||||
"palette": [
|
||||
"#c4846e",
|
||||
"#c7625f",
|
||||
"#a0a0a0"
|
||||
],
|
||||
"background": "#461646"
|
||||
},
|
||||
{
|
||||
"layout": "petals",
|
||||
"faces": 3,
|
||||
"continuity": 0.87956,
|
||||
"width": 0.74101,
|
||||
"twist": 26.13752,
|
||||
"tilt": -3.06799,
|
||||
"palette": [
|
||||
"#876d80",
|
||||
"#ebb59e",
|
||||
"#db6159"
|
||||
],
|
||||
"background": "#461646"
|
||||
},
|
||||
{
|
||||
"layout": "rings",
|
||||
"faces": 3,
|
||||
"continuity": 1.0,
|
||||
"width": 0.79676,
|
||||
"twist": 6.51302,
|
||||
"tilt": -0.11747,
|
||||
"palette": [
|
||||
"#d36458",
|
||||
"#79808f",
|
||||
"#490018"
|
||||
],
|
||||
"background": "#461646"
|
||||
},
|
||||
{
|
||||
"layout": "rings",
|
||||
"faces": 3,
|
||||
"continuity": 1.0,
|
||||
"width": 0.7641,
|
||||
"twist": -19.61776,
|
||||
"tilt": 173.90036,
|
||||
"palette": [
|
||||
"#9b7d84",
|
||||
"#ae7c7d",
|
||||
"#aa8680"
|
||||
],
|
||||
"background": "#461646"
|
||||
},
|
||||
{
|
||||
"layout": "rings",
|
||||
"faces": 3,
|
||||
"continuity": 1.0,
|
||||
"width": 0.60328,
|
||||
"twist": -23.68126,
|
||||
"tilt": -86.38342,
|
||||
"palette": [
|
||||
"#c3756c",
|
||||
"#dc8d7f",
|
||||
"#b3544a"
|
||||
],
|
||||
"background": "#461646"
|
||||
},
|
||||
{
|
||||
"layout": "rings",
|
||||
"faces": 3,
|
||||
"continuity": 1.0,
|
||||
"width": 0.53755,
|
||||
"twist": 17.91995,
|
||||
"tilt": -5.82327,
|
||||
"palette": [
|
||||
"#a08193",
|
||||
"#9d3f46",
|
||||
"#cf9282"
|
||||
],
|
||||
"background": "#461646"
|
||||
},
|
||||
{
|
||||
"layout": "spiral",
|
||||
"faces": 4,
|
||||
"continuity": 0.89193,
|
||||
"width": 0.70188,
|
||||
"twist": 40.17834,
|
||||
"tilt": 129.74203,
|
||||
"palette": [
|
||||
"#6e406c",
|
||||
"#873049",
|
||||
"#a0464a",
|
||||
"#463962",
|
||||
"#790000"
|
||||
],
|
||||
"background": "#461646"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,67 @@
|
||||
"""Compare the twelve presets to the original 750 x 1500 board in reading order."""
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
from generate import preset, render
|
||||
|
||||
# Use the larger original for the trefoil. The other crops have similar
|
||||
# native sizes. Radius is the scale of the unit sphere, including its gaps.
|
||||
CROPS = [(459,255,38), (300,1108,38), (451,1108,39), (609,128,38),
|
||||
(148,1245,39), (459,128,39), (221,256,118), (604,1245,38),
|
||||
(148,1383,38), (609,382,39), (459,382,38), (609,255,38)]
|
||||
|
||||
|
||||
def target(board, crop, size):
|
||||
cx,cy,r = crop
|
||||
extent = r*1.08
|
||||
return board.resize((size,size), Image.Resampling.BICUBIC,
|
||||
box=(cx-extent,cy-extent,cx+extent,cy+extent))
|
||||
|
||||
|
||||
def errors(source, image):
|
||||
a,b = (np.asarray(v,dtype=float) for v in (source,image))
|
||||
bg = [70,22,70]
|
||||
ma,mb = (np.max(abs(v-bg),axis=2)>25 for v in (a,b))
|
||||
return np.abs(a-b).mean(), (ma&mb).sum()/(ma|mb).sum()
|
||||
|
||||
|
||||
def compare(board, output):
|
||||
if board.size != (750,1500):
|
||||
raise ValueError("Expected the original 750 x 1500 reference board")
|
||||
size = 100
|
||||
cell = 3*size+24
|
||||
height = size+32
|
||||
sheet = Image.new("RGB",(4*cell,3*height+23),"#301530")
|
||||
draw = ImageDraw.Draw(sheet)
|
||||
for column in range(4):
|
||||
for j,label in enumerate(("Original","8 controls","Extended")):
|
||||
draw.text((column*cell+5+j*(size+3),5),label,fill="#efdbed")
|
||||
print("mark baseline_MAE revised_MAE baseline_IoU revised_IoU")
|
||||
for i,crop in enumerate(CROPS):
|
||||
ref = target(board,crop,size)
|
||||
images = [ref]
|
||||
scores = []
|
||||
for baseline in (True,False):
|
||||
design, recipe = preset(i+1, baseline)
|
||||
image = render(design,size,recipe)
|
||||
images.append(image)
|
||||
scores.append(errors(ref,image))
|
||||
left,top = i%4*cell+5,i//4*height+27
|
||||
for j,img in enumerate(images):
|
||||
sheet.paste(img,(left+j*(size+3),top))
|
||||
draw.text((left+size+24,top+size+3),f"{i+1:02}",fill="white")
|
||||
print(f"{i+1:02} {scores[0][0]:8.2f} {scores[1][0]:7.2f}"
|
||||
f" {scores[0][1]:.3f} {scores[1][1]:.3f}")
|
||||
sheet.save(output)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser=argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("reference",type=Path)
|
||||
parser.add_argument("--output",type=Path,required=True)
|
||||
args=parser.parse_args()
|
||||
with Image.open(args.reference) as source:
|
||||
compare(source.convert("RGB"),args.output)
|
||||
@@ -0,0 +1,83 @@
|
||||
"""A layered ribbon made by intersecting oriented curved cuts with a sphere."""
|
||||
import numpy as np
|
||||
|
||||
|
||||
def coordinates(x, y, z, angles):
|
||||
a = np.deg2rad(angles)
|
||||
u = x[..., None]*np.cos(a) - y[..., None]*np.sin(a)
|
||||
h = x[..., None]*np.sin(a) + y[..., None]*np.cos(a)
|
||||
depth = np.broadcast_to(z[..., None], u.shape)
|
||||
terms = (np.ones_like(u), u, depth, u*depth, u*u, depth*depth, u*u*depth)
|
||||
return h, np.stack(terms, axis=-1)
|
||||
|
||||
|
||||
def surfaces(x, y, z, angles, edges, latitude=False, wave=None):
|
||||
h, terms = coordinates(x, y, z, angles)
|
||||
if wave:
|
||||
count, offset, pitch, winding, twist, bow, blend = wave
|
||||
u, depth = terms[...,1], terms[...,2]
|
||||
bend = pitch + twist*u + bow*(2*u*u-1)
|
||||
level = h*np.cos(bend) + depth*np.sin(bend)
|
||||
azimuth = np.arctan2(depth*np.cos(bend)-h*np.sin(bend),u)
|
||||
latitude_angle = np.arcsin(np.clip(level,-1,1))*2/np.pi
|
||||
h = (1-blend)*level + blend*latitude_angle + 2*offset/count - winding*azimuth/(np.pi*count)
|
||||
if latitude:
|
||||
h = np.arcsin(np.clip(h, -1, 1))*2/np.pi
|
||||
longitude = np.arctan2(terms[..., 2], terms[..., 1])/np.pi
|
||||
terms = np.concatenate((terms, longitude[..., None]), axis=-1)
|
||||
return h[..., None] - np.einsum("...ki,kji->...kj", terms, edges)
|
||||
|
||||
|
||||
def face_ids(x, y, z, recipe, width=.5, twist=0):
|
||||
bend = np.deg2rad(twist)*x
|
||||
h = y*np.cos(bend) + z*np.sin(bend)
|
||||
depth = z*np.cos(bend) - y*np.sin(bend)
|
||||
depth = np.sign(depth)*abs(depth)**recipe.get("depth_power", 1)
|
||||
delta = surfaces(x, h, depth, recipe["angles"], np.asarray(recipe["edges"]),
|
||||
recipe.get("latitude", False),recipe.get("wave"))
|
||||
half_width = (delta[..., 0]-delta[..., 1])*width
|
||||
mid = (delta[..., 0]+delta[..., 1])*.5
|
||||
margin = half_width - abs(mid)
|
||||
return np.where(margin.max(axis=-1)>0, margin.argmax(axis=-1)+1, 0)
|
||||
|
||||
|
||||
def crease_basis(x, y, z):
|
||||
return np.stack((np.ones_like(x), x, y, z, x*y, x*z, y*z, x*x-y*y, z*z), axis=-1)
|
||||
|
||||
|
||||
def cut_paint(d, x, y, z, palette, background, recipe):
|
||||
front = face_ids(x, y, z, recipe, d.width, d.twist)
|
||||
back = face_ids(x, y, -z, recipe, d.width, d.twist)
|
||||
labels = front*(d.faces+1)+back
|
||||
color = ink_paint(d, x, y, z, labels, palette, background, recipe)
|
||||
if d.continuity < 1:
|
||||
phase = np.abs(np.arctan2(z,x))/np.pi
|
||||
color = np.where((phase < d.continuity)[..., None], color, background)
|
||||
return color
|
||||
|
||||
|
||||
def ink_paint(d, x, y, z, labels, palette, background, recipe):
|
||||
if recipe["creases"]:
|
||||
terms = crease_basis(x, y, z)
|
||||
for parent, child, coefficients in recipe["creases"]:
|
||||
labels[(labels == parent) & (terms @ coefficients > 0)] = child
|
||||
# Two pigment indices and an affine mix per face. Index zero is the
|
||||
# background, so a face can open into a gap. Every recipe is recolourable.
|
||||
pigments = np.vstack((background, palette))
|
||||
paints = recipe["inks"]
|
||||
table = np.zeros((max(int(labels.max()), max(map(int, paints)))+1, 5))
|
||||
# A width edit can expose a previously hidden pair. Inherit the pigment
|
||||
# from the visible face instead of creating an accidental hole.
|
||||
n = d.faces+1
|
||||
for key in range(1,min(n*n,len(table))):
|
||||
front_id, back_id = divmod(key,n)
|
||||
face = front_id or back_id
|
||||
default = [1+(face-1)%len(palette)]*2 + [0,0,0]
|
||||
donors = [front_id*n,back_id,face*(n+1)]
|
||||
table[key] = next((paints[str(j)] for j in donors if j and str(j) in paints), default)
|
||||
for key, ink in paints.items():
|
||||
table[int(key)] = ink
|
||||
a, b, offset, dx, dy = np.moveaxis(table[labels], -1, 0)
|
||||
weight = np.clip(offset+dx*x+dy*y, 0, 1)[..., None]
|
||||
color = pigments[a.astype(int)]*(1-weight) + pigments[b.astype(int)]*weight
|
||||
return color
|
||||
@@ -1,11 +1,14 @@
|
||||
"""Generate ribbon fields with NumPy and Pillow. Run --help for the design controls."""
|
||||
import argparse
|
||||
import json
|
||||
from dataclasses import dataclass, replace
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
from PIL import Image, ImageColor
|
||||
|
||||
from cuts import cut_paint, ink_paint
|
||||
|
||||
HERE = Path(__file__).resolve().parent
|
||||
|
||||
|
||||
@@ -28,8 +31,8 @@ def rgb(code):
|
||||
|
||||
|
||||
def check(d):
|
||||
if d.layout not in ("rings", "spiral", "petals"):
|
||||
raise ValueError("layout must be rings, spiral or petals")
|
||||
if d.layout not in ("rings", "spiral", "petals", "cuts"):
|
||||
raise ValueError("unknown ribbon layout")
|
||||
if not 1 <= d.faces <= 16:
|
||||
raise ValueError("faces must be 1..16")
|
||||
if not 0 <= d.continuity <= 1 or not 0 < d.width <= 1:
|
||||
@@ -54,7 +57,7 @@ def coverage(along, continuity):
|
||||
return np.sqrt(inside*(2-inside))
|
||||
|
||||
|
||||
def face(d, x, y, z, palette):
|
||||
def band_geometry(d, x, y, z):
|
||||
angle = np.deg2rad(d.twist)
|
||||
if d.layout == "petals":
|
||||
# Radial sectors on the shell. Opposite depths shear the two sides
|
||||
@@ -98,10 +101,14 @@ def face(d, x, y, z, palette):
|
||||
offset = 0 if d.layout == "spiral" else index*2.39996
|
||||
taper = coverage(longitude+offset, d.continuity)
|
||||
visible = (np.abs(phase-index) < .5*d.width*taper) & (taper > 0)
|
||||
if d.layout == "spiral":
|
||||
return visible, index, along, latitude*d.faces if d.layout == "spiral" else None
|
||||
|
||||
|
||||
def face(d, x, y, z, palette):
|
||||
visible, index, along, pigment = band_geometry(d,x,y,z)
|
||||
if pigment is not None:
|
||||
# Vary pigment continuously with latitude, including across the seam
|
||||
# where the spiral's integer winding number changes.
|
||||
pigment = latitude*d.faces
|
||||
band = np.floor(pigment).astype(int)
|
||||
f = pigment-band
|
||||
f = f*f*(3-2*f)
|
||||
@@ -112,10 +119,28 @@ def face(d, x, y, z, palette):
|
||||
return visible, mix(color, 255., glow[...,None])
|
||||
|
||||
|
||||
def render(d, size=256):
|
||||
def shade(d, x, y, z, palette, bg):
|
||||
front, ink = face(d,x,y,z,palette)
|
||||
back, reverse = face(d,x,y,-z,palette)
|
||||
# Back faces receive less light. The same base pigments determine
|
||||
# the rear and overlap colours even when the palette is changed.
|
||||
rear = mix(bg,reverse,.44)
|
||||
both = mix(ink,reverse,.24)
|
||||
both = mix(both,255.,(.06+.18*z)[...,None])
|
||||
paint = np.where(front[...,None],np.where(back[...,None],both,ink),rear)
|
||||
return np.where((front|back)[...,None],paint,bg)
|
||||
|
||||
|
||||
def render(d, size=256, recipe=None):
|
||||
check(d)
|
||||
if not 16 <= size <= 2048:
|
||||
raise ValueError("size must be 16..2048")
|
||||
if d.layout == "cuts" and (recipe is None or d.faces != len(recipe["edges"])):
|
||||
raise ValueError("cut layout requires one boundary pair per face")
|
||||
if recipe is not None:
|
||||
highest = max(int(k) for ink in recipe["inks"].values() for k in ink[:2])
|
||||
if highest > len(d.palette):
|
||||
raise ValueError(f"this cut recipe requires at least {highest} base colours")
|
||||
palette = np.array([rgb(c) for c in d.palette])
|
||||
bg = rgb(d.background)
|
||||
axis = (np.arange(size*3)+.5) * 2.16/(size*3)-1.08
|
||||
@@ -128,15 +153,16 @@ def render(d, size=256):
|
||||
y = xx*np.sin(roll) + yy*np.cos(roll)
|
||||
radius2 = x*x+y*y
|
||||
z = np.sqrt(np.maximum(0,1-radius2))
|
||||
front, ink = face(d,x,y,z,palette)
|
||||
back, reverse = face(d,x,y,-z,palette)
|
||||
# Back faces receive less light. The same base pigments determine
|
||||
# the rear and overlap colours even when the palette is changed.
|
||||
rear = mix(bg,reverse,.44)
|
||||
both = mix(ink,reverse,.24)
|
||||
both = mix(both,255.,(.06+.18*z)[...,None])
|
||||
paint = np.where(front[...,None],np.where(back[...,None],both,ink),rear)
|
||||
paint = np.where(((front|back)&(radius2<=1))[...,None],paint,bg)
|
||||
if d.layout == "cuts":
|
||||
paint = cut_paint(d,x,y,z,palette,bg,recipe)
|
||||
elif recipe is not None:
|
||||
front, fi, _, _ = band_geometry(d,x,y,z)
|
||||
back, bi, _, _ = band_geometry(d,x,y,-z)
|
||||
labels = front*(fi+1)*(d.faces+1) + back*(bi+1)
|
||||
paint = ink_paint(d,x,y,z,labels,palette,bg,recipe)
|
||||
else:
|
||||
paint = shade(d,x,y,z,palette,bg)
|
||||
paint = np.where((radius2<=1)[...,None],paint,bg)
|
||||
block = paint.reshape(stop-start,3,size,3,3).mean(axis=(1,3))
|
||||
output[start:stop] = np.rint(block).astype(np.uint8)
|
||||
return Image.fromarray(output)
|
||||
@@ -158,26 +184,44 @@ def study(d, size):
|
||||
return canvas
|
||||
|
||||
|
||||
def preset(mark, baseline=False):
|
||||
filename = "baseline.json" if baseline else "recipes.json"
|
||||
record = json.loads((HERE/filename).read_text())[mark-1]
|
||||
if baseline:
|
||||
return Design(**record), None
|
||||
return Design(**record["design"]), record["cuts"]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
defaults = Design()
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--layout", choices=("rings","spiral","petals"), default=defaults.layout)
|
||||
parser.add_argument("--faces",type=int,default=defaults.faces,help="rings, spiral turns or petals (1..16)")
|
||||
parser.add_argument("--continuity",type=float,default=defaults.continuity,help="arc coverage (0..1)")
|
||||
parser.add_argument("--width",type=float,default=defaults.width,help="fraction of spacing filled (0..1]")
|
||||
parser.add_argument("--twist",type=float,default=defaults.twist,help="spherical deformation in degrees")
|
||||
parser.add_argument("--tilt",type=float,default=defaults.tilt,help="image-plane rotation in degrees")
|
||||
parser.add_argument("--palette",nargs="+",default=defaults.palette,help="one or more #RRGGBB colours")
|
||||
parser.add_argument("--background",default=defaults.background,help="#RRGGBB")
|
||||
parser.add_argument("--layout", choices=("rings","spiral","petals"), default=None)
|
||||
parser.add_argument("--faces",type=int,default=None,help="rings, spiral turns or petals (1..16)")
|
||||
parser.add_argument("--continuity",type=float,default=None,help="arc coverage (0..1)")
|
||||
parser.add_argument("--width",type=float,default=None,help="fraction of spacing filled (0..1]")
|
||||
parser.add_argument("--twist",type=float,default=None,help="spherical deformation in degrees")
|
||||
parser.add_argument("--tilt",type=float,default=None,help="image-plane rotation in degrees")
|
||||
parser.add_argument("--palette",nargs="+",default=None,help="one or more #RRGGBB colours")
|
||||
parser.add_argument("--background",default=None,help="#RRGGBB")
|
||||
parser.add_argument("--size",type=int,default=256)
|
||||
parser.add_argument("--output",required=True,type=Path)
|
||||
parser.add_argument("--study",action="store_true",help="render a 4 by 4 parameter comparison")
|
||||
parser.add_argument("--preset", type=int, choices=range(1,13), help="reference mark in reading order")
|
||||
parser.add_argument("--baseline", action="store_true", help="load the original eight-control fit")
|
||||
args = parser.parse_args()
|
||||
design = Design(**{key:getattr(args,key) for key in Design.__dataclass_fields__})
|
||||
if args.preset and not args.baseline and (args.faces is not None or args.layout is not None):
|
||||
parser.error("each detailed preset defines its band count and layout; use --baseline to override these")
|
||||
if args.baseline and not args.preset:
|
||||
parser.error("--baseline needs --preset")
|
||||
if args.study and args.preset:
|
||||
parser.error("--study and --preset are separate output modes")
|
||||
defaults, recipe = preset(args.preset,args.baseline) if args.preset else (defaults,None)
|
||||
design = replace(defaults, **{key:getattr(args,key) for key in Design.__dataclass_fields__
|
||||
if getattr(args,key) is not None})
|
||||
try:
|
||||
if not 16 <= args.size <= 2048:
|
||||
raise ValueError("size must be 16..2048")
|
||||
img = study(design,args.size) if args.study else render(design,args.size)
|
||||
img = study(design,args.size) if args.study else render(design,args.size,recipe)
|
||||
except ValueError as error:
|
||||
parser.error(str(error))
|
||||
img.save(args.output)
|
||||
|
||||
@@ -0,0 +1,745 @@
|
||||
[
|
||||
{
|
||||
"design": {
|
||||
"layout": "cuts",
|
||||
"faces": 4,
|
||||
"continuity": 1,
|
||||
"width": 0.5,
|
||||
"twist": 0,
|
||||
"tilt": 0,
|
||||
"palette": ["#ff8b76", "#ffdfbb", "#c1d0cb", "#868292", "#a56680", "#efb6ad"],
|
||||
"background": "#461646"
|
||||
},
|
||||
"cuts": {
|
||||
"angles": [0, 0, 0, 0],
|
||||
"edges": [
|
||||
[
|
||||
[-1.2, 0.0, 0.0, 0.36, 0.0, 0.0, 0.0],
|
||||
[-0.895, 0.0, 0.0, 0.493, 0.0, 0.0, 0.0]
|
||||
],
|
||||
[
|
||||
[-0.657, 0.0, 0.0, 0.425, 0.0, 0.0, 0.0],
|
||||
[-0.306, 0.0, 0.0, 0.324, 0.0, 0.0, 0.0]
|
||||
],
|
||||
[
|
||||
[0.087, 0.0, 0.0, 0.334, 0.0, 0.0, 0.0],
|
||||
[0.462, 0.0, 0.0, 0.346, 0.0, 0.0, 0.0]
|
||||
],
|
||||
[
|
||||
[0.745, 0.0, 0.0, 0.414, 0.0, 0.0, 0.0],
|
||||
[1.3, 0.0, 0.0, 0.36, 0.0, 0.0, 0.0]
|
||||
]
|
||||
],
|
||||
"creases": [
|
||||
[
|
||||
15,
|
||||
25,
|
||||
[-0.5621, -0.0475, 0.5031, 0.4294, 0.1106, 0.0453, -0.1112, 0.4524, 0.1137]
|
||||
],
|
||||
[
|
||||
24,
|
||||
26,
|
||||
[-0.3804, -0.0494, 0.4317, 0.1525, -0.0175, 0.5424, 0.4343, 0.1192, -0.3819]
|
||||
],
|
||||
[
|
||||
18,
|
||||
27,
|
||||
[-0.5292, -0.0038, 0.4942, 0.0936, 0.0096, -0.0608, -0.1678, 0.4517, 0.4806]
|
||||
],
|
||||
[
|
||||
2,
|
||||
28,
|
||||
[0.3489, -0.09, 0.0571, -0.1095, -0.2901, 0.0248, 0.7666, -0.424, -0.0517]
|
||||
]
|
||||
],
|
||||
"inks": {
|
||||
"1": [0, 3, 0.679, -0.304, -0.029],
|
||||
"2": [0, 5, 0.646, -0.149, -0.33],
|
||||
"3": [0, 3, 0.705, -0.276, -0.043],
|
||||
"4": [1, 2, 0.088, 0.439, 0.311],
|
||||
"5": [1, 2, 0.388, 0.454, -0.018],
|
||||
"6": [2, 3, 0.462, -0.879, 0.118],
|
||||
"10": [3, 4, 0.91, 0.032, -0.038],
|
||||
"12": [3, 5, 0.587, 0.131, 0.094],
|
||||
"15": [0, 1, 0.532, 0.028, -0.078],
|
||||
"18": [5, 6, 0.566, 0.099, 0.008],
|
||||
"20": [0, 3, 0.417, -0.002, 0.226],
|
||||
"24": [4, 6, 0.461, 0.117, 0.038],
|
||||
"25": [1, 4, 0.09, 0.006, 0.007],
|
||||
"26": [2, 6, 0.554, -0.343, -0.224],
|
||||
"27": [2, 6, 0.417, 0.511, 0.276],
|
||||
"28": [0, 1, 0.199, -0.092, -0.116]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"design": {
|
||||
"layout": "cuts",
|
||||
"faces": 6,
|
||||
"continuity": 1,
|
||||
"width": 0.5,
|
||||
"twist": 0,
|
||||
"tilt": 0,
|
||||
"palette": ["#ff8b76", "#ffdfbb", "#c1d0cb", "#868292", "#a56680", "#efb6ad"],
|
||||
"background": "#461646"
|
||||
},
|
||||
"cuts": {
|
||||
"angles": [1.79, 1.79, 1.79, 1.79, 1.79, 1.79],
|
||||
"edges": [
|
||||
[
|
||||
[-1.146, 0.0, 0.754, 0.029, -1.365, -0.256, -0.536],
|
||||
[-0.747, -0.026, 0.704, 0.045, -0.978, -0.431, 0.483]
|
||||
],
|
||||
[
|
||||
[-0.806, 0.0, 1.045, 0.018, -0.929, -0.668, 0.468],
|
||||
[-0.366, 0.019, 0.915, -0.034, -0.568, -0.631, 0.129]
|
||||
],
|
||||
[
|
||||
[-0.14, 0.0, 0.837, 0.0, -0.599, -0.661, 0.127],
|
||||
[-0.553, 0.0, 0.489, 0.012, 0.368, 0.49, 0.0]
|
||||
],
|
||||
[
|
||||
[-0.128, 0.024, 0.575, -0.026, 0.15, 0.175, -0.047],
|
||||
[0.25, -0.024, 0.603, 0.042, 0.047, 0.07, 0.088]
|
||||
],
|
||||
[
|
||||
[0.559, -0.144, 0.588, 0.37, -0.17, -0.109, 0.497],
|
||||
[0.891, 0.0, 0.326, 0.0, -0.287, -0.42, 0.07]
|
||||
],
|
||||
[
|
||||
[0.734, 0.052, 0.579, 0.048, 0.518, 0.245, 0.136],
|
||||
[0.801, -0.119, 0.523, -0.132, 0.584, 0.252, 0.195]
|
||||
]
|
||||
],
|
||||
"depth_power": 1,
|
||||
"creases": [
|
||||
[
|
||||
9,
|
||||
49,
|
||||
[-0.274, -0.0199, -0.021, 0.4154, -0.137, -0.6154, -0.5908, -0.07, 0.0132]
|
||||
],
|
||||
[
|
||||
26,
|
||||
50,
|
||||
[-0.3783, 0.0008, -0.4384, 0.2991, -0.0545, 0.0061, 0.697, 0.286, 0.0681]
|
||||
]
|
||||
],
|
||||
"inks": {
|
||||
"2": [4, 6, 0.74, -0.166, -0.171],
|
||||
"3": [0, 2, 0.351, -0.166, -0.06],
|
||||
"4": [0, 2, 0.388, -0.137, -0.157],
|
||||
"5": [0, 2, 0.273, -0.186, 0.062],
|
||||
"6": [0, 3, 0.572, -0.277, -0.196],
|
||||
"7": [1, 6, 0.681, 0.552, 0.096],
|
||||
"8": [0, 2, 0.279, 0.028, -0.012],
|
||||
"9": [0, 6, 0.492, 0.02, 0.01],
|
||||
"10": [2, 6, 0.081, -0.436, -0.652],
|
||||
"11": [2, 5, 0.332, -0.039, 0.037],
|
||||
"14": [1, 4, 0.038, -0.086, -0.323],
|
||||
"16": [0, 5, 0.8, -0.062, 0.057],
|
||||
"17": [1, 6, 0.628, -0.486, -0.022],
|
||||
"18": [1, 6, 0.768, -0.367, -0.187],
|
||||
"19": [1, 3, 0.032, 0.27, -0.108],
|
||||
"21": [1, 3, 0.313, 0.21, -0.121],
|
||||
"24": [2, 5, 0.708, -0.052, 0.004],
|
||||
"25": [2, 6, 0.794, 0.052, 0.071],
|
||||
"26": [0, 2, 0.67, -0.123, -0.04],
|
||||
"28": [1, 5, 0.28, -0.057, -0.062],
|
||||
"32": [5, 6, 0.516, -0.183, -0.053],
|
||||
"33": [1, 6, 0.608, -0.47, -0.172],
|
||||
"34": [1, 6, 0.989, -0.554, -0.313],
|
||||
"35": [0, 6, 0.6, 0.075, 0.28],
|
||||
"40": [0, 6, 0.36, -0.162, 0.112],
|
||||
"41": [3, 6, 0.99, 0.166, -0.033],
|
||||
"42": [0, 1, 0.126, -0.036, -0.019],
|
||||
"48": [1, 4, 0.747, 0.0, 0.0],
|
||||
"49": [2, 6, 0.977, -0.209, 0.197],
|
||||
"50": [1, 2, 0.752, -0.078, -0.031]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"design": {
|
||||
"layout": "cuts",
|
||||
"faces": 2,
|
||||
"continuity": 1,
|
||||
"width": 0.5,
|
||||
"twist": 0,
|
||||
"tilt": 0,
|
||||
"palette": ["#ff8b76", "#ffdfbb", "#c1d0cb", "#868292", "#a56680", "#efb6ad"],
|
||||
"background": "#461646"
|
||||
},
|
||||
"cuts": {
|
||||
"angles": [91.28, 91.28],
|
||||
"edges": [
|
||||
[
|
||||
[0.201, 0.038, -0.035, -0.036, 0.064, 0.05, -0.383],
|
||||
[0.987, 0.012, 0.014, 0.286, -0.557, -0.506, 0.0]
|
||||
],
|
||||
[
|
||||
[-0.99, 0.021, 0.0, 0.249, 0.606, 0.528, -0.023],
|
||||
[-0.15, 0.021, 0.0, 0.287, -0.066, -0.092, 0.0]
|
||||
]
|
||||
],
|
||||
"depth_power": 1,
|
||||
"creases": [],
|
||||
"inks": {
|
||||
"1": [0, 6, 0.588, -0.464, 0.02],
|
||||
"2": [0, 3, 0.976, 0.543, -0.023],
|
||||
"3": [4, 5, -0.048, 0.955, -0.052],
|
||||
"4": [3, 5, 0.197, 0.621, 0.019],
|
||||
"6": [1, 2, 0.637, 0.58, 0.011],
|
||||
"8": [2, 3, 0.442, 0.611, 0.07]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"design": {
|
||||
"layout": "cuts",
|
||||
"faces": 3,
|
||||
"continuity": 1,
|
||||
"width": 0.5,
|
||||
"twist": 0,
|
||||
"tilt": 0,
|
||||
"palette": ["#ff8b76", "#ffdfbb", "#c1d0cb", "#868292", "#a56680", "#efb6ad"],
|
||||
"background": "#461646"
|
||||
},
|
||||
"cuts": {
|
||||
"angles": [43, 43, 43],
|
||||
"edges": [
|
||||
[
|
||||
[-0.974, -0.109, -0.803, -0.104, 0.218, 0.038, -0.09],
|
||||
[-0.309, 0.012, -0.529, -0.064, 0.225, 0.287, 0.172]
|
||||
],
|
||||
[
|
||||
[-0.645, 0.407, -1.202, 0.0, 0.261, -0.366, 0.316],
|
||||
[0.049, 0.073, -0.372, -0.164, -0.15, -0.046, -0.696]
|
||||
],
|
||||
[
|
||||
[0.496, -0.122, -0.397, -0.176, -0.132, -0.314, 0.17],
|
||||
[0.938, 0.0, -0.301, -0.055, -0.556, 0.423, 0.601]
|
||||
]
|
||||
],
|
||||
"creases": [
|
||||
[
|
||||
12,
|
||||
16,
|
||||
[0.1749, 0.0375, 0.024, -0.7293, 0.1164, 0.2713, -0.0448, -0.1077, 0.5786]
|
||||
],
|
||||
[
|
||||
1,
|
||||
17,
|
||||
[0.2985, 0.0449, -0.2188, -0.08, 0.394, -0.5441, 0.0311, -0.5338, -0.3427]
|
||||
],
|
||||
[
|
||||
8,
|
||||
18,
|
||||
[-0.005, 0.09, -0.1775, -0.5835, -0.2883, -0.5627, -0.3139, 0.0969, 0.3349]
|
||||
],
|
||||
[
|
||||
14,
|
||||
19,
|
||||
[-0.1945, 0.0846, -0.221, 0.6663, 0.2683, -0.2242, 0.3253, 0.1184, -0.4691]
|
||||
],
|
||||
[
|
||||
15,
|
||||
20,
|
||||
[-0.2961, 0.2534, 0.1194, -0.1616, -0.3625, 0.5325, 0.6161, -0.0523, -0.1022]
|
||||
],
|
||||
[
|
||||
13,
|
||||
21,
|
||||
[-0.452, 0.3252, 0.1889, 0.578, -0.4429, -0.2834, -0.1539, -0.0815, -0.1156]
|
||||
],
|
||||
[
|
||||
4,
|
||||
22,
|
||||
[-0.2647, -0.1132, -0.2192, 0.0302, 0.4938, -0.616, -0.437, 0.0136, -0.2316]
|
||||
],
|
||||
[
|
||||
2,
|
||||
23,
|
||||
[-0.5209, -0.2239, 0.1006, -0.0443, -0.4013, -0.0386, 0.6671, 0.1863, 0.1557]
|
||||
],
|
||||
[
|
||||
17,
|
||||
24,
|
||||
[0.0241, -0.1272, 0.0001, 0.2609, 0.7995, -0.2222, -0.0376, -0.3772, -0.2881]
|
||||
]
|
||||
],
|
||||
"inks": {
|
||||
"1": [3, 5, 0.363, -0.127, -0.202],
|
||||
"2": [0, 2, 0.331, -0.089, -0.006],
|
||||
"3": [1, 4, 0.411, 0.151, 0.384],
|
||||
"4": [0, 3, 0.746, -0.125, 0.008],
|
||||
"5": [2, 4, 0.859, 0.361, 0.246],
|
||||
"6": [2, 3, 1.113, -0.015, -0.761],
|
||||
"8": [1, 2, 0.185, -0.448, -0.346],
|
||||
"10": [3, 5, 0.255, 0.0, 0.026],
|
||||
"12": [0, 1, 0.089, -0.077, 0.065],
|
||||
"13": [0, 3, 0.707, -0.049, 0.215],
|
||||
"14": [0, 3, 0.568, -0.27, 0.147],
|
||||
"15": [1, 4, 0.406, -0.16, -0.162],
|
||||
"16": [0, 2, 0.363, 0.069, 0.178],
|
||||
"17": [0, 3, 0.682, -0.012, 0.256],
|
||||
"18": [2, 6, 0.116, 0.479, -0.75],
|
||||
"19": [0, 6, 0.286, -0.265, -0.173],
|
||||
"20": [1, 6, 0.472, 0.189, 0.675],
|
||||
"21": [3, 5, 0.313, 0.004, -0.096],
|
||||
"22": [1, 2, 1.495, 0.505, 0.871],
|
||||
"23": [0, 3, 0.843, 0.053, 0.19],
|
||||
"24": [0, 5, 0.497, 0.126, 0.29]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"design": {
|
||||
"layout": "petals",
|
||||
"faces": 2,
|
||||
"continuity": 0.9993603570628949,
|
||||
"width": 0.569544269656288,
|
||||
"twist": 17.82461882652696,
|
||||
"tilt": -0.9915368530694275,
|
||||
"palette": ["#ff8b76", "#ffdfbb", "#c1d0cb", "#868292", "#a56680", "#efb6ad"],
|
||||
"background": "#461646"
|
||||
},
|
||||
"cuts": {
|
||||
"creases": [],
|
||||
"inks": {
|
||||
"1": [0, 4, 0.817, 0.317, 0.521],
|
||||
"2": [3, 4, 1.462, -0.957, 1.183],
|
||||
"3": [0, 5, 0.349, 0.48, 0.397],
|
||||
"4": [3, 5, 0.615, -0.581, -0.268],
|
||||
"6": [1, 5, 0.49, 0.249, 0.533],
|
||||
"8": [2, 6, 0.956, -0.697, 0.631]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"design": {
|
||||
"layout": "cuts",
|
||||
"faces": 2,
|
||||
"continuity": 1,
|
||||
"width": 0.5,
|
||||
"twist": 0,
|
||||
"tilt": 0,
|
||||
"palette": ["#ff8b76", "#ffdfbb", "#c1d0cb", "#868292", "#a56680", "#efb6ad"],
|
||||
"background": "#461646"
|
||||
},
|
||||
"cuts": {
|
||||
"angles": [10.0, 10.0],
|
||||
"edges": [
|
||||
[
|
||||
[-1.218, 0.538, 0.51, 1.016, -0.249, -0.195, -0.349],
|
||||
[-0.215, 0.178, 0.17, 0.276, -0.078, -0.058, -0.065]
|
||||
],
|
||||
[
|
||||
[0.185, 0.177, -0.174, 0.275, 0.066, 0.06, 0.071],
|
||||
[1.025, 0.177, -0.015, 1.04, 0.136, -0.222, 0.0]
|
||||
]
|
||||
],
|
||||
"depth_power": 0.45,
|
||||
"creases": [
|
||||
[
|
||||
4,
|
||||
9,
|
||||
[0.1672, -0.1754, 0.3096, -0.4552, -0.3363, -0.0362, -0.7118, 0.0185, 0.1297]
|
||||
],
|
||||
[
|
||||
8,
|
||||
10,
|
||||
[0.33, 0.0161, -0.4936, -0.5155, -0.0936, 0.1147, 0.5716, -0.0614, 0.1707]
|
||||
]
|
||||
],
|
||||
"inks": {
|
||||
"1": [4, 5, 0.486, 0.317, -0.212],
|
||||
"2": [0, 3, 0.683, 0.176, -0.084],
|
||||
"3": [1, 5, 0.179, -0.01, 0.153],
|
||||
"4": [1, 4, 0.195, 0.11, 0.091],
|
||||
"6": [1, 2, 0.377, -0.277, -0.008],
|
||||
"8": [1, 3, 0.643, -0.332, -0.308],
|
||||
"9": [1, 6, 0.793, -0.251, -0.118],
|
||||
"10": [2, 3, 0.11, -0.05, 0.079]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"design": {
|
||||
"layout": "petals",
|
||||
"faces": 3,
|
||||
"continuity": 0.8874254703578165,
|
||||
"width": 0.780367501043348,
|
||||
"twist": 23.192977718855392,
|
||||
"tilt": 0.10197668755349554,
|
||||
"palette": ["#ff8b76", "#ffdfbb", "#c1d0cb", "#868292", "#a56680", "#efb6ad"],
|
||||
"background": "#461646"
|
||||
},
|
||||
"cuts": {
|
||||
"creases": [],
|
||||
"inks": {
|
||||
"1": [0, 5, 0.265, -0.599, 0.428],
|
||||
"2": [0, 4, 0.871, 0.155, -0.567],
|
||||
"3": [0, 1, 0.855, -0.09, -0.11],
|
||||
"4": [0, 4, 0.879, -0.466, 0.398],
|
||||
"5": [3, 5, 1.179, 0.545, -0.89],
|
||||
"8": [1, 3, 0.133, 0.228, 0.116],
|
||||
"10": [2, 4, 0.799, -0.649, 0.57],
|
||||
"12": [0, 5, 0.357, -0.567, 0.311],
|
||||
"15": [1, 3, -0.025, -0.302, 0.075]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"design": {
|
||||
"layout": "cuts",
|
||||
"faces": 5,
|
||||
"continuity": 1,
|
||||
"width": 0.5,
|
||||
"twist": 0,
|
||||
"tilt": 0,
|
||||
"palette": ["#ff8b76", "#ffdfbb", "#c1d0cb", "#868292", "#a56680", "#efb6ad"],
|
||||
"background": "#461646"
|
||||
},
|
||||
"cuts": {
|
||||
"wave": [2.7115161706441473, -0.0019533531167574836, -0.19444940272275343, 0, 0.06829382918117148, 0, 0.8952681052405027],
|
||||
"angles": [0.13355106752340742, 0.13355106752340742, 0.13355106752340742, 0.13355106752340742, 0.13355106752340742],
|
||||
"edges": [
|
||||
[
|
||||
[-1.6703119815435827, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[-1.280066882728328, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
|
||||
],
|
||||
[
|
||||
[-0.9327172654756052, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[-0.5424721666603501, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
|
||||
],
|
||||
[
|
||||
[-0.1951225494076275, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.1951225494076275, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
|
||||
],
|
||||
[
|
||||
[0.5424721666603501, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[0.9327172654756052, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
|
||||
],
|
||||
[
|
||||
[1.280066882728328, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[1.6703119815435827, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
|
||||
]
|
||||
],
|
||||
"creases": [],
|
||||
"inks": {
|
||||
"2": [1, 4, 0.236, 0.015, -0.011],
|
||||
"3": [0, 3, 0.777, 0.277, 0.397],
|
||||
"4": [0, 5, 0.02, -0.559, 0.719],
|
||||
"12": [0, 1, 0.15, -0.017, -1.041],
|
||||
"14": [1, 6, 1.201, -0.001, 0.611],
|
||||
"18": [0, 3, 0.79, 0.283, -0.433],
|
||||
"21": [3, 4, 0.082, -0.578, -0.178],
|
||||
"24": [0, 5, 0.542, -0.019, -0.002],
|
||||
"28": [0, 6, 0.622, -0.445, -0.173]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"design": {
|
||||
"layout": "cuts",
|
||||
"faces": 6,
|
||||
"continuity": 1,
|
||||
"width": 0.5,
|
||||
"twist": 0,
|
||||
"tilt": 0,
|
||||
"palette": ["#ff8b76", "#ffdfbb", "#c1d0cb", "#868292", "#a56680", "#efb6ad"],
|
||||
"background": "#461646"
|
||||
},
|
||||
"cuts": {
|
||||
"angles": [-7.93, -7.93, -7.93, -7.93, -7.93, -7.93],
|
||||
"edges": [
|
||||
[
|
||||
[-1.183, -0.509, -0.155, -0.026, 0.025, 0.279, 0.285, -0.466],
|
||||
[-0.652, -0.397, 0.274, 0.145, 0.062, 0.407, 0.518, -0.342]
|
||||
],
|
||||
[
|
||||
[-0.642, -0.19, -0.575, -0.194, 0.47, -0.335, 0.743, -0.181],
|
||||
[-0.407, 0.09, -0.017, -0.164, 0.151, 0.208, -0.309, -0.095]
|
||||
],
|
||||
[
|
||||
[0.325, -0.121, -0.039, -0.049, -0.402, -0.4, -0.02, -0.288],
|
||||
[0.111, -0.267, 0.096, -0.17, 0.402, 0.141, 0.0, -0.54]
|
||||
],
|
||||
[
|
||||
[0.446, 0.131, 0.061, -0.079, 0.119, -0.225, -0.074, -0.317],
|
||||
[0.808, -0.503, 0.072, -0.022, -0.126, -0.213, 0.304, -0.36]
|
||||
],
|
||||
[
|
||||
[0.652, 0.072, -0.201, -0.089, -0.269, 0.1, 0.049, -0.226],
|
||||
[1.269, 0.0, -0.07, 0.0, 0.0, 0.0, 0.0, -0.252]
|
||||
],
|
||||
[
|
||||
[1.462, 0.0, -0.07, 0.0, 0.0, 0.0, 0.0, -0.25],
|
||||
[1.771, 0.0, -0.07, 0.0, 0.0, 0.0, 0.0, -0.25]
|
||||
]
|
||||
],
|
||||
"latitude": true,
|
||||
"creases": [
|
||||
[
|
||||
3,
|
||||
49,
|
||||
[0.3665, -0.2686, 0.0178, 0.1907, 0.1198, 0.0865, -0.7141, -0.3081, -0.3607]
|
||||
],
|
||||
[
|
||||
21,
|
||||
50,
|
||||
[-0.6519, -0.2958, -0.1004, 0.4812, -0.0762, 0.2716, -0.1246, 0.3376, 0.192]
|
||||
],
|
||||
[
|
||||
23,
|
||||
51,
|
||||
[-0.1366, 0.154, 0.6513, 0.017, 0.0179, -0.2849, -0.646, 0.0817, 0.1662]
|
||||
],
|
||||
[
|
||||
8,
|
||||
52,
|
||||
[0.392, 0.0771, 0.431, -0.0646, 0.3874, 0.1892, 0.631, -0.2193, 0.1354]
|
||||
],
|
||||
[
|
||||
14,
|
||||
53,
|
||||
[-0.4029, 0.0072, -0.5854, -0.3789, 0.0308, 0.1487, -0.4285, 0.2103, 0.3167]
|
||||
]
|
||||
],
|
||||
"inks": {
|
||||
"1": [0, 3, 0.484, -0.088, 0.136],
|
||||
"2": [0, 4, 0.381, -0.166, 0.654],
|
||||
"3": [2, 6, 0.341, -0.727, 1.046],
|
||||
"7": [0, 2, 0.14, 0.073, -0.077],
|
||||
"8": [0, 3, 0.657, 0.22, -0.004],
|
||||
"9": [0, 4, 0.004, -0.171, -0.032],
|
||||
"14": [1, 3, 0.217, 0.042, -0.384],
|
||||
"15": [0, 3, 0.614, 0.209, -0.113],
|
||||
"16": [0, 1, 0.16, -0.199, -0.138],
|
||||
"21": [1, 4, 0.435, 0.397, -0.115],
|
||||
"22": [5, 6, 0.885, 0.381, -0.267],
|
||||
"23": [3, 4, 0.603, -0.394, -0.303],
|
||||
"24": [2, 3, 0.504, -0.346, -0.105],
|
||||
"28": [0, 1, 0.178, 0.043, -0.279],
|
||||
"31": [0, 3, 0.664, 0.167, -0.083],
|
||||
"32": [0, 2, 0.026, -0.047, 0.02],
|
||||
"35": [1, 4, 0.938, 0.245, -0.102],
|
||||
"38": [2, 6, 1.043, -0.19, -0.366],
|
||||
"39": [2, 3, 0.575, 0.167, -0.425],
|
||||
"40": [0, 2, 0.224, 0.257, -0.034],
|
||||
"49": [4, 6, 0.14, 0.472, 0.429],
|
||||
"50": [2, 6, 0.584, -0.636, 0.042],
|
||||
"51": [3, 6, 0.758, -0.475, -0.035],
|
||||
"52": [0, 4, 0.19, 0.171, -0.084],
|
||||
"53": [2, 3, -0.152, 0.011, -0.467]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"design": {
|
||||
"layout": "cuts",
|
||||
"faces": 4,
|
||||
"continuity": 1,
|
||||
"width": 0.5,
|
||||
"twist": 0,
|
||||
"tilt": 0,
|
||||
"palette": ["#ff8b76", "#ffdfbb", "#c1d0cb", "#868292", "#a56680", "#efb6ad"],
|
||||
"background": "#461646"
|
||||
},
|
||||
"cuts": {
|
||||
"angles": [-90.42, -90.42, -90.42, -87.37],
|
||||
"edges": [
|
||||
[
|
||||
[-0.98, -0.026, 0.057, -0.064, 0.536, -0.636, 0.027],
|
||||
[-0.44, -0.17, 0.0, -0.883, -0.591, -0.608, -0.57]
|
||||
],
|
||||
[
|
||||
[-0.134, 0.0, 0.0, -0.511, -0.178, -0.142, -0.023],
|
||||
[0.28, 0.058, -0.023, -0.263, -0.13, 0.0, -0.159]
|
||||
],
|
||||
[
|
||||
[0.704, -0.051, -0.027, -0.876, 0.0, 0.0, 0.345],
|
||||
[1.021, 0.029, -0.12, -0.079, -0.592, 0.555, -0.197]
|
||||
],
|
||||
[
|
||||
[0.269, 0.094, 0.0, -0.504, 0.028, -0.021, 0.025],
|
||||
[0.656, -0.028, 0.036, 0.0, 0.073, 0.172, 0.012]
|
||||
]
|
||||
],
|
||||
"creases": [
|
||||
[
|
||||
12,
|
||||
25,
|
||||
[-0.3396, -0.2711, 0.0153, -0.2123, -0.1197, 0.4013, -0.0106, -0.3997, 0.6562]
|
||||
]
|
||||
],
|
||||
"inks": {
|
||||
"1": [0, 5, 0.835, -0.089, -0.133],
|
||||
"2": [1, 5, 0.074, 0.345, 0.057],
|
||||
"3": [0, 1, 0.386, -0.087, 0.084],
|
||||
"4": [0, 4, 1.001, 0.583, -0.064],
|
||||
"5": [1, 4, 0.493, -0.515, -0.001],
|
||||
"6": [1, 2, 0.174, 0.418, 0.105],
|
||||
"10": [3, 4, 0.44, -0.226, 0.018],
|
||||
"12": [2, 5, 0.555, 0.182, -0.14],
|
||||
"14": [2, 4, 0.932, -0.46, 0.112],
|
||||
"15": [1, 2, 0.136, -0.245, -0.104],
|
||||
"18": [1, 2, -0.037, -0.835, -0.024],
|
||||
"19": [1, 4, 0.319, 0.097, -0.186],
|
||||
"20": [1, 5, 0.788, -0.08, -0.461],
|
||||
"22": [1, 5, 0.171, -0.13, -0.184],
|
||||
"23": [0, 1, 0.185, -0.196, 0.145],
|
||||
"24": [0, 1, 0.018, -0.043, 0.032],
|
||||
"25": [2, 6, 0.552, -1.335, -0.186]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"design": {
|
||||
"layout": "cuts",
|
||||
"faces": 3,
|
||||
"continuity": 1,
|
||||
"width": 0.5,
|
||||
"twist": 0,
|
||||
"tilt": 0,
|
||||
"palette": ["#ff8b76", "#ffdfbb", "#c1d0cb", "#868292", "#a56680", "#efb6ad"],
|
||||
"background": "#461646"
|
||||
},
|
||||
"cuts": {
|
||||
"angles": [-1.37, -1.37, -1.37],
|
||||
"edges": [
|
||||
[
|
||||
[0.575, -0.083, 0.0, 0.463, 0.614, 0.232, -0.141],
|
||||
[1.005, 0.042, 0.043, 0.211, -0.104, 0.16, 0.0]
|
||||
],
|
||||
[
|
||||
[0.217, -0.13, 0.061, 0.282, -0.278, -0.455, 0.202],
|
||||
[0.514, 0.107, -0.043, 0.274, -0.167, -0.302, 0.096]
|
||||
],
|
||||
[
|
||||
[-0.999, 0.0, -0.09, -0.08, 0.566, -0.289, -0.034],
|
||||
[-0.577, 0.0, 0.021, 0.366, 0.0, -0.138, -0.125]
|
||||
]
|
||||
],
|
||||
"creases": [
|
||||
[
|
||||
2,
|
||||
16,
|
||||
[-0.3636, 0.0853, 0.5016, -0.0697, -0.0098, -0.172, -0.4648, 0.3691, 0.4712]
|
||||
]
|
||||
],
|
||||
"inks": {
|
||||
"1": [1, 3, 0.332, -0.367, -0.009],
|
||||
"2": [0, 1, 0.361, -0.193, 0.157],
|
||||
"3": [0, 3, 0.364, -0.039, -0.348],
|
||||
"4": [0, 3, 0.603, 0.329, 0.05],
|
||||
"5": [2, 6, 1.297, 0.059, -1.268],
|
||||
"8": [1, 3, 0.276, -0.245, 0.032],
|
||||
"10": [1, 2, 0.456, -0.353, -0.255],
|
||||
"12": [0, 5, -0.046, -0.055, -0.766],
|
||||
"15": [3, 5, 0.631, 0.242, 0.132],
|
||||
"16": [0, 5, 0.843, -0.045, -0.517]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"design": {
|
||||
"layout": "cuts",
|
||||
"faces": 9,
|
||||
"continuity": 1,
|
||||
"width": 0.5,
|
||||
"twist": 0,
|
||||
"tilt": 0,
|
||||
"palette": ["#ff8b76", "#ffdfbb", "#c1d0cb", "#868292", "#a56680", "#efb6ad"],
|
||||
"background": "#461646"
|
||||
},
|
||||
"cuts": {
|
||||
"angles": [-6.11, -6.11, -6.11, -6.11, -6.11, -6.11, -6.11, -6.11, -6.11],
|
||||
"edges": [
|
||||
[
|
||||
[-1.57, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[-1.4, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
|
||||
],
|
||||
[
|
||||
[-1.199, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[-1.212, 0.078, 0.041, 0.0, -0.018, 0.0, 0.0]
|
||||
],
|
||||
[
|
||||
[-0.782, -0.172, -0.057, 0.182, -0.227, 0.075, 0.059],
|
||||
[-0.591, -0.123, 0.072, 0.026, -0.172, -0.025, 0.396]
|
||||
],
|
||||
[
|
||||
[-0.355, -0.09, -0.145, 0.015, -0.142, -0.226, 0.057],
|
||||
[-0.339, -0.037, 0.078, 0.094, 0.12, 0.024, 0.115]
|
||||
],
|
||||
[
|
||||
[0.188, -0.044, -0.093, 0.054, -0.327, -0.278, 0.046],
|
||||
[0.358, 0.017, 0.036, 0.016, -0.322, -0.306, 0.017]
|
||||
],
|
||||
[
|
||||
[0.325, -0.027, -0.059, 0.035, -0.06, 0.0, 0.064],
|
||||
[0.382, -0.034, 0.026, 0.042, 0.076, 0.085, 0.0]
|
||||
],
|
||||
[
|
||||
[0.65, 0.063, -0.217, -0.057, 0.106, 0.265, 0.047],
|
||||
[0.731, -0.071, 0.138, 0.035, 0.13, 0.077, 0.033]
|
||||
],
|
||||
[
|
||||
[0.991, -0.032, -0.044, 0.019, 0.061, 0.085, -0.054],
|
||||
[1.132, -0.253, -0.035, -0.026, 0.056, 0.0, 0.0]
|
||||
],
|
||||
[
|
||||
[1.394, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
|
||||
[1.57, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
|
||||
]
|
||||
],
|
||||
"wave": [5.388947810309526, 0.13730915663240428, 0.002412027257808343, -2, 0.09851855558997387, -6.189125172790283e-05, 1.0565469535818428],
|
||||
"creases": [
|
||||
[
|
||||
60,
|
||||
100,
|
||||
[-0.529, -0.1012, 0.4091, 0.0879, 0.432, 0.0041, -0.0098, 0.4181, 0.4162]
|
||||
],
|
||||
[
|
||||
50,
|
||||
101,
|
||||
[-0.3767, -0.035, -0.2057, -0.2701, 0.1601, 0.1634, -0.4514, 0.4433, 0.5376]
|
||||
],
|
||||
[
|
||||
5,
|
||||
102,
|
||||
[-0.293, 0.0339, -0.3253, -0.0316, -0.0835, 0.0271, 0.8007, 0.3009, 0.2583]
|
||||
]
|
||||
],
|
||||
"inks": {
|
||||
"3": [1, 5, 1.155, -0.795, 0.333],
|
||||
"4": [0, 6, 0.55, -0.459, 0.145],
|
||||
"5": [0, 5, 0.581, -0.206, -0.042],
|
||||
"6": [1, 4, 0.629, -0.51, 0.108],
|
||||
"30": [0, 5, 0.633, 0.093, -0.031],
|
||||
"33": [5, 6, 0.214, -0.023, -0.007],
|
||||
"40": [0, 5, 0.423, -0.414, -0.264],
|
||||
"43": [1, 3, 0.445, -0.208, 0.042],
|
||||
"44": [0, 1, 0.208, -0.057, -0.051],
|
||||
"50": [0, 4, 0.993, 0.038, 0.153],
|
||||
"53": [4, 5, 0.251, -0.004, 0.004],
|
||||
"54": [2, 4, 0.761, 0.235, -0.005],
|
||||
"55": [2, 3, 0.857, -0.04, -0.438],
|
||||
"60": [0, 1, 0.344, 0.014, 0.23],
|
||||
"64": [1, 2, 0.484, -0.151, -0.194],
|
||||
"65": [1, 6, 0.629, 1.411, -0.095],
|
||||
"66": [1, 3, 0.321, -0.037, 0.042],
|
||||
"70": [0, 5, 0.258, -0.578, 0.276],
|
||||
"75": [5, 6, 0.24, -0.02, 0.027],
|
||||
"76": [0, 5, 0.636, 0.052, -0.005],
|
||||
"77": [4, 5, 0.683, 0.0, 0.0],
|
||||
"80": [0, 3, 0.425, -0.165, -0.022],
|
||||
"86": [0, 3, 0.609, 0.004, 0.002],
|
||||
"88": [0, 3, 0.391, 0.0, 0.0],
|
||||
"100": [1, 5, 0.176, 0.031, -0.047],
|
||||
"101": [0, 3, 0.69, 0.168, -0.179],
|
||||
"102": [3, 4, 0.958, -0.649, -0.028]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 332 KiB |
Reference in New Issue
Block a user