Claude paints with code: a Claude Code skill for procedural illustration in 83 styles, from ink wash (水墨), watercolour and ukiyo-e to stained glass, Roman mosaic, Art Deco, shadow puppets, pastel UI, sketchbook doodles, spot illustrations, grainy picture books, dreamy hills, sunlit greenery. No image model: numpy + Pillow on a CPU, draw-on GIFs.
Python agent-skillsanimechinese-paintingclaudeclaude-codeclaude-skillscolored-pencilcreative-codingcross-stitcheditorial-illustrationgenerative-artink-wash-paintingoil-paintingpaper-collagepixel-artprocedural-generationrisographshanshuiukiyo-ewatercolor
Add sketchbook doodle style (79 total): the reading hour
cloveric0c3915dd6a04
diff --git a/README.md b/README.mdindex 2b68b7b..fa6ab7f 100644--- a/README.md+++ b/README.md@@ -1,7 +1,7 @@# Claude Drawing · Claude 绘图-**Claude paints with code — no image model.** Seventy-eight styles, from ink wash and impasto oil to clay, cyanotype, stained glass, a Roman mosaic, Delft tiles, a cyberpunk street, a ray-traced ball pit, low-poly 3D, a thermal camera, an X-ray, a VHS tape, a synthwave sunset, a pastel product-film UI, an answer sheet marked in red, a lamp-lit shadow-puppet play, pen-and-wash sketch cards, retro gouache picture-book portraits, a soft-blue picture-book spread, a Jiangnan water garden in spring, a dry-brushed mid-century poster, a dusk picture-book page where the sky turns to stars, a hatched night print of lava meeting the sea, a dark note-taking app rendering its diagram, an infinite canvas of cards, a five-diagram sheet on warm Flexoki paper, a warm coloured-pencil storybook spread, a colour town of gouache houses strung with bunting, a soft-pastel vignette of a woman wearing her ginger cat as a scarf, a melancholic Halloween portrait of a porcelain-faced child carrying a glowing ghost home in a jar and an oil-pastel portrait of a woman warming her hands on a paper cup on a winter morning.-**不用生图模型,Claude 用代码一笔一笔作画。** 七十八种画风,从水墨、油画到黏土、蓝晒、彩色玻璃花窗、罗马马赛克、代尔夫特蓝瓷砖、赛博朋克、光线追踪的小球海、低多边形 3D、热成像、X 光片、VHS 录像带、Synthwave 落日、产品发布片式的粉彩界面、红笔批改的答题卡、油灯下的皮影戏、钢笔淡彩的速写小卡、复古水粉的绘本大头像、蓝调绘本的雨天跨页、江南园林的春水园景、干刷色块的 mid-century 海报、暮色微缩绘本里转入星空的黄昏、排线夜景里流进海里的熔岩、深色笔记应用里渲染出的流程图、卡片铺开的无限白板、Flexoki 暖纸上的五图图解、暖调彩铅叠出来的绘本跨页、挂满彩旗的水粉彩色小镇、把橘猫当围巾的色粉小像、捧着罐中小幽灵的诗意万圣夜和冬天早上捧着一杯热饮的油画棒肖像。+**Claude paints with code — no image model.** Seventy-nine styles, from ink wash and impasto oil to clay, cyanotype, stained glass, a Roman mosaic, Delft tiles, a cyberpunk street, a ray-traced ball pit, low-poly 3D, a thermal camera, an X-ray, a VHS tape, a synthwave sunset, a pastel product-film UI, an answer sheet marked in red, a lamp-lit shadow-puppet play, pen-and-wash sketch cards, retro gouache picture-book portraits, a soft-blue picture-book spread, a Jiangnan water garden in spring, a dry-brushed mid-century poster, a dusk picture-book page where the sky turns to stars, a hatched night print of lava meeting the sea, a dark note-taking app rendering its diagram, an infinite canvas of cards, a five-diagram sheet on warm Flexoki paper, a warm coloured-pencil storybook spread, a colour town of gouache houses strung with bunting, a soft-pastel vignette of a woman wearing her ginger cat as a scarf, a melancholic Halloween portrait of a porcelain-faced child carrying a glowing ghost home in a jar, an oil-pastel portrait of a woman warming her hands on a paper cup on a winter morning and a sketchbook doodle of a girl in a rainbow-striped jumper reading on a stool while her cat sleeps at her feet.+**不用生图模型,Claude 用代码一笔一笔作画。** 七十九种画风,从水墨、油画到黏土、蓝晒、彩色玻璃花窗、罗马马赛克、代尔夫特蓝瓷砖、赛博朋克、光线追踪的小球海、低多边形 3D、热成像、X 光片、VHS 录像带、Synthwave 落日、产品发布片式的粉彩界面、红笔批改的答题卡、油灯下的皮影戏、钢笔淡彩的速写小卡、复古水粉的绘本大头像、蓝调绘本的雨天跨页、江南园林的春水园景、干刷色块的 mid-century 海报、暮色微缩绘本里转入星空的黄昏、排线夜景里流进海里的熔岩、深色笔记应用里渲染出的流程图、卡片铺开的无限白板、Flexoki 暖纸上的五图图解、暖调彩铅叠出来的绘本跨页、挂满彩旗的水粉彩色小镇、把橘猫当围巾的色粉小像、捧着罐中小幽灵的诗意万圣夜、冬天早上捧着一杯热饮的油画棒肖像和穿彩虹条纹毛衣、坐在小凳上读书的手账线描。[English](#english) · [中文](#中文)@@ -60,6 +60,8 @@|  |  |  || **Oil-pastel portrait · 油画棒肖像** | **Ink wash · 水墨(月印万川)** | **Colour town · 彩色小镇** ||  |  |  |+| **Sketchbook doodle · 手账线描** | **Watercolour · 水彩(底纹)** | **Sketchbook doodle · 手账线描(放风筝)** |+|  |  |  |### Gallery · 画廊@@ -145,8 +147,10 @@| <img src="examples/colortown_festival_steps.jpg" width="100%"> | <img src="examples/pastelvignette_marmalade_scarf.jpg" width="100%"> || **罐子里的小幽灵** · *The Ghost in the Jar*<br><sub>Poetic Halloween · 诗意万圣夜</sub> | **捧着一杯热的** · *Something Warm to Hold*<br><sub>Oil-pastel portrait · 油画棒肖像</sub> || <img src="examples/poetichalloween_ghost_jar.jpg" width="100%"> | <img src="examples/oilpastel_warm_cup.jpg" width="100%"> |+| **读书的午后** · *The Reading Hour*<br><sub>Sketchbook doodle · 手账线描</sub> | **放风筝** · *Kite Day*<br><sub>Sketchbook doodle · 手账线描 — a 16:9 page for explainer videos · 讲解视频用的宽页</sub> |+| <img src="examples/sketchbook_reading_hour.jpg" width="100%"> | <img src="examples/sketchbook_kite_day.jpg" width="100%"> |-Every mark above is computed: paper fibres, ink washes and mist, dry-brush strokes, pigment granulation and blooms, torn-paper edges, pencil wax on paper tooth, cel-shaded clouds, risograph grain and halftones, lit impasto relief, woodblock grain and bokashi, dithered pixels, plasticine lit like a film set, sunlight through leaves on Prussian blue, twisted thread on Aida cloth, machined knobs behind a backlit dial, die-cut vinyl with a laminate gloss, streaky thermal print, graphite catching the tooth of graph paper, highlighter pooling at the start of a swipe, chalk dust settling under half-erased lessons, rain-lit neon glass mirrored in a wet street, a blue-pencil rough under boiling brush ink, an island ray-traced under one soft sun, a single unbroken gold line, candy balls with softbox glints, one outline morphing through six shapes, halftone photos cut out with scissors, frosted glass blurring the real pixels behind it, screen-printed primaries out of register, a slit sun sinking behind a neon grid played off tape, hollow fuse beads on a pegboard melting together under an iron, pits knocked through desert varnish, a red grid showing through flaking plaster, stones laid row by row along an outline, daylight through leaded glass, burnished gold that mirrors the room, left-handed hatching in iron-gall ink, black paper cut with scissors, wood type printed a hair out of register, red and black plates slipping apart, airbrush fades inside knife-cut friskets, Ben-Day dots on yellowed newsprint, one photo key pulled across hand-painted colour, characters struck through a fading ribbon, flat-shaded triangles dithered to 15 bits, spray drifting past cut card, satin stitches catching the light by their angle, ink lines printed white on Prussian blue, wax scribbles skipping the paper's pits, phosphor glowing behind curved glass, heat leaking out of a kitchen, cobalt fired into tin glaze tile by tile, ochre blown onto rock lit by a fire, 1-bit patterns in an old paint program, slip silhouettes incised to the clay, graphite that never quite reaches black, X-rays adding up through a suitcase, grey cels shot on scratched film, gouge marks in a rolled-up block, a birthday smeared onto tape, seven flat colours lifting off each other, an acorn squashing and stretching through a world drawn as it goes, ballpoint ink blobbing at every corner of a hand-drawn game, inks multiplying through tracing paper on a light box, window cards floating on a pastel field over shadows tinted by it, a vermilion stamp running dry at one end, red ink pooling where the pen slowed down, dyed donkey hide glowing on a lamp-lit screen, gouache scumbled dry over a toned board, knit stitch by stitch, dry pastel blue under a scratchy brush line, with chalk rain on top, a spring garden built leaf by leaf, its tiled roofs and willows mirrored in a jade lake, a roller and a dry brush running out across cream paper, a dusk sky going over to stars above thousands of tiny wildflowers, a night sea laid stroke by stroke under the one warm light of lava meeting the water, a hill town of gouache houses, inked line by line and slate by slate, strung with bunting and mirrored in a wet square, a woman and her cat in soft pastel, the faces rubbed smooth, the hair and fur laid strand by strand, the coat breaking up into dry strokes on white paper, a porcelain child flushed red round the eyes, her burlap hat woven thread by thread, carrying a ghost whose glow warms the wool and the leaves, and a winter coat laid in with dry oil-pastel strokes that skip the paper's tooth and run out in a comb of wax. No diffusion model, no API, no stock art. It is just Python with **numpy + Pillow** on a CPU: from 0.1 s (pixel art) to about 45 s (the soft 3D ray tracer) per 1920×1080 image.+Every mark above is computed: paper fibres, ink washes and mist, dry-brush strokes, pigment granulation and blooms, torn-paper edges, pencil wax on paper tooth, cel-shaded clouds, risograph grain and halftones, lit impasto relief, woodblock grain and bokashi, dithered pixels, plasticine lit like a film set, sunlight through leaves on Prussian blue, twisted thread on Aida cloth, machined knobs behind a backlit dial, die-cut vinyl with a laminate gloss, streaky thermal print, graphite catching the tooth of graph paper, highlighter pooling at the start of a swipe, chalk dust settling under half-erased lessons, rain-lit neon glass mirrored in a wet street, a blue-pencil rough under boiling brush ink, an island ray-traced under one soft sun, a single unbroken gold line, candy balls with softbox glints, one outline morphing through six shapes, halftone photos cut out with scissors, frosted glass blurring the real pixels behind it, screen-printed primaries out of register, a slit sun sinking behind a neon grid played off tape, hollow fuse beads on a pegboard melting together under an iron, pits knocked through desert varnish, a red grid showing through flaking plaster, stones laid row by row along an outline, daylight through leaded glass, burnished gold that mirrors the room, left-handed hatching in iron-gall ink, black paper cut with scissors, wood type printed a hair out of register, red and black plates slipping apart, airbrush fades inside knife-cut friskets, Ben-Day dots on yellowed newsprint, one photo key pulled across hand-painted colour, characters struck through a fading ribbon, flat-shaded triangles dithered to 15 bits, spray drifting past cut card, satin stitches catching the light by their angle, ink lines printed white on Prussian blue, wax scribbles skipping the paper's pits, phosphor glowing behind curved glass, heat leaking out of a kitchen, cobalt fired into tin glaze tile by tile, ochre blown onto rock lit by a fire, 1-bit patterns in an old paint program, slip silhouettes incised to the clay, graphite that never quite reaches black, X-rays adding up through a suitcase, grey cels shot on scratched film, gouge marks in a rolled-up block, a birthday smeared onto tape, seven flat colours lifting off each other, an acorn squashing and stretching through a world drawn as it goes, ballpoint ink blobbing at every corner of a hand-drawn game, inks multiplying through tracing paper on a light box, window cards floating on a pastel field over shadows tinted by it, a vermilion stamp running dry at one end, red ink pooling where the pen slowed down, dyed donkey hide glowing on a lamp-lit screen, gouache scumbled dry over a toned board, knit stitch by stitch, dry pastel blue under a scratchy brush line, with chalk rain on top, a spring garden built leaf by leaf, its tiled roofs and willows mirrored in a jade lake, a roller and a dry brush running out across cream paper, a dusk sky going over to stars above thousands of tiny wildflowers, a night sea laid stroke by stroke under the one warm light of lava meeting the water, a hill town of gouache houses, inked line by line and slate by slate, strung with bunting and mirrored in a wet square, a woman and her cat in soft pastel, the faces rubbed smooth, the hair and fur laid strand by strand, the coat breaking up into dry strokes on white paper, a porcelain child flushed red round the eyes, her burlap hat woven thread by thread, carrying a ghost whose glow warms the wool and the leaves, a winter coat laid in with dry oil-pastel strokes that skip the paper's tooth and run out in a comb of wax, and a girl's hair drawn strand by strand in hair-thin ink above a jumper striped in colour pencil that overruns its own outline. No diffusion model, no API, no stock art. It is just Python with **numpy + Pillow** on a CPU: from 0.1 s (pixel art) to about 45 s (the soft 3D ray tracer) per 1920×1080 image.---@@ -154,7 +158,7 @@ Every mark above is computed: paper fibres, ink washes and mist, dry-brush strok### What it is-A [Claude Code](https://claude.com/claude-code) skill and a small painting library with seventy-eight styles:+A [Claude Code](https://claude.com/claude-code) skill and a small painting library with seventy-nine styles:| Style | Module | What makes it read as the real medium ||---|---|---|@@ -236,6 +240,7 @@ A [Claude Code](https://claude.com/claude-code) skill and a small painting libra| **Pastel vignette (色粉小像)** | `lib/pastelvignette.py` · `PastelVignette` | a whimsical picture-book vignette in soft chalk pastel and a little gouache on pure white paper — a person and an animal companion, half-length, with no background panel and no frame: the painting simply stops and its edges break up into the white in dry strokes. The colour is soft and powdery (powder blue, cream, warm skin) with one warm accent family (ginger, tangerine); faces are rubbed smooth, with big round eyes, very large rosy cheeks and a red-tipped nose; hair and fur are hundreds of fine strands. The paper has an equalised tooth, and the same tooth is pre-dragged along 8 directions (stored as uint8), so pastel catches where the tooth rises above 1 − pressure and the pits it skips are drawn out along each stroke. Every *segment* of every stroke gets its own id in a 2× supersampled integer map, and numpy looks each covered sub-pixel up to its segment. From there it recovers the position along the stroke, for a pressure profile with rounded ends, and across it, for soft sides and bristle lanes that open up as the stroke runs dry. Pigment is laid where the pressure reaches the tooth and summed back with bincount, so tens of thousands of strokes cost about one Pillow line per segment. Pastel is nearly opaque, so pale dry strokes sit on a darker coat. `wash()` is pastel rubbed in with a finger: a smooth coat whose colour can come from a light field, with the deepest pits left a touch lighter and an edge that breaks into the tooth. `model()` washes a dark → light ramp over a soft dome light. A coat fades out through a smooth field, and its dry strokes run on past it, drying out pixel by pixel. `strands()` traces hair through a flow field and groups it into locks that share a root area, a wander, a curl and a shade; it paints dark first and lets a few fly loose. `fur()` lays tufts that are darker on the side away from the light, and `fluff()` grows short strands out of a silhouette, coloured from the paint just inside, so fur melts into what is behind it. Faces come from `eye()` (an off-white ball shaded blue-grey under the lid, a rayed iris with a pupil and two catchlights, a soft lid line flicking out at the outer corner), `blush()`, `nose()` (a side shadow and a red tip), `mouth()` and `brow()`. It also has a faint pencil line for background sketches, and leaves and sprigs || **Poetic Halloween (诗意万圣夜)** | `lib/poetichalloween.py` · `PoeticHalloween` | a melancholic, slightly surreal picture-book portrait for an autumn night, in opaque gouache and fine pencil hatching on a dark toned board, then printed. Faces are pale porcelain with a strong red flush on the nose, the cheeks and the lids and round the eyes, heavy half-closed sad eyes, a small unsmiling mouth and very simplified volumes. The hair is one sculpted mass — a blunt jet-black bob with a dead-straight fringe and a soft sheen. The cloth is tactile (burlap and felt hats, chunky knits, tartan), the ground is dark (night indigo, stars, dense leaves), and there is one luminous accent: little sheet-ghosts with glowing eyes and glowing fringe tips. Strokes use the same per-segment id map as the pastel vignette (wide for dry gouache, thin and long for hatching), and `colour='canvas'` lets each stroke take the colour under its centre, which repaints a computed base (a tartan, a modelled face, the sky) by hand without changing its colour. `model()` washes a dark → light ramp over a soft dome light, which gives the simplified volumes. `sheen()` lays a soft band where that light falls in a narrow range, then streaks it along the hair with a few long faint strokes, so the bob stays one mass. `eye()` is a heavy-lidded almond: the lid covers about half the iris and droops at the outer corner, with a dark lid line, a red wet rim on the lower lid and, optionally, the warm glint of a light below. `flush()` is a smooth red glaze plus a stipple of single specks that gets denser as the flush gets stronger, and `nose()` is its own small volume with a red tip. `burlap()` is a plain weave of slubby threads, each row and column with its own thickness, wandering a little and going over and under. It is lit as a height field, with dark holes, loose fibres and a frayed edge, and it can follow a curve. `knit()`, `rib()` and `tartan()` (a mirrored sett woven 2/2 twill over the light of the folds) cover the rest of the cloth. `leaf()` is a broad, double-serrated palmate leaf, foreshortened and folded along its midribs; it casts a soft shadow on the leaves behind, and that is where a hedge's depth comes from. Warm point lights fall off steeply, and `illuminate()` lights what is already painted as 1 − (1 − C)·exp(−L·receptivity·(base + albedo·C)), so wool and porcelain warm up a lot, leaves near a ghost turn olive-orange and black hair barely changes. `ghost()` is a translucent dome-and-bell of silver strands that falls from the crown like hair, with glowing eyes and a bead of light at the end of every lock. Bloom, a fine print grain and a coarser printed tooth that shows in the darks are added in `render()` || **Oil-pastel portrait (油画棒肖像)** | `lib/oilpastel.py` · `OilPastel` | a figure drawn with oil pastels (wax crayons) on white, toothy cold-press paper and left floating as a vignette — no background, at most a smear of sky or a dry-brushed cast shadow. The palette is tight and high-chroma: saffron and marigold, a teal navy and black, one cool blue, orange blush and red-orange lips. Big masses (a coat, a scarf, a hat) are laid in with parallel dry strokes of a constant-width stick; the wax catches on the peaks of an equalised paper tooth and skips the pits, so every mass is peppered with crisp white specks pulled into streaks along the stroke (the tooth is pre-dragged along 8 directions). The stick's worn face is split into lanes, each with its own pressure, value and end, so a stroke starts blunt and full and ends in a hard comb of uneven teeth; `spill` lets strokes run out past a shape by a different distance along every stretch of its edge. Black crayon (`crayon()`: a wobbling line in overlapping pieces of different weight) is kept for the eyes, brows, a nostril and a few contour and fold marks. Faces are the paper itself with peach on the shadow side, hatched orange `blush()` patches, flat `lips()` and heavy-lidded black `eye()`s; hair is a few long tapering `hair()` strokes; knit stripes are short bold `dashes()`. Strokes use the same per-segment id map as the pastel vignette. The tooth showing through the wax and a little waxy relief at the edges of the deposit are added in `render()` |+| **Sketchbook doodle (手账线描)** | `lib/sketchbook.py` · `Sketchbook` | a page from an illustrator's sketchbook: warm off-white paper with a faint blush, mostly left empty, one small character and two or three sparse props floating on it — no ground, no background. The drawing is hair-thin dark ink: every line is smoothed, pushed sideways by a slow hand wobble and a tiny tremor, tapers in where the nib lands and out in a long flick, drifts in width and ink flow, and now and then lifts for a few px; `contour()` draws a closed shape as one to three strokes that leave a gap or run past each other at the joins. Lines are cut into runs of constant width and darkness, drawn by Pillow into a 4× supersampled layer and multiplied in (ink is transparent). Hair is a `hair()` lock: many separate strands interpolated between guide curves, waving in phase with their neighbours and thinning to long tips, paper showing between them. Faces are tiny: `eye_closed()` arcs with a few lashes or `eye_dot()`s, a one-stroke nose, a small red `mouth()`, two round `blush()` dots. Clothes are filled with `stripes()`: loose bands of colour pencil and marker laid along stroke coordinates (long streaks, an elongated grain, pigment catching the tooth or lying flat), each band with its own colour, width, tilt and grain, two independently wandering edges and ends that overrun the ink line or stop short of it; bands follow an angle, bow into a smile or wrap round a sleeve's centre-line, and colours multiply (red over yellow turns orange). Props are thin coloured lines: `leaf()` with herringbone vein hatching (or veins left white in the fill), `flower()`, multi-line `tree()`s, a `steam()` curl, `ticks()` for fur and grass, a tiny `squiggle()` (never fake writing) |Ask Claude to *"draw it yourself"*, *"paint this with code"*, or *"claude绘图"*, and name a style if you like. Claude then:@@ -445,6 +450,14 @@ Every style has a complete example: `python3 examples/<name>.py out.png --stages- hair swept sideways with a hard edge across the forehead is a beret — hug the forehead with the far side of the hair, aim the strokes up and back past the bun, and clip the strands to a slightly grown hair mask;- white fingers on a white cup are a barcode — give each finger a pale peach body, a peach underside and a rounded tip, and lay them over a darker band (the cup's sleeve);- a run-out that stops on a ruled line looks cut — spill each stretch of the edge by its own distance.+- **Sketchbook doodle**: keep the page mostly empty and the character small; keep the ink hair-thin and a little unsure, and let the colour come only from the stripes, the cheeks and a few props. Watch for accidental reads:+ - two locks that start at the parting and fall straight down the sides leave a bald dome — bring the hairline down over the forehead like curtains and let the hair avoid only the visible face;+ - a short wave that turns several times across a lock looks crimped — use a long period, keep the hair straight over the head (`wave_root=0`) and nearly in phase across the lock;+ - colours multiply, so a light colour on a dark one (a yellow sun on a teal cover, a flower clip in black hair) only gets darker — reserve its place in the dark first (`avoid=`);+ - a mirrored pose is an icon — let one foot dangle higher, tilt the book, place the two arms separately;+ - a tube outline drawn closed puts a line across the shoulder — draw sleeves as open outlines (the two sides and the cuff);+ - two steam strands that both curl are springs — curl one, keep the others faint and straight;+ - at 0.25× the whole square page's ink fades out — crop round the drawing before making the draw-on GIF.### Roadmap@@ -456,7 +469,7 @@ Every style has a complete example: `python3 examples/<name>.py out.png --stages### 这是什么-一个 [Claude Code](https://claude.com/claude-code) skill,加上一个小巧的绘图库,内置七十八种画风:+一个 [Claude Code](https://claude.com/claude-code) skill,加上一个小巧的绘图库,内置七十九种画风:| 画风 | 模块 | 为什么看起来像真的 ||---|---|---|@@ -538,6 +551,7 @@ Every style has a complete example: `python3 examples/<name>.py out.png --stages| **色粉小像** | `lib/pastelvignette.py` · `PastelVignette` | 白纸上的绘本角色小像,软色粉加一点水粉:一个人和他的小动物,半身,不画背景色块、不加边框,画到边上就停,颜色干笔散进白纸。颜色柔和、粉粉的(粉蓝、奶油、暖肤色),只有一组暖橙饱和;脸揉得平滑,大圆眼、一大圈腮红、红鼻尖;头发和毛是成百上千根细丝。纸纹直方图均衡过,另外预先算好沿 8 个方向拖开的纸纹(存成 uint8):色粉挂在纸纹高于 1 − 压力的地方,漏掉的纸坑顺着笔拉成短道。每一笔的每一段在 2 倍超采样的整数 id 图里有自己的序号,numpy 对被盖住的子像素查回这一段,算出沿笔位置(两头收圆的压力曲线)和横向位置(两侧软边、越干越开的鬃毛条纹),压力够得着纸纹才上色,bincount 汇回像素,几万笔只要每段一次 Pillow 画线。色粉近乎不透明,浅色干笔能压在深色上。`wash()` 是手指揉开的色粉:平滑的一层,颜色可以按受光场取,最深的纸坑留一点浅,边缘按纸纹断开;`model()` 按软穹顶光把暗 → 亮的色阶揉上去。大衣用一张平滑的渐隐场收掉,干笔在它下面再走一段、逐像素变干。`strands()` 沿流向场画发丝,按绺分组(同一绺共用起点、偏移、弯曲和明暗),暗先亮后,几根飞出轮廓;`fur()` 是背光一侧暗的毛簇;`fluff()` 从轮廓里侧往外长短丝,颜色取它里面的颜料,毛茸茸的边融进后面的东西。五官:`eye()`(米白眼球、眼皮下灰蓝的影子、带放射纹的虹膜、瞳孔、两点白高光、外眼角挑出的软眼线)、`blush()`、`nose()`(鼻梁软影加红鼻尖)、`mouth()`、`brow()`。附带背景草稿用的淡铅笔线、叶子和枝条 || **诗意万圣夜** | `lib/poetichalloween.py` · `PoeticHalloween` | 秋夜 / 万圣节的忧郁、带一点超现实的绘本肖像,暗色画板上的不透明水粉加细彩铅排线,再印出来:瓷白的脸,鼻子、脸颊、眼皮和眼睛四周泛着很重的红晕,半闭的厚眼皮,不笑的小嘴,体积极简;头发是一整块雕塑般的实体——刀切齐刘海的乌黑波波头,一道柔和的光泽;衣物是摸得着的织物(粗麻 / 毛毡帽子、粗针织、格子呢);底子是靛蓝夜空、星星和浓密的叶丛;只有一处发光的点睛:眼睛和衣摆尖发着暖光的床单小幽灵。笔触和色粉小像同一套按段编号的 id 图(宽的是水粉干笔,细长的是排线),`colour='canvas'` 让每一笔取它中心下面的颜色,把算出来的底子(格子呢、塑形过的脸、夜空)用手再画一遍、颜色不变。`model()` 按软穹顶光揉色阶,就是那种极简的体积;`sheen()` 只在受光落在一条窄带里的地方铺一层柔和的光泽,再顺着头发拉几笔又长又淡的笔触,波波头仍是一整块。`eye()` 是重眼皮的杏仁眼:上眼皮盖住约一半虹膜、往外眼角垂,深色眼线,下眼睑一道湿红,还可以映出下面那盏光的一点暖色;`flush()` 是平滑的一层红加一层单像素的细斑点,越红越密;`nose()` 自成一个小体积,红鼻尖。`burlap()` 是粗麻平纹:每行每列线各自粗细、有疙瘩、略游走、一上一下交织,当高度场打光,线间是黑孔,有松出的纤维和毛边,能顺着弧线织;`knit()`、`rib()`、`tartan()`(镜像 sett、2/2 斜纹、乘衣褶的受光)管其余的织物。`leaf()` 是宽裂片、重锯齿的掌状叶,随机压扁、沿中脉对折,往后面的叶子投一块软影子,树丛的层次就从这里来。暖色点光源衰减很陡,`illuminate()` 按 1 −(1 − C)·exp(−L·接受度·(base + albedo·C)) 照亮画好的东西:毛线和瓷白的脸变暖很多,小幽灵旁边的叶子变成橄榄橙,黑头发几乎不变。`ghost()` 是银色细丝组成的半透明圆顶钟形,像头发一样从头顶披下,发光的眼睛,每一绺末端一颗光珠。光晕、细的印刷颗粒和暗部更显的粗印刷纸纹在 `render()` 里加 || **油画棒肖像** | `lib/oilpastel.py` · `OilPastel` | 白色糙面纸上的油画棒(蜡笔)人物小像,人浮在白纸上——不画背景,至多一抹天色或一块干刷的投影。颜色收得紧而浓:藏红花黄和金盏黄、偏青的藏青和黑、一种冷蓝,加橙色腮红和橙红嘴唇。大衣、围巾、帽子这类大块颜色用宽度不变的棒一道道平行地铺满;蜡挂在直方图均衡过的纸纹凸起上、跳过纸坑,所以每块颜色里都撒着脆的白点,顺着笔拉成短道(纸纹预先沿 8 个方向拖开)。棒用秃了的那一面分成几道,每道自己的压力、明暗和终点,所以起笔钝而饱满、收笔是一把长短不一的硬梳齿;`spill` 让笔触冲出形状,每段边冲出去的距离各不相同。黑色蜡笔(`crayon()`:抖动、分段搭接、粗细不一的线)只用在眼睛、眉毛、鼻孔和几处轮廓、衣褶上。脸就是纸,背光一侧几笔桃色,排线的橙色 `blush()`,平涂的 `lips()`,压低眼皮的黑色 `eye()`;头发是几笔收尖的长 `hair()`;针织条纹是短而粗的 `dashes()`。笔触和色粉小像同一套按段编号的 id 图。蜡下面透出来的纸纹和蜡边缘的一点厚度在 `render()` 里加 |+| **手账线描** | `lib/sketchbook.py` · `Sketchbook` | 速写本里的一页小画:暖米白、带一点粉的纸大片空着,一个小人物加两三件稀疏的道具浮在上面,不画地面和背景。画是发丝细的深色墨线:每根线先过样条,再沿法向推一个慢的手抖和一点快的颤,起笔细、收笔挑出一个长尖,粗细和墨色慢慢变,偶尔抬笔断开几 px;`contour()` 把闭合的形状画成一到三笔,接口留缺口或搭过头。线切成粗细和深浅都不变的几段,用 Pillow 画进 4 倍超采样的图层,再正片叠底(墨是透明的)。头发是 `hair()`:在几条导线之间插出很多根分开的细线,和相邻的线一起起伏,发梢收成长尖,线之间露着纸。脸很小:`eye_closed()` 的弧线加几根睫毛或 `eye_dot()`,一笔鼻子,小红 `mouth()`,两颗圆的 `blush()`。衣服用 `stripes()` 涂成彩铅和马克笔的松散条纹:沿笔的方向铺(长道子、顺笔的细颗粒,颜料挂在纸纹上或平平铺开),每条自己的颜色、宽度、倾斜和颗粒,上下两条边各自游移,两头冲出墨线或够不到;条纹可以按角度排、弯成微笑,也可以绕着袖子的中心线转;颜色正片叠底(红压黄成橙)。道具是细的彩色线:带人字形叶脉排线(或叶脉留白)的 `leaf()`、`flower()`、几根线叠成的 `tree()`、一缕 `steam()`、猫毛和草的 `ticks()`、一个小 `squiggle()`(不写假字) |对 Claude 说「claude绘图」「你自己画」「用代码画」,也可以指定画风。它会:1. **先定构图**:层次、焦点、留白,而且画面要图解内容本身;@@ -645,6 +659,8 @@ python3 examples/colortown_festival_steps.py out.jpg --stages stages/ # 彩色python3 examples/pastelvignette_marmalade_scarf.py out.jpg --stages stages/ # 色粉小像:橘猫围巾python3 examples/poetichalloween_ghost_jar.py out.jpg --stages stages/ # 诗意万圣夜:罐子里的小幽灵python3 examples/oilpastel_warm_cup.py out.jpg --stages stages/ # 油画棒肖像:捧着一杯热的+python3 examples/sketchbook_reading_hour.py out.jpg --stages stages/ # 手账线描:读书的午后+python3 examples/sketchbook_kite_day.py out.jpg --stages stages/ # 手账线描:放风筝(16:9)```### 作画要点(Claude 交图前逐条自查)@@ -803,6 +819,14 @@ python3 examples/oilpastel_warm_cup.py out.jpg --stages stages/ # 油画棒肖- 头发横着扫、前额一道硬边就是贝雷帽——远侧的头发贴着额头,笔触朝发髻上方往上再往后,发丝裁到稍微放大的头发遮罩里;- 白杯子上的白手指像条形码——每根手指铺一层浅桃色,下沿一道桃色,圆指尖,搭在颜色深一点的杯套上;- 下摆停在一条直线上像被剪过——每段边冲出去的距离各不相同。+- **手账线描**:纸大部分空着,人物小;墨线要发丝细、带一点犹豫,颜色只来自条纹、腮红和几件道具。小心看错:+ - 两绺头发从中缝直接往两边垂下去,头顶就是一块光秃秃的圆额头——发际线像窗帘一样斜着扫过额头,头发只绕开看得见的脸;+ - 周期短、横过一绺相位转好几圈的起伏像烫过的卷——周期放长,头顶上是直的(`wave_root=0`),横过一绺几乎同相;+ - 颜色是正片叠底,浅色压在深色上只会更暗(青绿书皮上的黄太阳、黑发里的小花发夹)——先在深色里把它的位置留出来(`avoid=`);+ - 左右镜像的姿势像图标——一只脚垂得高一点,书拿歪一点,两只胳膊分开给坐标;+ - 闭合描的管子轮廓会在肩上横一道线——袖子画成不闭合的轮廓(两条边加袖口);+ - 两缕热气都卷圈就成了弹簧——只卷一缕,其余的淡而直;+ - 整张正方形缩到 0.25 倍,墨线就淡没了——做动图前先裁出画周围的一块。### 计划diff --git a/SKILL.md b/SKILL.mdindex b597eb8..77b8ffa 100644--- a/SKILL.md+++ b/SKILL.md@@ -1,6 +1,6 @@---name: claude绘图-description: Claude 绘图 / Claude Drawing —— 不借助任何生图模型,由 Claude 用代码一笔一笔「画」出图片(程序化绘画)。内置七十八种画风:中国水墨、水彩、剪纸拼贴、韩国彩铅、日本动漫、编辑风手绘(Riso)、油画厚涂(梵高式流向笔触+颜料浮雕打光)、浮世绘木版画(晕色、木纹、墨线主版、青海波)、像素风(低分辨率+Bayer 抖动+像素字体)、黏土定格(高度图捏出的彩泥+影棚打光)、蓝晒(普鲁士蓝日光晒图,植物剪影透光)、十字绣(Aida 布十字绣+回针绣+缎面绣+法式结)、复古仪器面板(60 年代收音机/仪器正面:柚木、拉丝铝、旋钮、刻度窗、指示灯)、贴纸拼贴·小票(模切乙烯贴纸、热敏小票、和纸胶带、吊牌、橡皮章)、实验笔记本·贴纸(线圈方格本、铅笔图表、荧光笔、红笔圈、便利贴)、黑板板书(墨绿石板、粉笔颗粒、板擦残影、示意图与公式)、赛博朋克(雨夜霓虹街道、玻璃管霓虹招牌、全息广告、湿路面倒影)、卡通手绘(蓝铅笔稿、毛笔线、错位平涂、赛璐璐阴影、逐帧抖线)、等轴 2.5D(正等轴微缩模型、一个太阳照出三面明暗、悬浮数据卡)、单线画(一根不断开的线一笔画完、唯一点睛色)、柔光 3D(光线追踪的糖果色小球海和鼓鼓的软字、景深)、形变动画(一条轮廓依次变形、洋葱皮残影、缓动曲线)、报刊拼贴(牛皮纸、手撕旧报纸、网点老照片、勒索信拼贴字)、弥散玻璃(弥散渐变、磨砂玻璃卡片界面)、包豪斯几何(三原色几何、丝网印刷海报)、复古 Synthwave(切口落日、霓虹网格、镀铬字、录像带质感)、拼豆(钉板上的熔珠小管、熨烫熔合)、岩画(沙漠漆上凿出的凹坑图形、新旧凿痕、剥落)、古埃及墓室壁画(灰泥墙、红格起稿、分栏叙事、象形文字、剥落)、罗马马赛克(石子与玻璃沿轮廓一排排铺、灰缝、燕尾铭牌)、彩色玻璃花窗(哥特尖拱窗、通体着色玻璃、grisaille 彩绘与银染、铅条、透光)、泥金手抄本(羊皮纸、鹅毛笔哥特体、朱红标题、打磨金箔首字母)、达·芬奇手稿(铁胆墨水、左手排线、红粉笔、镜像手写、机械分解图)、剪影(黑纸剪出的侧影小像、薄金粉、椭圆金框)、凸版印刷海报(木活字、红黑双色错版、木刻插图)、苏联构成主义(红黑两版、斜条与楔形、西里尔大字、网点照片拼贴)、装饰艺术 Art Deco(1930 年代喷枪流线型海报、交替射线、阶梯高楼、金色 Deco 字)、黄金时代漫画(毛笔墨线、Ben-Day 网点、四色错版、新闻纸)、波普丝网(多格撞色平涂 + 错位的照相黑版)、ASCII 字符画(行式打印机、绿条连续纸、叠打)、低多边形(1999 年代 3D:平面着色、仿射贴图、逐顶点雾、15 位色抖动)、喷漆模板涂鸦(混凝土墙上多层卡纸模板喷绘、雾化与滴痕)、刺绣徽章(牛仔布上的机绣徽章:填充绣、缎面绣、锁边)、蓝图工程图(描图墨线晒成蓝底白线)、儿童蜡笔画(小孩在糙纸上的蜡笔涂抹)、绿屏终端 CRT(荧光字符画、扫描线、余辉)、热成像(先画温度场再上伪彩色)、代尔夫特蓝瓷砖(锡釉砖上的钴蓝手绘)、洞穴壁画(火光下的赭石、吹喷手印)、1-bit 早期画图软件(黑白整屏、8×8 图案填充)、古希腊黑绘陶瓶(黑釉剪影、刻线、饰带展开图)、铅笔素描(石墨排线、擦笔、边缘只剩线稿)、X 光片(安检透视、轮廓发亮、伪彩)、1930 年代黑白橡皮管动画(白手套、饼切眼、老胶片)、黑白麻胶版画(刻刀减法、手拓发花、套色错版)、VHS 家庭录像(钨丝灯偏色、色度渗色、REC)、扁平矢量(分层几何色块、七色、层间投影)、绘本角色动画(小角色挤压拉伸的真动画)、圆珠笔涂鸦(蓝红圆珠笔线稿、墨团、彩铅、页边涂鸦)、描图纸叠层(灯箱上的黑线底图 + 一张张单色描图纸叠片:正片叠底、套准十字、定位钉、绘图胶带)、粉彩界面 · Pastel UI(产品发布片式的界面画面:纯色粉彩底与大光斑、macOS 窗口卡片、胶囊与粗黑标题色条、状态标签与 ✓ / ✗ 徽章、放大镜、从卡片边探头的扁平小图标)、阅卷批改 · Exam Grading(绿毛毡桌上被红笔批改的答题卡:定位黑块、考号涂卡、得分格与阅卷栏、长尾夹夹住的标准答案卡、油墨不均的朱红印章、立体红笔、波浪线 / 圈 / 引线 / 批注 / 叉 / 圈起来的分数)、皮影戏 · Shadow Puppetry(油灯照亮的幕布上,雕空、透明染色的驴皮关节人偶:镂空纹样、阳刻空脸、雉翎盔头、线结与操纵杆、离幕时虚化的双影;雕花戏台、红漆金字牌匾、红灯笼)、钢笔淡彩 · Pen & Wash(速写小卡上的针管笔线稿 + 松散淡彩:线条抖、出头、不闭合,颜色错位出线、留白缝、干边与颗粒,不铺满的背景色块;大头、圆眼镜、点点眼、红鼻子的呆萌小人;卡片拍在木桌上,旁边放着针管笔和水笔)、复古水粉 · Retro Gouache(复古绘本风的水粉大头像:不透明水粉从暗到亮一层层盖上去,单色背景用干笔皴擦;大红鼻子、腮红、圆眼和大耳朵用几阶色值塑出来;看得见针脚的毛衣和毛线帽,一根根的头发和胡子,毛毡;最后是印刷书页的纸纹)、蓝调绘本 · Blue Picture Book(软蓝色调的现代绘本跨页:几乎只用粉蓝、矢车菊蓝、深青蓝三阶蓝加黑墨和纸白,只点一点珊瑚红、粉色腮红和芥末黄;毛笔 / 墨铅笔线干、抖、断,粗细不匀,线不闭合,暗部用快速来回的乱线排出来;颜色是干蜡笔、粉彩、干水粉,错位出线,纸纹的白点透出来;白粉笔痕压在蓝上,甩点和细尘;背景蓝块毛边、不到纸边;大圆脑袋、带高光的点点眼、点彩腮红和雀斑、火柴腿穿靴子的小人,乱线毛边的白色毛绒动物;最后印在书上:中缝和页码)、江南园林 · Jiangnan Garden(细笔园林春景,数字水粉插画:成千上万片叶形小笔触按一个太阳堆出树冠,暗芯、亮边、一簇簇的高光;白色和淡粉的繁花是一簇簇圆点花瓣,枝条从缝里露出来;垂柳是一绺一绺发丝般的细枝挂满小叶;黛瓦飞檐是真的瓦垄:筒瓦板瓦一行行、檐口瓦当滴水、翘起的翼角和卷起的脊头;粉墙月洞门、冰裂纹漏窗、翡翠绿槅扇和挂落、红灯笼、匾额;九曲石桥、石阶、小木船;碧绿湖面倒映岸上的一切,更柔、更暗,加涟漪和细竖纹;睡莲、白鹭;从前景花枝到雾里青山层层退远,墙上桥上落着叶影;最后一方小红印)、干刷色块 · Dry-Brush Blocks(mid-century 海报 / 水粉拼贴式的编辑插画:米白纸上几大块干笔或滚筒刷出的色块,颜色严格限定在森林绿、鼠尾草绿、青蓝、藏蓝、近黑和朱红,外加一点天蓝、淡青瓷和米色;每块颜色在自己的笔刷坐标系里刷:一道道平行的笔,起笔饱满、收笔干枯,两侧几乎是直边,两端梳成长短不一的毛齿,块里有顺笔的鬃毛纹、皴擦斑和露出来的纸色;背后的大色板用滚筒:近乎平涂、成簇的细点、干的两侧和几道细刮痕;色块像丝网套印或撕纸拼贴一样叠起来,撕口带一圈浅色纤维边;人物拆成几个大块面:亮暗两半朝不同方向刷的外套、几块肤色平面拼的头、粗黑框眼镜、干笔皴擦的白胡子;瓶子是竖刷的深色剪影加一道高光和小块标签;一旁一个小朱红方块;不勾线、不做渐变;最后像胶印:轻微柔化、纸纹、暗部零星白点、纸上细尘)、暮色微缩绘本 · Twilight Storybook(温柔、怀旧的黄昏绘本单页,满是微缩细节:大片粉彩黄昏天空,从顶上的薰衣草紫经玫瑰、蜜桃到地平线的暖金,柔和的平底云带、细细的光线和一轮低垂的淡日;一侧天空已经入夜:星空、带暗带的银河、弯月、流星,昼夜交界经过淡紫和靛蓝,不发灰;下面是一层层粉彩条纹的起伏山丘,拼布似的田、细细的垄、小圆树;前景是几万朵小野花铺成的坡,坡顶是色点,越往下越大:雏菊、矢车菊、虞美人、波斯菊、金盏花、毛茛、羽扇豆、勿忘我,夜的一侧整片变成月光蓝;很小、扁平、可爱的原创角色;上面叠一层科学图版的语言:圆形的「detail a」放大图,细墨线、排线、尺寸标注、标签和比例尺,几行灰色的小写英文手写字;最后是细颗粒、光晕、暗角和底边一道撕纸边)、排线夜景 · Hatched Nocturne(彩铅 / 色粉排线式的小幅夜景版画:天空、云、山和海全由密密的短笔触叠成,每片区域的笔触顺着同一股「风」走——天空斜着流、蒸汽绕着云团卷、山坡顺着坡向、海面横着长拖,每一笔色相和明度都差一点,笔毛分道、拖干的笔尾、纸纹里漏出的细缝,没有一处平滑渐变;深靛蓝、藏青、冷灰蓝的夜色里只有一个暖色光源,光是一层层加上去的发光笔触:核心黄白、外圈橙红、再外是被照亮的笔触,被照亮的蒸汽按「光 × 受光」上色,所以是红橙而不是粉;发光的细丝(会蜿蜒、分股、末端亮珠)、火星、星点;海面上被横向笔触打碎的倒影和光柱;几十像素高的小人靠一点亮色(围巾)点出来;最后装裱成小版画:米白纸边、压印的版痕、左下铅笔小标题、右下更小的说明,用细的普通字体)、笔记应用界面 · Obsidian UI(讲解片里的深色笔记应用窗口:近黑页面上一团淡紫光晕,窗口里有标签栏、细长图标栏、带缩进线的文件列表、粗黑 H1 下一道紫色短条、属性块和「#标签」、紫色的内部链接和行内代码、带语法色的 mermaid 代码块——点「阅读」后渲染成扁平深色的流程图,一个节点亮紫——紫色左边的引用标注,右栏关系图谱里被链接的笔记亮成紫色光点;全画只有一个紫色强调色,不画官方 logo)、白板卡片 · Canvas Board(深色笔记应用的白板视图:深色页面上一扇应用窗口——红黄绿三点和「.canvas」标签页的标签栏、左边一列线性图标——里面是一块随镜头平移缩放的灰点阵无限白板;分组框和浮在框上方的组名,深色圆角卡片带 2 px 的卡片色边(红、橙、黄、绿、青、紫)和一层很淡的同色底,卡片之间是从边的中点沿法线弯出去的曲线连线,末端实心箭头、中间一块白板底色的标签;卡片里是 Markdown:标题、正文、紫色高亮、等宽行内代码、勾选清单(勾上时紫色方框弹出、对勾画出、文字变灰加删除线)、紫色竖条的引用、紫色标签胶囊、颜色编号胶囊;图片卡片上方写文件名,里面可以用手绘笔触画草图(每笔画两遍、略弯、出头,手写体批注);右上角一列缩放按钮;全画只有一个紫色强调色加卡片色;所有东西都记在白板坐标里、每次按镜头重画,任意缩放都锐利,镜头能平移缩放、卡片能掉落、连线能一点点画出来)、Flexoki 纸面 · Flexoki Paper(文档站式的图解页:暖白纸(#FFFCF0) 上的墨黑字和一串暖灰,几张不描边、不投影的浅灰圆角卡片,粗黑中文标题、灰色英文类型名、等宽编号;卡片里的图照轻量图表渲染器的样子画——比底色差一级的框和 2 px 灰边(直角、圆角、胶囊、菱形、圆柱、圆)、墨线末端一个小的实心三角箭头、普通半粗体标签垫一块底色,虚线生命线和回复、带纸色缝的饼图、细网格上的柱状图、表头着色的对比表;Flexoki 的橙、红、蓝、绿、紫、青只放在有意义的地方,橙色聚焦框、黑底胶囊、字距收紧的大数字;能做成图一边一边画出来、数字滚动的动图)、暖调彩铅绘本 · Warm Pencil Storybook(暖白、有齿纹的纸上一层层叠涂的彩色铅笔绘本页:天空、山坡、草、水、一只大而温柔的生物和一个小小的孩子,全由顺着形体走向的细铅笔线叠成——天空横向长排线,山坡顺着坡势,龟壳绕着每块盾片的生长纹,脖子横过褶皱,雨衣顺着衣褶,苔藓和头发一簇簇顺毛;每块先铺一层浅色底,再上固有色、背光处叠同色系的深色,受光处罩一层暖色、阴影里罩一层冷色,每层角度错开一点、笔触交叉;蜡只挂在纸齿的峰上,同一批纸坑一层层都透出细白点,压得重、叠得多的地方才慢慢合上;后画的东西先留白再铺背景,颜色不互相混;毛是一绺一绺的:根部散开、尖端聚拢、顺着毛向,每绺受光一侧亮、背光一侧暗;没有墨线、没有黑色,只有很淡的同色轮廓;黄昏的暖光:灯笼和窗灯是一层层橙黄的发光叠涂(不是一团光晕,也不是放射线),低低的太阳给受光一侧一道暖边;水里的倒影也是一笔笔横排线;附带树、小房子、石头、鳞片、野花、纸灯笼和穿雨衣提灯笼的小孩等绘本部件)、彩色小镇 · Colour Town(不透明水粉平涂加细细的深棕墨线画的童话山城街景:高高窄窄的房子漆成番茄红、芥末黄、青绿、薄荷、珊瑚、奶白,一排压一排堆上山坡,近大远小、前后遮挡;深蓝灰的石板曼莎屋顶是一片片瓦错缝铺出来的,带老虎窗、烟囱和赤陶烟囱帽、电视天线;白色钟楼、淡蓝的天和奶白的云;三角彩旗串在好几层深度上斜穿街道,远处的小、近处的大,每面旗有一道深一点的折痕;红色爬藤玫瑰、溢出来的窗台花箱、铁艺阳台、石头台阶和扶手、路灯、吊挂的店招、拱门和彩色木门、写着字的店面和条纹遮阳篷;前景是湿亮的街面,把整条街倒映成一道道竖向的笔触;每块颜色都是带一点笔刷纹理的不透明平涂,边缘像手画的那样微微抖,和描线不完全对齐;墨线分成几段、粗细略有变化,方框的转角偶尔出头;墨是半透明的,压在红墙上是深红棕,压在玻璃上近乎黑;窗户排得整齐,但每扇都略有不同;一整面墙可以用透视单应贴成往消失点收的峡谷墙;几乎没有投影;附带钟楼、台阶、矮墙、栏杆、树、花盆、彩旗、路灯、店招、海报、咖啡桌、猫和概括的小人等部件)、色粉小像 · Pastel Vignette(白纸上的绘本角色小像,软色粉加一点水粉:一个人和他的小动物,半身、略偏一边,四周大片留白,不画背景色块、不加边框,画面在边上用干笔散开、融进白纸;颜色柔和、粉粉的——浅粉蓝的衣服上看得见顺着衣褶的干笔、奶油色的毛衣、暖肤色——只有一组暖橙饱和(橘猫、绒球、蝴蝶结这类);脸是揉开的平滑色粉:大圆眼、深色虹膜和两点白高光、一大圈腮红、红鼻尖、小嘴;头发和毛是成百上千根细丝,一绺一绺,有几根飞出轮廓,毛的轮廓蓬松地融进后面的东西;几乎不描线,只有眼皮、鼻翼、脸的背光侧几道细的软线;背后至多一枝叶子和一层很淡的铅笔小镇;附带圆眼、眉毛、腮红、鼻子、嘴、发丝、毛簇、蓬松轮廓、叶子和枝条等部件)、诗意万圣夜 · Poetic Halloween(忧郁、带一点超现实的秋夜 / 万圣节绘本肖像,暗色画板上的不透明水粉加细彩铅排线,再印出来:瓷白的脸,鼻子、脸颊、眼皮和眼睛四周泛着很重的红晕(平滑的一层红加单像素的细红斑点),下眼睑一道湿红,厚眼皮半闭、往外眼角垂,小嘴不笑,体积极简;头发是一整块雕塑般的实体——刀切一样平的齐刘海、乌黑(或银白)的波波头,几乎看不见发丝,只有一道柔和的光泽;衣物是摸得着的织物:粗麻 / 毛毡帽子(一上一下交织的粗线、线间的黑孔、毛边)、粗针织围巾和手套、斜纹织出来的格子呢外套;底子暗而沉——靛蓝夜空和星星、浓密的深色叶丛;每幅只有一处发光的点睛:眼睛和衣摆尖发着暖光的床单小幽灵,暖光照亮身边的叶子、毛线和脸的下侧;满画面一层细的印刷颗粒;附带重眼皮眼、红晕、长鼻子、小嘴、光泽带、粗麻、针织、罗纹、格子呢、毛边、掌状叶和叶丛、暖光照明和光晕、小幽灵、星星等部件)、油画棒肖像 · Oil-Pastel Portrait(白色糙面纸上的油画棒 / 蜡笔干刷人物小像,人浮在白纸上、不画背景(至多一抹天色或一块干刷的黑色投影):颜色收得紧而浓——藏红花黄 / 金盏黄、偏青的藏青和黑、一种冷蓝,加橙色腮红和橙红嘴唇;毛衣、帽子、大衣、围巾这类大块颜色用一道道平行的干笔铺满,蜡只挂在纸纹的凸起上、跳过纸坑,所以每块颜色里都撒着顺着笔拉长的纸纹白点,笔触的收尾是硬的、一把长短不一的梳齿;黑色蜡笔只点在要紧处:眼睛、眉毛、鼻孔、几笔轮廓和衣褶,不勾满轮廓线;脸就是纸本身,背光一侧几笔桃色,两块排线的橙色腮红,平涂的橙红嘴唇——简化、略歪、有表情;头发是几笔松而有劲的长笔触,针织的条纹是一段段短而粗的色条;附带干笔铺色、蜡笔线、排线腮红、短色条、干刷投影、热气、黑眼睛、粗眉、嘴唇、长发丝等部件)。用户说「claude绘图」「用代码画」「你自己画」「不用生图模型画」「程序化绘画」,或点名以上任一画风(含黏土、彩泥、定格动画、蓝晒、晒图、十字绣、刺绣、复古面板、老式收音机、贴纸、小票、收据、手帐拼贴、实验笔记本、方格本、荧光笔、便利贴、黑板、板书、粉笔、赛博朋克、霓虹、雨夜街道、卡通、手绘卡通、逐帧手绘、抖线、等轴、2.5D、微缩模型、单线画、一笔画、线条动画、柔光 3D、3D 渲染、C4D 风、软糖字、小球海、形变、变形动画、报刊拼贴、剪报、达达、勒索信字、网点印刷、弥散渐变、玻璃拟态、毛玻璃、包豪斯、几何构成、丝网印刷、Synthwave、蒸汽波、合成器浪潮、80 年代复古、拼豆、拼拼豆、熔珠、熨豆、豆豆画、钉板、烫豆、岩画、岩刻、凿刻、石刻、沙漠漆、史前壁刻、大角羊、古埃及、埃及壁画、墓室壁画、法老时代、象形文字、尼罗河、底比斯、罗马马赛克、马赛克镶嵌、镶嵌画、石子拼画、地砖画、古罗马地板、彩色玻璃、彩绘玻璃、花窗、玻璃花窗、教堂花窗、哥特花窗、铅条玻璃、泥金手抄本、手抄本、彩饰手抄本、中世纪手稿、羊皮纸、哥特体、花体首字母、泥金、贴金、星盘、达芬奇、达·芬奇、达芬奇手稿、手稿风、文艺复兴手稿、发明手稿、镜像字、镜像书写、扑翼机、红粉笔、钢笔排线、机械草图、分解图、剪影、剪影肖像、侧影、侧面像、黑纸剪影、剪影小像、椭圆金框、乔治时代肖像、摄政时期肖像、凸版印刷、活版印刷、木活字、铅字海报、马戏团海报、复古海报、老海报、19 世纪海报、双色套印、错版、套色错位、木刻插图、构成主义、苏联海报、苏联构成主义、俄国先锋派、罗德琴科风、红黑海报、照片蒙太奇、照片拼贴海报、西里尔字、装饰艺术、装饰风、流线型、流线型海报、1930 年代海报、旅行海报、铁路海报、火车海报、喷枪画、喷笔画、阶梯高楼、射线背景、盖茨比风、黄金时代漫画、老漫画、复古漫画、美漫封面、漫画封面、Ben-Day 网点、本戴点、网点上色、四色印刷、四色错版、新闻纸、对白框、拟声字、1940 年代漫画、波普、波普艺术、波普丝网、沃霍尔风、丝网版画头像、撞色头像、多格重复头像、六宫格撞色头像、ASCII、字符画、字符艺术、文字画、行式打印机、绿条纸、连续打印纸、针孔打印纸、老电脑打印、叠打、低多边形、低面数、低模、多边形风、千禧年 3D、90 年代 3D、复古 3D 游戏、老游戏截图、PS1 风、N64 风、平面着色、线框、游戏 HUD、飞行游戏、穿环、喷漆、模板涂鸦、镂空模板、喷漆模板、模板喷绘、街头涂鸦、街头艺术、墙绘、滴漆、班克西风格、刺绣徽章、徽章、布章、臂章、刺绣贴、绣标、锁边、牛仔外套徽章、户外徽章、营地徽章、弧形条章、蓝图、工程图、施工图、蜡笔画、儿童画、绿屏终端、CRT、显像管、热成像、热像仪、温度图、代尔夫特、荷兰蓝瓷砖、洞穴壁画、史前壁画、赭石、1-bit、黑白画图软件、MacPaint 风、黑绘、古希腊陶瓶、希腊瓶画、铅笔素描、素描、铅笔画、X 光、X 光片、安检图像、橡皮管动画、黑白卡通、老动画、麻胶版画、黑白版画、藏书票、VHS、家庭录像、录像带、扁平插画、扁平风、矢量插画、绘本动画、角色动画、挤压拉伸、圆珠笔、圆珠笔涂鸦、原子笔、页边涂鸦、课本涂鸦、手画棋盘、描图纸、硫酸纸、叠片、叠层、分色片、灯箱、拷贝台、透光台、套准、定位钉、粉彩界面、粉彩 UI、Dot 风、Dot 那种风格、产品发布会界面、发布会质感、窗口卡片、macOS 窗口、界面卡片、讲解片界面页、小图标探头、阅卷、阅卷批改、批改、判卷、改卷、改作业、答题卡、试卷、考卷、测验卷、红笔批改、红笔打分、打分数、盖章批改、朱红印章、标准答案卡、长尾夹、讲解片评测 / 打分页、皮影、皮影戏、影子戏、驴皮影、灯影戏、皮影人偶、雕花戏台、戏台牌匾、亮相、钢笔淡彩、淡彩、淡彩速写、钢笔淡彩小人、针管笔、勾线笔、针管笔加水彩、线稿上色、速写卡片、速写本小人、水彩小卡、城市速写、街头速写、水笔、自来水笔、复古水粉、水粉、水粉画、不透明水粉、哑光丙烯、复古绘本、绘本插画、绘本大头像、童书插画、复古童书、大头像、大鼻子人物、针织毛衣、麻花毛衣、毛线帽、毛毡帽、卷发、胡子、蓝调绘本、蓝色绘本、软蓝绘本、蓝调童书、软蓝童书插画、蓝色童书插画、蓝色系绘本、限色绘本、蓝白绘本、现代绘本跨页、手绘绘本跨页、绘本跨页、绘本内页、干笔墨线、墨铅笔线、粉彩蜡笔质感绘本、白色毛绒动物、毛绒白熊、点彩腮红、江南园林、园林春景、春水园林、中式园林插画、古典园林插画、国风园林插画、苏式园林、细笔园林、园林风景插画、水榭、临水茶榭、亭台楼阁、粉墙黛瓦、黛瓦白墙、飞檐翘角、翼角起翘、月洞门、漏窗、冰裂纹窗、槅扇、挂落、九曲桥、曲桥、垂柳园林、碧水倒影、园林倒影、睡莲池、数字水粉风景、细腻厚涂风景、干刷色块、干笔色块、干刷、干刷插画、干笔插画、滚筒刷、滚筒色块、色块插画、大色块插画、毛边色块、刷痕色块、粗刷笔触、mid-century、世纪中期插画、中世纪现代插画、复古编辑插画、复古海报插画、水粉拼贴、撕纸色块、限色海报、暮色微缩绘本、暮色绘本、黄昏绘本、微缩绘本、黄昏转夜、昼夜交界、日夜交界、半边黄昏半边星空、粉彩黄昏、粉紫晚霞、黄昏星空、银河插画、野花坡、野花草坡、花海插画、萤火虫、放风筝插画、拼布山丘、条纹田野、小圆树、细节放大图、局部放大图、技术细节小窗、科学图版风插画、手写英文小字、晚安绘本、治愈系绘本插画、排线夜景、排线风夜景、彩铅夜景、色粉夜景、粉彩排线、短笔触夜景、笔触夜空、方向笔触、夜景版画、小版画、限量版画风、版画装裱、版痕、纸边标题、铅笔题字、夜景插画、夜空插画、深蓝夜景、靛蓝夜空、冷暖对比夜景、唯一暖光、夜里的火光、发光的云、被照亮的云、红色精灵闪电、精灵闪电、火山夜景、熔岩入海、熔岩、岩浆、火山喷发插画、海上风暴、海面倒影、光柱倒影、火星飞溅、星点、看海的人、礁石上的人、远处的小人、小人比例尺、雪夜篝火、渔火、笔记应用界面、笔记软件界面、笔记 App 界面、Obsidian 风、Obsidian 界面、Obsidian 风格、黑曜石笔记、深色笔记界面、暗色主题界面、Markdown 笔记、Markdown 编辑器、双链笔记、内部链接、关系图谱、知识图谱界面、图谱视图、局部图谱、反向链接、文件列表、侧边栏、标签页、属性栏、行内代码、代码块、mermaid、mermaid 流程图、代码块渲染成图、源码 / 阅读切换、阅读视图、引用标注、callout、读书笔记界面、知识库界面、第二大脑、讲解片里的笔记应用、应用窗口演示、白板卡片、无限白板、白板视图、画布视图、Canvas 视图、Obsidian Canvas、Obsidian 白板、笔记应用白板、卡片白板、卡片和连线、节点和连线、带箭头的连线、弯曲连线、连线标签、分组框、点阵背景、点阵白板、深色白板、深色界面卡片、彩色边卡片、勾选清单卡片、待办卡片、引用卡片、图片卡片、草图卡片、手绘平面图、缩放按钮、镜头平移、镜头缩放、卡片掉落动画、连线画出来、搬家计划、旅行计划白板、活动计划白板、头脑风暴白板、项目拆解白板、计划白板、Flexoki、Flexoki 纸面、Flexoki 配色、Flexoki 风、暖白纸、米白纸面、墨黑字、文档站风格、文档页图解、技术文档配图、图解页、一页图解、讲解片图表页、几张图讲清楚、流程图、画流程图、时序图、序列图、饼图、柱状图、条形图、对比表、参数对比、图表合集、图表墙、Mermaid 风、Mermaid 图、图表渲染器、灰底圆角框、小三角箭头、橙色聚焦框、数字滚动、计时器大数字、配方图解、步骤图解、手冲咖啡图解、菜谱图解、工作流程图解、暖调彩铅绘本、暖调彩铅、彩铅绘本、彩铅童书、彩铅童书插画、彩色铅笔绘本、彩色铅笔童书、软彩铅、彩铅叠涂、层层叠涂的彩铅、顺着形体排线、纸齿白点、纸纹透白、怀旧童书、翻绘本的感觉、温暖怀旧的绘本、暖色绘本页、巨物与小孩、大动物和小孩、巨大温柔的生物、温柔的巨兽、大乌龟、巨龟、老乌龟、背着花园的乌龟、龟背上的小花园、大龟过河、过河、小溪、踏脚石、提灯笼的小孩、黄色雨衣、纸灯笼、亮灯的窗、亮灯的小房子、黄昏小镇、成簇的毛、顺毛、毛一绺一绺、苔藓、金黄的树、彩色小镇、彩色房子、彩色街景、童话小镇、童话街景、治愈小镇、理想的生活环境、欧洲小镇、山城小镇、钟楼小镇、彩虹小镇、彩旗、三角彩旗、彩旗串、彩旗街、节日街道、节日早晨、钟楼、白色钟楼、洋葱顶、石板屋顶、曼莎屋顶、老虎窗、烟囱帽、电视天线、风向标、爬藤玫瑰、窗台花箱、铁艺阳台、台阶街、石头台阶、拱门下的台阶、湿街倒影、雨后街道、雨后的广场、水粉街景、水粉加描线、水粉平涂加细线、细节多到看不完、小红书彩色小镇、色粉小像、色粉画、软色粉、色粉笔触、色粉质感、色粉加水粉、粉彩笔触、粉彩质感、绘本角色、绘本人物、绘本小像、角色小像、人物小像、半身像、人和宠物、人和猫、人和狗、主人和宠物、抱着猫、抱着狗、橘猫、大橘、毛茸茸的猫、毛茸茸的狗、狐狸、猫围巾、把猫当围巾、白底插画、留白插画、不画背景、边缘散开、干笔散开、画到边上就散了、大眼睛、大圆眼、大腮红、红鼻头、红鼻尖、发丝、一根根头发、头发丝、飞丝、毛绒绒、蓬松的毛、温柔的小像、治愈系角色、Midjourney 色粉风、诗意万圣夜、诗意万圣节、万圣节、万圣夜、万圣节插画、万圣节绘本、万圣节头像、秋夜、秋夜插画、忧郁绘本、忧郁风、超现实绘本、诡异又温柔、瓷白的脸、瓷娃娃脸、瓷偶、脸上的红晕、红眼眶、红眼圈、红鼻头、厚眼皮、半闭的眼睛、悲伤的眼睛、不笑的小嘴、波波头、黑色波波头、银白波波头、齐刘海、刀切刘海、粗麻、麻布、麻袋布、粗麻帽子、毛毡帽、粗针织围巾、毛线手套、格子呢、格纹外套、苏格兰格子、小幽灵、床单幽灵、发光的小幽灵、发光的眼睛、罐子里的幽灵、深色叶丛、星空肖像、Midjourney 万圣风、油画棒、油画棒肖像、油画棒人像、油画棒小像、油画棒插画、油画棒头像、蜡笔肖像、蜡笔干刷、干刷肖像、干刷人像、干笔人物、粗犷笔触、纸纹白点、露白的纸纹、手作感肖像、不完美的肖像、白底人物小像、白纸上的人物、藏红花黄、橙黄配藏青、芥末黄配藏青、条纹围巾、粗针织围巾、露指手套、捧着热饮、冒热气的纸杯、冬天的早市、冬日早晨、冻红的脸颊、橙色腮红、橙红嘴唇、黑色蜡笔线、Midjourney 油画棒风),或 "draw it yourself", "paint with code", "procedural painting", "watercolor / collage / colored pencil / anime / editorial / impasto oil / ukiyo-e / pixel art / clay / claymation / cyanotype / sun print / cross-stitch / embroidery / retro instrument panel / vintage radio / sticker collage / receipt / lab notebook / graph paper / chalkboard / blackboard / cyberpunk / neon city / cartoon / hand-drawn animation / isometric / 2.5D / continuous line / one-line drawing / soft 3D / 3D render / puffy letters / ball pit / shape morph / morphing / newspaper collage / Dada / ransom note / halftone / glassmorphism / aurora gradient / Bauhaus / geometric poster / screen print / synthwave / retrowave / outrun / perler beads / hama beads / artkal / fuse beads / melty beads / pegboard beads / petroglyph / rock art / rock carving / desert varnish / Egyptian tomb painting / ancient Egypt / hieroglyphs / Theban tomb / Roman mosaic / floor mosaic / tesserae / opus vermiculatum / Pompeii mosaic / stained glass / leaded glass / church window / Gothic window / grisaille / illuminated manuscript / medieval manuscript / book of hours / gold leaf / illuminated initial / blackletter / vellum / astrolabe / da Vinci notebook / Leonardo codex / Renaissance sketchbook / mirror writing / iron-gall ink / red chalk / sanguine / ornithopter / exploded view / inventor's sketch / silhouette / silhouette portrait / cut-paper profile / shade portrait / Georgian portrait / Regency portrait / oval gilt frame / letterpress / wood type / playbill / circus poster / Victorian poster / two-colour misregistration / woodcut poster / constructivism / constructivist poster / Soviet avant-garde / Russian avant-garde / Rodchenko style / photomontage poster / art deco / streamline moderne / 1930s travel poster / railway poster / airbrush poster / sunburst rays / Gatsby style / golden age comic / vintage comic book / comic cover / Ben-Day dots / four-color printing / newsprint / speech balloon / pulp cover / pop art / Warhol-style / pop silkscreen / silkscreen portrait / repeated pop portrait grid / ASCII art / text art / typewriter art / line printer / greenbar / fanfold paper / tractor feed / overstrike / printer plot / low poly / low-poly / retro 3D / 90s 3D game / PS1 style / N64 style / software rasterizer / flat shading / affine texture mapping / vertex fog / game HUD / stencil / stencil graffiti / spray paint stencil / street art / drips and overspray / Banksy-style stencil / embroidered patch / embroidery patch / iron-on patch / sew-on patch / merit badge / camp badge / merrow border / rocker patch / denim jacket patches / blueprint / technical drawing / crayon / kid's drawing / CRT terminal / green screen / thermal camera / thermal imaging / Delft tiles / Delft blue / cave painting / ochre / Lascaux-style / 1-bit / MacPaint-style / black-figure / Greek vase / pencil drawing / graphite / X-ray / baggage scanner / rubber hose / 1930s cartoon / linocut / lino print / VHS / home video / flat vector / flat illustration / storybook animation / squash and stretch / ballpoint / biro / ballpoint doodle / margin doodles / hand-drawn board game / overlay sheets / tracing-paper overlays / light box / colour separations / registration marks / acetate overlay / pastel UI / Dot-style product film / launch-film interface / macOS window cards / exam grading / grading an answer sheet / red-pen marking / graded test paper / rubber-stamped answer sheet / shadow puppet / shadow puppetry / Chinese shadow play / leather shadow puppets / backlit puppet screen / pen and wash / pen & wash / line and wash / ink and watercolour / ink and watercolor / fineliner sketch / fineliner and watercolour / sketchbook characters / sketch cards / urban sketching / water brush / gouache / retro gouache / gouache portrait / gouache illustration / opaque gouache / matte acrylic / picture-book portrait / vintage picture book / retro children's book illustration / mid-century children's book / big-nosed character portrait / cable-knit sweater / knitted bobble hat / blue picture book / soft blue picture book / soft-blue children's book illustration / modern picture book / limited-palette picture book / picture-book spread / scratchy ink line / dry-brush ink line / ink pencil line / crayon and pastel texture / chalky white marks / blue and coral palette / fluffy white bear / Jiangnan garden / Chinese garden / classical Chinese garden illustration / Chinese water garden / spring garden illustration / lush painterly garden / waterside pavilion / moon gate / lattice windows / zigzag bridge / weeping willow garden / upturned eaves / grey-tiled roof / blossom trees and reflections / lily pond with egrets / digital gouache landscape / dry-brush blocks / dry brush illustration / dry-brushed colour blocks / roller texture / brush-textured shapes / mid-century illustration / mid-century modern poster / mid-century editorial illustration / gouache collage / torn-paper collage poster / limited palette poster / scumbled texture / vintage book cover illustration / twilight storybook / dusk picture book / dusk to night sky / day and night split sky / pastel sunset sky / Milky Way illustration / wildflower meadow / wildflower hill / patchwork hills / tiny round trees / fireflies / paper kite / magnified detail inset / detail callout circle / scientific plate overlay / handwritten lowercase captions / cozy miniature illustration / bedtime story illustration / hatched nocturne / hatched night scene / pastel hatching night / coloured-pencil nocturne / directional strokes / short brush strokes sky / night print with margins / small art print / plate mark / pencilled title and caption / indigo night with one warm light / glowing cloud lit from below / red sprites / lava entering the sea / volcano at night / glowing threads and sparks / broken reflection on the sea / tiny figures for scale / Obsidian UI / Obsidian-style note app / dark note-taking app / dark-theme Markdown editor / note app window / file explorer sidebar / wiki links / backlinks / graph view / local graph / knowledge graph UI / properties and tags / inline code / mermaid code block / mermaid flowchart rendered / source vs reading view / callout block / reading notes app / second brain UI / knowledge base screen / canvas board / infinite whiteboard / dotted board / note-app canvas view / Obsidian-style canvas / cards and connectors / curved arrows between cards / edge labels / group frames / coloured card borders / task-list card / quote card / image card with a sketch / hand-drawn floor plan / zoom controls / camera pan and zoom / cards dropping in / moving plan board / Flexoki / Flexoki paper / Flexoki palette / warm paper and ink / docs-site diagrams / explainer sheet / diagram sheet / Mermaid-style diagrams / lightweight diagram renderer / flowchart / sequence diagram / pie chart / bar chart / comparison table / diagram wall / grey-bordered boxes / small triangular arrowheads / orange focus ring / rolling numbers / recipe explainer / warm pencil storybook / coloured-pencil storybook / colored pencil picture book / soft pencil textures / layered coloured pencil / pencil strokes following the form / paper tooth specks / nostalgic children's storybook / giant gentle creature and a small child / giant tortoise / tortoise with a garden on its back / stepping stones / child with a lantern / yellow raincoat / paper lantern / lit windows at dusk / tufted fur in locks / Midjourney sref 3220081856 look without an image model / colour town / colorful European town / storybook street / fairy-tale town / candy-coloured houses / hill town / bunting / pennant flags / festival street / clock tower / onion dome / slate mansard roofs / dormers / chimney pots / TV aerials / climbing roses / window boxes / wrought-iron balconies / stepped lane / wet street reflection / gouache and ink cityscape / pastel vignette / soft pastel character / chalk pastel portrait / pastel textures and painterly brushstrokes / whimsical character design / picture-book character on white / person with a pet / girl and her cat / ginger cat / cat scarf / big round eyes / rosy cheeks / red-tipped nose / wispy hair strands / fluffy fur / feathered edges / vignette on white paper / Midjourney sref 455581803 look without an image model / poetic halloween / halloween portrait / autumn night portrait / melancholic picture book / surreal storybook portrait / porcelain face / red flush round the eyes / red-rimmed eyes / red nose / heavy-lidded sad eyes / blunt black bob / straight fringe / silver bob / burlap hat / felt hat / chunky knit scarf / knitted mittens / tartan coat / plaid coat / sheet ghost / little glowing ghosts / ghost in a jar / glowing eyes / dark foliage / starry night sky / Midjourney sref 3822619412 look without an image model / oil pastel / oil-pastel portrait / oil pastel illustration / wax crayon portrait / dry brush portrait / bold dry brush strokes / textured colors / beautifully imperfect portraits / handmade aesthetic / paper tooth showing through / white specks of paper / saffron and navy / mustard and navy / striped scarf / chunky knit scarf / fingerless gloves / steaming paper cup / winter morning portrait / orange blush / red-orange lips / black crayon accents / figure vignette on white / Midjourney sref 2703086978 look without an image model" 时使用;也用于需要逐步画出(draw-on)动画的插画。单独说「剪纸」指剪纸拼贴、「刺绣」指十字绣、「丝网印刷 / screen print」指包豪斯几何;「打马赛克」是打码,不是马赛克画风;单说「蓝图」指蓝图工程图,「蓝晒 / 晒图」仍指蓝晒;「铅笔 / 素描」指铅笔素描,「彩铅」指韩国彩铅;「像素」仍指像素风,「1-bit / 黑白画图软件」指 1-bit 早期画图软件;「霓虹」仍指赛博朋克;「喷漆 / 街头涂鸦」仍指喷漆模板涂鸦,「圆珠笔 / 随手涂鸦 / 页边涂鸦」指圆珠笔涂鸦;「描图纸 / 硫酸纸 / 叠片 / 灯箱」指描图纸叠层(蓝图工程图那张描图布是晒成蓝图的,不是叠片);「Dot 风 / 粉彩界面 / 窗口卡片 / 发布会界面」指粉彩界面(纯色底 + 白色实心窗口卡片),要磨砂玻璃和弥散渐变仍用弥散玻璃;「阅卷 / 批改 / 答题卡 / 判卷 / 红笔打分」指阅卷批改,实验记录里的红笔圈和便利贴仍用实验笔记本,带「已付」橡皮章的小票拼贴仍用贴纸拼贴 · 小票;「皮影 / 皮影戏 / 影子戏」指皮影戏(透光的彩色驴皮人偶),黑纸剪出的侧影小像仍用剪影,彩纸剪贴仍用剪纸拼贴。「钢笔淡彩 / 淡彩速写 / 针管笔加水彩 / 线稿上色的速写小卡」指钢笔淡彩;单说「水彩」仍指水彩(风景、花卉的大片晕染),蓝铅笔稿 + 毛笔线 + 赛璐璐阴影的拟人小物仍用卡通手绘,「素描 / 铅笔」仍指铅笔素描。「水粉 / 复古水粉 / 绘本大头像 / 复古童书插画」指复古水粉(不透明水粉画的特写大头像);梵高式厚涂的风景、名画感仍用油画厚涂,扁平矢量、会挤压拉伸的小角色动画(「绘本动画」)仍用绘本角色动画,针管笔线稿加淡彩的速写小卡仍用钢笔淡彩,撞色多格的头像仍用波普丝网。「蓝调绘本 / 软蓝绘本 / 蓝色童书插画 / 绘本跨页」指蓝调绘本(软蓝限色的现代绘本跨页:干笔墨线 + 干蜡笔粉彩上色 + 白粉笔痕);单说「绘本」仍指绘本角色动画,「水粉 / 绘本大头像」仍指复古水粉,「编辑风 / Riso」仍指编辑风手绘,针管笔线稿加淡彩的速写小卡仍用钢笔淡彩,小孩自己画的蜡笔画仍用儿童蜡笔画。「江南园林 / 园林春景 / 中式园林插画 / 粉墙黛瓦 / 飞檐 / 月洞门 / 九曲桥」指江南园林(细笔数字水粉的园林春景:叶形小笔触堆出的繁茂树冠、繁花、垂柳、黛瓦飞檐、碧水倒影、层层远山);单说「水墨 / 山水」仍指水墨,单说「水彩」仍指水彩,动漫背景 / 赛璐璐天空仍指日本动漫,浮世绘仍是浮世绘;梵高式厚涂的风景仍用油画厚涂,皮影人偶的一场戏仍用皮影戏。「干刷色块 / 干笔色块 / 滚筒色块 / mid-century 海报插画」指干刷色块(米白纸上几大块干笔或滚筒刷出的限色色块,人物拆成几个大块面,背后一块纯色板、一旁一个小红方块);单说「水粉 / 绘本大头像」仍指复古水粉,「剪纸 / 彩纸拼贴」仍指剪纸拼贴,「丝网印刷 / screen print」仍指包豪斯几何,「Riso / 编辑风」仍指编辑风手绘,没有笔触的平滑几何色块仍用扁平矢量。「暮色微缩绘本 / 暮色绘本 / 黄昏转夜 / 昼夜交界 / 野花坡 / 细节放大图」指暮色微缩绘本(粉彩黄昏转入银河夜空、拼布山丘、几万朵小野花、很小的原创角色,加圆形放大图和手写小字);单说「绘本」仍指绘本角色动画,「蓝调绘本 / 软蓝绘本」仍指蓝调绘本,赛璐璐天空和夏日少年感仍用日本动漫,大片晕染的风景仍用水彩,整页的机械分解手稿仍用达·芬奇手稿,剖面和施工图仍用蓝图工程图。「排线夜景 / 彩铅或色粉夜景 / 短笔触夜空 / 夜景小版画 / 熔岩入海 / 精灵闪电 / 被照亮的云」指排线夜景(满画面顺着风向的短笔触、深蓝夜色里只有一个暖光、发光的丝和火星、碎的倒影、很小的人,装成带纸边和铅笔字的小版画);梵高式的厚涂漩涡和颜料浮雕仍用油画厚涂,明亮可爱的彩铅甜品仍用韩国彩铅,黑白石墨排线仍用铅笔素描,粉彩黄昏转入银河星空、满坡小野花仍用暮色微缩绘本,霓虹雨夜街道仍用赛博朋克。「Obsidian 风 / 笔记应用界面 / 深色笔记软件 / 双链笔记 / 关系图谱 / mermaid 代码块渲染成图」指笔记应用界面(深色主题的笔记应用窗口:文件列表、Markdown 正文、代码块切到阅读视图渲染成流程图、亮紫光点的关系图谱,只有一个紫色强调色);明亮的粉彩底和白色窗口卡片仍用粉彩界面,点阵无限白板上的卡片和弯曲连线用白板卡片,暖白纸面上的浅灰卡片图表用 Flexoki 纸面,磨砂玻璃和弥散渐变仍用弥散玻璃,绿屏荧光字符的老终端仍用绿屏终端 CRT,霓虹全息的未来界面仍用赛博朋克。「白板卡片 / 无限白板 / Canvas 视图 / 卡片和连线 / 点阵白板 / 分组框 / 带箭头的弯曲连线」指白板卡片(深色应用窗口里随镜头平移缩放的点阵白板:分组框、彩色边卡片、带箭头和标签的弯曲连线、清单 / 引用 / 草图卡片、右上角缩放按钮);笔记正文页、文件列表和关系图谱仍用笔记应用界面,暖白纸上的流程图、时序图和图表仍用 Flexoki 纸面,明亮的粉彩产品界面和检查结果仍用粉彩界面,一层层叠起来的图解仍用描图纸叠层。「Flexoki / Flexoki 纸面 / 暖白纸上的图解页 / Mermaid 那样的流程图、时序图、饼图、柱状图、对比表 / 讲解片里的图表页」指 Flexoki 纸面(暖白纸、墨黑字、不描边的浅灰圆角卡片,卡片里的图照轻量图表渲染器画:灰边框、墨线小三角箭头、普通标签,强调色只点在有意义的地方);手写粉笔的示意图仍用黑板板书,铅笔图表、荧光笔和便利贴仍用实验笔记本,彩色粉彩底、macOS 窗口和 ✓ / ✗ 徽章的产品界面仍用粉彩界面,深色笔记应用窗口仍用笔记应用界面,点阵无限白板上的卡片和连线仍用白板卡片,系统的微缩模型仍用等轴 2.5D,剖面和施工图仍用蓝图工程图。「暖调彩铅绘本 / 彩铅绘本 / 彩铅童书插画 / 巨物与小孩 / 大龟过河 / 纸齿白点 / 层层叠涂」指暖调彩铅绘本(暖白纸上满画面顺形体的彩铅叠涂、纸齿透出细白点、毛发成簇顺毛,大而温柔的生物和小小的孩子,黄昏暖光和橙黄的灯,没有墨线和黑色);单说「彩铅」仍指韩国彩铅(明亮可爱的甜品小物、粉嫩高光),黑白石墨仍用铅笔素描,软蓝限色、刮擦墨线加蜡笔颗粒的绘本跨页仍用蓝调绘本,粉彩黄昏转入星空、满坡小野花仍用暮色微缩绘本,不透明水粉的特写大头像仍用复古水粉,深蓝夜色里只有一个暖光的排线小版画仍用排线夜景;单说「绘本」仍指绘本角色动画。「彩色小镇 / 彩色房子 / 童话小镇 / 童话街景 / 彩旗街 / 钟楼小镇 / 水粉加描线的街景 / 有被这彩色小镇治愈到」指彩色小镇(水粉平涂加细墨线,密密的彩色房子堆上山坡,石板曼莎屋顶、白色钟楼、好几层三角彩旗、爬藤玫瑰和窗台花、湿街倒影);中式园林和古镇仍用江南园林,锡釉蓝砖上的运河小镇仍用代尔夫特蓝瓷砖,黑白刻版的雪村仍用黑白麻胶版画,彩纸剪出来的热气球小镇仍用剪纸拼贴,系统的微缩模型和小岛仍用等轴 2.5D,针管笔速写加淡彩的小卡仍用钢笔淡彩,水粉画的人物大头像仍用复古水粉,彩铅叠出来的黄昏小镇和巨物仍用暖调彩铅绘本,没有描线、没有笔触的几何色块仍用扁平矢量。「色粉小像 / 色粉画 / 绘本角色小像 / 人和宠物 / 猫围巾 / 白底不画背景、边上干笔散开的角色 / 大眼睛大腮红红鼻尖」指色粉小像(白纸上的半身角色小像,软色粉加一点水粉,大圆眼、大腮红、红鼻尖、一根根的发丝和蓬松的毛,柔和的粉蓝和奶油色里只有一组暖橙,边缘散进白纸);背后刷一块单色、看得见毛衣针脚的复古童书大头像仍用复古水粉,满画面彩铅叠涂、带天空和场景的黄昏绘本页仍用暖调彩铅绘本,软蓝限色、乱线墨线的绘本跨页仍用蓝调绘本,针管笔线稿加淡彩的速写小卡仍用钢笔淡彩,明亮可爱的彩铅甜品小物仍用韩国彩铅;「色粉夜景」仍指排线夜景,「粉彩界面」仍指产品界面。「诗意万圣夜 / 万圣节绘本 / 忧郁的瓷白脸 / 红眼眶红鼻头 / 黑色齐刘海波波头 / 粗麻帽子 / 发光的小幽灵」指诗意万圣夜(暗色画板上忧郁、超现实的秋夜绘本肖像:瓷白的脸泛红晕、半闭的厚眼皮、一整块的波波头、粗麻 / 针织 / 格子呢织物,靛蓝星空或深色叶丛里只有一处发光的点睛);白纸上不画背景、色调粉粉的角色小像仍用色粉小像,背后刷一块单色、大鼻子红脸蛋的复古童书大头像仍用复古水粉,满画面短排线、只有一个暖光的夜景小版画仍用排线夜景,粉彩黄昏转入星空的微缩风景仍用暮色微缩绘本,满画面彩铅叠涂的温暖黄昏童书页仍用暖调彩铅绘本。「油画棒 / 油画棒肖像 / 蜡笔干刷的人物 / 白纸上露着纸纹白点的粗笔触小像 / 橙黄配藏青」指油画棒肖像(浮在白色糙面纸上的人物小像:一道道平行干笔铺成的大块颜色里撒满纸纹白点,笔尾是硬的梳齿,藏红花黄、藏青、黑、一种冷蓝加橙色腮红和橙红嘴唇,黑色蜡笔只点在眼睛、眉毛和几处轮廓);同样白纸不画背景、但柔和粉粉、揉开的色粉小像仍用色粉小像,米白纸上几大块色加一块滚筒背景板的 mid-century 海报仍用干刷色块,小孩在糙纸上画的蜡笔画仍用儿童蜡笔画,梵高式厚涂的风景仍用油画厚涂。+description: Claude 绘图 / Claude Drawing —— 不借助任何生图模型,由 Claude 用代码一笔一笔「画」出图片(程序化绘画)。内置七十九种画风:中国水墨、水彩、剪纸拼贴、韩国彩铅、日本动漫、编辑风手绘(Riso)、油画厚涂(梵高式流向笔触+颜料浮雕打光)、浮世绘木版画(晕色、木纹、墨线主版、青海波)、像素风(低分辨率+Bayer 抖动+像素字体)、黏土定格(高度图捏出的彩泥+影棚打光)、蓝晒(普鲁士蓝日光晒图,植物剪影透光)、十字绣(Aida 布十字绣+回针绣+缎面绣+法式结)、复古仪器面板(60 年代收音机/仪器正面:柚木、拉丝铝、旋钮、刻度窗、指示灯)、贴纸拼贴·小票(模切乙烯贴纸、热敏小票、和纸胶带、吊牌、橡皮章)、实验笔记本·贴纸(线圈方格本、铅笔图表、荧光笔、红笔圈、便利贴)、黑板板书(墨绿石板、粉笔颗粒、板擦残影、示意图与公式)、赛博朋克(雨夜霓虹街道、玻璃管霓虹招牌、全息广告、湿路面倒影)、卡通手绘(蓝铅笔稿、毛笔线、错位平涂、赛璐璐阴影、逐帧抖线)、等轴 2.5D(正等轴微缩模型、一个太阳照出三面明暗、悬浮数据卡)、单线画(一根不断开的线一笔画完、唯一点睛色)、柔光 3D(光线追踪的糖果色小球海和鼓鼓的软字、景深)、形变动画(一条轮廓依次变形、洋葱皮残影、缓动曲线)、报刊拼贴(牛皮纸、手撕旧报纸、网点老照片、勒索信拼贴字)、弥散玻璃(弥散渐变、磨砂玻璃卡片界面)、包豪斯几何(三原色几何、丝网印刷海报)、复古 Synthwave(切口落日、霓虹网格、镀铬字、录像带质感)、拼豆(钉板上的熔珠小管、熨烫熔合)、岩画(沙漠漆上凿出的凹坑图形、新旧凿痕、剥落)、古埃及墓室壁画(灰泥墙、红格起稿、分栏叙事、象形文字、剥落)、罗马马赛克(石子与玻璃沿轮廓一排排铺、灰缝、燕尾铭牌)、彩色玻璃花窗(哥特尖拱窗、通体着色玻璃、grisaille 彩绘与银染、铅条、透光)、泥金手抄本(羊皮纸、鹅毛笔哥特体、朱红标题、打磨金箔首字母)、达·芬奇手稿(铁胆墨水、左手排线、红粉笔、镜像手写、机械分解图)、剪影(黑纸剪出的侧影小像、薄金粉、椭圆金框)、凸版印刷海报(木活字、红黑双色错版、木刻插图)、苏联构成主义(红黑两版、斜条与楔形、西里尔大字、网点照片拼贴)、装饰艺术 Art Deco(1930 年代喷枪流线型海报、交替射线、阶梯高楼、金色 Deco 字)、黄金时代漫画(毛笔墨线、Ben-Day 网点、四色错版、新闻纸)、波普丝网(多格撞色平涂 + 错位的照相黑版)、ASCII 字符画(行式打印机、绿条连续纸、叠打)、低多边形(1999 年代 3D:平面着色、仿射贴图、逐顶点雾、15 位色抖动)、喷漆模板涂鸦(混凝土墙上多层卡纸模板喷绘、雾化与滴痕)、刺绣徽章(牛仔布上的机绣徽章:填充绣、缎面绣、锁边)、蓝图工程图(描图墨线晒成蓝底白线)、儿童蜡笔画(小孩在糙纸上的蜡笔涂抹)、绿屏终端 CRT(荧光字符画、扫描线、余辉)、热成像(先画温度场再上伪彩色)、代尔夫特蓝瓷砖(锡釉砖上的钴蓝手绘)、洞穴壁画(火光下的赭石、吹喷手印)、1-bit 早期画图软件(黑白整屏、8×8 图案填充)、古希腊黑绘陶瓶(黑釉剪影、刻线、饰带展开图)、铅笔素描(石墨排线、擦笔、边缘只剩线稿)、X 光片(安检透视、轮廓发亮、伪彩)、1930 年代黑白橡皮管动画(白手套、饼切眼、老胶片)、黑白麻胶版画(刻刀减法、手拓发花、套色错版)、VHS 家庭录像(钨丝灯偏色、色度渗色、REC)、扁平矢量(分层几何色块、七色、层间投影)、绘本角色动画(小角色挤压拉伸的真动画)、圆珠笔涂鸦(蓝红圆珠笔线稿、墨团、彩铅、页边涂鸦)、描图纸叠层(灯箱上的黑线底图 + 一张张单色描图纸叠片:正片叠底、套准十字、定位钉、绘图胶带)、粉彩界面 · Pastel UI(产品发布片式的界面画面:纯色粉彩底与大光斑、macOS 窗口卡片、胶囊与粗黑标题色条、状态标签与 ✓ / ✗ 徽章、放大镜、从卡片边探头的扁平小图标)、阅卷批改 · Exam Grading(绿毛毡桌上被红笔批改的答题卡:定位黑块、考号涂卡、得分格与阅卷栏、长尾夹夹住的标准答案卡、油墨不均的朱红印章、立体红笔、波浪线 / 圈 / 引线 / 批注 / 叉 / 圈起来的分数)、皮影戏 · Shadow Puppetry(油灯照亮的幕布上,雕空、透明染色的驴皮关节人偶:镂空纹样、阳刻空脸、雉翎盔头、线结与操纵杆、离幕时虚化的双影;雕花戏台、红漆金字牌匾、红灯笼)、钢笔淡彩 · Pen & Wash(速写小卡上的针管笔线稿 + 松散淡彩:线条抖、出头、不闭合,颜色错位出线、留白缝、干边与颗粒,不铺满的背景色块;大头、圆眼镜、点点眼、红鼻子的呆萌小人;卡片拍在木桌上,旁边放着针管笔和水笔)、复古水粉 · Retro Gouache(复古绘本风的水粉大头像:不透明水粉从暗到亮一层层盖上去,单色背景用干笔皴擦;大红鼻子、腮红、圆眼和大耳朵用几阶色值塑出来;看得见针脚的毛衣和毛线帽,一根根的头发和胡子,毛毡;最后是印刷书页的纸纹)、蓝调绘本 · Blue Picture Book(软蓝色调的现代绘本跨页:几乎只用粉蓝、矢车菊蓝、深青蓝三阶蓝加黑墨和纸白,只点一点珊瑚红、粉色腮红和芥末黄;毛笔 / 墨铅笔线干、抖、断,粗细不匀,线不闭合,暗部用快速来回的乱线排出来;颜色是干蜡笔、粉彩、干水粉,错位出线,纸纹的白点透出来;白粉笔痕压在蓝上,甩点和细尘;背景蓝块毛边、不到纸边;大圆脑袋、带高光的点点眼、点彩腮红和雀斑、火柴腿穿靴子的小人,乱线毛边的白色毛绒动物;最后印在书上:中缝和页码)、江南园林 · Jiangnan Garden(细笔园林春景,数字水粉插画:成千上万片叶形小笔触按一个太阳堆出树冠,暗芯、亮边、一簇簇的高光;白色和淡粉的繁花是一簇簇圆点花瓣,枝条从缝里露出来;垂柳是一绺一绺发丝般的细枝挂满小叶;黛瓦飞檐是真的瓦垄:筒瓦板瓦一行行、檐口瓦当滴水、翘起的翼角和卷起的脊头;粉墙月洞门、冰裂纹漏窗、翡翠绿槅扇和挂落、红灯笼、匾额;九曲石桥、石阶、小木船;碧绿湖面倒映岸上的一切,更柔、更暗,加涟漪和细竖纹;睡莲、白鹭;从前景花枝到雾里青山层层退远,墙上桥上落着叶影;最后一方小红印)、干刷色块 · Dry-Brush Blocks(mid-century 海报 / 水粉拼贴式的编辑插画:米白纸上几大块干笔或滚筒刷出的色块,颜色严格限定在森林绿、鼠尾草绿、青蓝、藏蓝、近黑和朱红,外加一点天蓝、淡青瓷和米色;每块颜色在自己的笔刷坐标系里刷:一道道平行的笔,起笔饱满、收笔干枯,两侧几乎是直边,两端梳成长短不一的毛齿,块里有顺笔的鬃毛纹、皴擦斑和露出来的纸色;背后的大色板用滚筒:近乎平涂、成簇的细点、干的两侧和几道细刮痕;色块像丝网套印或撕纸拼贴一样叠起来,撕口带一圈浅色纤维边;人物拆成几个大块面:亮暗两半朝不同方向刷的外套、几块肤色平面拼的头、粗黑框眼镜、干笔皴擦的白胡子;瓶子是竖刷的深色剪影加一道高光和小块标签;一旁一个小朱红方块;不勾线、不做渐变;最后像胶印:轻微柔化、纸纹、暗部零星白点、纸上细尘)、暮色微缩绘本 · Twilight Storybook(温柔、怀旧的黄昏绘本单页,满是微缩细节:大片粉彩黄昏天空,从顶上的薰衣草紫经玫瑰、蜜桃到地平线的暖金,柔和的平底云带、细细的光线和一轮低垂的淡日;一侧天空已经入夜:星空、带暗带的银河、弯月、流星,昼夜交界经过淡紫和靛蓝,不发灰;下面是一层层粉彩条纹的起伏山丘,拼布似的田、细细的垄、小圆树;前景是几万朵小野花铺成的坡,坡顶是色点,越往下越大:雏菊、矢车菊、虞美人、波斯菊、金盏花、毛茛、羽扇豆、勿忘我,夜的一侧整片变成月光蓝;很小、扁平、可爱的原创角色;上面叠一层科学图版的语言:圆形的「detail a」放大图,细墨线、排线、尺寸标注、标签和比例尺,几行灰色的小写英文手写字;最后是细颗粒、光晕、暗角和底边一道撕纸边)、排线夜景 · Hatched Nocturne(彩铅 / 色粉排线式的小幅夜景版画:天空、云、山和海全由密密的短笔触叠成,每片区域的笔触顺着同一股「风」走——天空斜着流、蒸汽绕着云团卷、山坡顺着坡向、海面横着长拖,每一笔色相和明度都差一点,笔毛分道、拖干的笔尾、纸纹里漏出的细缝,没有一处平滑渐变;深靛蓝、藏青、冷灰蓝的夜色里只有一个暖色光源,光是一层层加上去的发光笔触:核心黄白、外圈橙红、再外是被照亮的笔触,被照亮的蒸汽按「光 × 受光」上色,所以是红橙而不是粉;发光的细丝(会蜿蜒、分股、末端亮珠)、火星、星点;海面上被横向笔触打碎的倒影和光柱;几十像素高的小人靠一点亮色(围巾)点出来;最后装裱成小版画:米白纸边、压印的版痕、左下铅笔小标题、右下更小的说明,用细的普通字体)、笔记应用界面 · Obsidian UI(讲解片里的深色笔记应用窗口:近黑页面上一团淡紫光晕,窗口里有标签栏、细长图标栏、带缩进线的文件列表、粗黑 H1 下一道紫色短条、属性块和「#标签」、紫色的内部链接和行内代码、带语法色的 mermaid 代码块——点「阅读」后渲染成扁平深色的流程图,一个节点亮紫——紫色左边的引用标注,右栏关系图谱里被链接的笔记亮成紫色光点;全画只有一个紫色强调色,不画官方 logo)、白板卡片 · Canvas Board(深色笔记应用的白板视图:深色页面上一扇应用窗口——红黄绿三点和「.canvas」标签页的标签栏、左边一列线性图标——里面是一块随镜头平移缩放的灰点阵无限白板;分组框和浮在框上方的组名,深色圆角卡片带 2 px 的卡片色边(红、橙、黄、绿、青、紫)和一层很淡的同色底,卡片之间是从边的中点沿法线弯出去的曲线连线,末端实心箭头、中间一块白板底色的标签;卡片里是 Markdown:标题、正文、紫色高亮、等宽行内代码、勾选清单(勾上时紫色方框弹出、对勾画出、文字变灰加删除线)、紫色竖条的引用、紫色标签胶囊、颜色编号胶囊;图片卡片上方写文件名,里面可以用手绘笔触画草图(每笔画两遍、略弯、出头,手写体批注);右上角一列缩放按钮;全画只有一个紫色强调色加卡片色;所有东西都记在白板坐标里、每次按镜头重画,任意缩放都锐利,镜头能平移缩放、卡片能掉落、连线能一点点画出来)、Flexoki 纸面 · Flexoki Paper(文档站式的图解页:暖白纸(#FFFCF0) 上的墨黑字和一串暖灰,几张不描边、不投影的浅灰圆角卡片,粗黑中文标题、灰色英文类型名、等宽编号;卡片里的图照轻量图表渲染器的样子画——比底色差一级的框和 2 px 灰边(直角、圆角、胶囊、菱形、圆柱、圆)、墨线末端一个小的实心三角箭头、普通半粗体标签垫一块底色,虚线生命线和回复、带纸色缝的饼图、细网格上的柱状图、表头着色的对比表;Flexoki 的橙、红、蓝、绿、紫、青只放在有意义的地方,橙色聚焦框、黑底胶囊、字距收紧的大数字;能做成图一边一边画出来、数字滚动的动图)、暖调彩铅绘本 · Warm Pencil Storybook(暖白、有齿纹的纸上一层层叠涂的彩色铅笔绘本页:天空、山坡、草、水、一只大而温柔的生物和一个小小的孩子,全由顺着形体走向的细铅笔线叠成——天空横向长排线,山坡顺着坡势,龟壳绕着每块盾片的生长纹,脖子横过褶皱,雨衣顺着衣褶,苔藓和头发一簇簇顺毛;每块先铺一层浅色底,再上固有色、背光处叠同色系的深色,受光处罩一层暖色、阴影里罩一层冷色,每层角度错开一点、笔触交叉;蜡只挂在纸齿的峰上,同一批纸坑一层层都透出细白点,压得重、叠得多的地方才慢慢合上;后画的东西先留白再铺背景,颜色不互相混;毛是一绺一绺的:根部散开、尖端聚拢、顺着毛向,每绺受光一侧亮、背光一侧暗;没有墨线、没有黑色,只有很淡的同色轮廓;黄昏的暖光:灯笼和窗灯是一层层橙黄的发光叠涂(不是一团光晕,也不是放射线),低低的太阳给受光一侧一道暖边;水里的倒影也是一笔笔横排线;附带树、小房子、石头、鳞片、野花、纸灯笼和穿雨衣提灯笼的小孩等绘本部件)、彩色小镇 · Colour Town(不透明水粉平涂加细细的深棕墨线画的童话山城街景:高高窄窄的房子漆成番茄红、芥末黄、青绿、薄荷、珊瑚、奶白,一排压一排堆上山坡,近大远小、前后遮挡;深蓝灰的石板曼莎屋顶是一片片瓦错缝铺出来的,带老虎窗、烟囱和赤陶烟囱帽、电视天线;白色钟楼、淡蓝的天和奶白的云;三角彩旗串在好几层深度上斜穿街道,远处的小、近处的大,每面旗有一道深一点的折痕;红色爬藤玫瑰、溢出来的窗台花箱、铁艺阳台、石头台阶和扶手、路灯、吊挂的店招、拱门和彩色木门、写着字的店面和条纹遮阳篷;前景是湿亮的街面,把整条街倒映成一道道竖向的笔触;每块颜色都是带一点笔刷纹理的不透明平涂,边缘像手画的那样微微抖,和描线不完全对齐;墨线分成几段、粗细略有变化,方框的转角偶尔出头;墨是半透明的,压在红墙上是深红棕,压在玻璃上近乎黑;窗户排得整齐,但每扇都略有不同;一整面墙可以用透视单应贴成往消失点收的峡谷墙;几乎没有投影;附带钟楼、台阶、矮墙、栏杆、树、花盆、彩旗、路灯、店招、海报、咖啡桌、猫和概括的小人等部件)、色粉小像 · Pastel Vignette(白纸上的绘本角色小像,软色粉加一点水粉:一个人和他的小动物,半身、略偏一边,四周大片留白,不画背景色块、不加边框,画面在边上用干笔散开、融进白纸;颜色柔和、粉粉的——浅粉蓝的衣服上看得见顺着衣褶的干笔、奶油色的毛衣、暖肤色——只有一组暖橙饱和(橘猫、绒球、蝴蝶结这类);脸是揉开的平滑色粉:大圆眼、深色虹膜和两点白高光、一大圈腮红、红鼻尖、小嘴;头发和毛是成百上千根细丝,一绺一绺,有几根飞出轮廓,毛的轮廓蓬松地融进后面的东西;几乎不描线,只有眼皮、鼻翼、脸的背光侧几道细的软线;背后至多一枝叶子和一层很淡的铅笔小镇;附带圆眼、眉毛、腮红、鼻子、嘴、发丝、毛簇、蓬松轮廓、叶子和枝条等部件)、诗意万圣夜 · Poetic Halloween(忧郁、带一点超现实的秋夜 / 万圣节绘本肖像,暗色画板上的不透明水粉加细彩铅排线,再印出来:瓷白的脸,鼻子、脸颊、眼皮和眼睛四周泛着很重的红晕(平滑的一层红加单像素的细红斑点),下眼睑一道湿红,厚眼皮半闭、往外眼角垂,小嘴不笑,体积极简;头发是一整块雕塑般的实体——刀切一样平的齐刘海、乌黑(或银白)的波波头,几乎看不见发丝,只有一道柔和的光泽;衣物是摸得着的织物:粗麻 / 毛毡帽子(一上一下交织的粗线、线间的黑孔、毛边)、粗针织围巾和手套、斜纹织出来的格子呢外套;底子暗而沉——靛蓝夜空和星星、浓密的深色叶丛;每幅只有一处发光的点睛:眼睛和衣摆尖发着暖光的床单小幽灵,暖光照亮身边的叶子、毛线和脸的下侧;满画面一层细的印刷颗粒;附带重眼皮眼、红晕、长鼻子、小嘴、光泽带、粗麻、针织、罗纹、格子呢、毛边、掌状叶和叶丛、暖光照明和光晕、小幽灵、星星等部件)、油画棒肖像 · Oil-Pastel Portrait(白色糙面纸上的油画棒 / 蜡笔干刷人物小像,人浮在白纸上、不画背景(至多一抹天色或一块干刷的黑色投影):颜色收得紧而浓——藏红花黄 / 金盏黄、偏青的藏青和黑、一种冷蓝,加橙色腮红和橙红嘴唇;毛衣、帽子、大衣、围巾这类大块颜色用一道道平行的干笔铺满,蜡只挂在纸纹的凸起上、跳过纸坑,所以每块颜色里都撒着顺着笔拉长的纸纹白点,笔触的收尾是硬的、一把长短不一的梳齿;黑色蜡笔只点在要紧处:眼睛、眉毛、鼻孔、几笔轮廓和衣褶,不勾满轮廓线;脸就是纸本身,背光一侧几笔桃色,两块排线的橙色腮红,平涂的橙红嘴唇——简化、略歪、有表情;头发是几笔松而有劲的长笔触,针织的条纹是一段段短而粗的色条;附带干笔铺色、蜡笔线、排线腮红、短色条、干刷投影、热气、黑眼睛、粗眉、嘴唇、长发丝等部件)、手账线描 · Sketchbook Doodle(速写本里的一页小画:暖米白、带一点粉的纸上大片空着,一个小小的人物加两三件稀疏的小道具浮在纸上,不画地面和背景;发丝细的深色墨线,略抖,起笔轻、收笔挑出一个细尖,轮廓一两笔画完、接口不闭合,偶尔断开;头发是一根根分开的细线,一起顺着一个方向起伏,线与线之间露着纸;脸小而简单——闭着的弧线眼加几根睫毛(或两个小黑点)、一笔鼻子、小小的红嘴、两颗圆圆的粉腮红;衣服用彩铅和马克笔涂成一道道松散的彩虹条纹(红、黄、青绿、橙、品红、蓝),条与条之间留着纸白,每条的上下边各自游移,有的冲出墨线、有的够不到,看得见彩铅的颗粒和顺笔的道子,颜色压在一起会变(红压黄成橙);道具用细的彩色线:单片叶子带人字形叶脉排线(或在填色里留白的叶脉)、小花、几根细线叠成的小树、一缕带卷的热气、一只团着睡觉的猫;附带抖线墨线、不闭合的轮廓、发丝、条纹、彩铅 / 马克笔上色、圆腮红、闭眼、点眼、小红嘴、叶子、小花、细线树、热气、短毛刺、小涂鸦等部件)。用户说「claude绘图」「用代码画」「你自己画」「不用生图模型画」「程序化绘画」,或点名以上任一画风(含黏土、彩泥、定格动画、蓝晒、晒图、十字绣、刺绣、复古面板、老式收音机、贴纸、小票、收据、手帐拼贴、实验笔记本、方格本、荧光笔、便利贴、黑板、板书、粉笔、赛博朋克、霓虹、雨夜街道、卡通、手绘卡通、逐帧手绘、抖线、等轴、2.5D、微缩模型、单线画、一笔画、线条动画、柔光 3D、3D 渲染、C4D 风、软糖字、小球海、形变、变形动画、报刊拼贴、剪报、达达、勒索信字、网点印刷、弥散渐变、玻璃拟态、毛玻璃、包豪斯、几何构成、丝网印刷、Synthwave、蒸汽波、合成器浪潮、80 年代复古、拼豆、拼拼豆、熔珠、熨豆、豆豆画、钉板、烫豆、岩画、岩刻、凿刻、石刻、沙漠漆、史前壁刻、大角羊、古埃及、埃及壁画、墓室壁画、法老时代、象形文字、尼罗河、底比斯、罗马马赛克、马赛克镶嵌、镶嵌画、石子拼画、地砖画、古罗马地板、彩色玻璃、彩绘玻璃、花窗、玻璃花窗、教堂花窗、哥特花窗、铅条玻璃、泥金手抄本、手抄本、彩饰手抄本、中世纪手稿、羊皮纸、哥特体、花体首字母、泥金、贴金、星盘、达芬奇、达·芬奇、达芬奇手稿、手稿风、文艺复兴手稿、发明手稿、镜像字、镜像书写、扑翼机、红粉笔、钢笔排线、机械草图、分解图、剪影、剪影肖像、侧影、侧面像、黑纸剪影、剪影小像、椭圆金框、乔治时代肖像、摄政时期肖像、凸版印刷、活版印刷、木活字、铅字海报、马戏团海报、复古海报、老海报、19 世纪海报、双色套印、错版、套色错位、木刻插图、构成主义、苏联海报、苏联构成主义、俄国先锋派、罗德琴科风、红黑海报、照片蒙太奇、照片拼贴海报、西里尔字、装饰艺术、装饰风、流线型、流线型海报、1930 年代海报、旅行海报、铁路海报、火车海报、喷枪画、喷笔画、阶梯高楼、射线背景、盖茨比风、黄金时代漫画、老漫画、复古漫画、美漫封面、漫画封面、Ben-Day 网点、本戴点、网点上色、四色印刷、四色错版、新闻纸、对白框、拟声字、1940 年代漫画、波普、波普艺术、波普丝网、沃霍尔风、丝网版画头像、撞色头像、多格重复头像、六宫格撞色头像、ASCII、字符画、字符艺术、文字画、行式打印机、绿条纸、连续打印纸、针孔打印纸、老电脑打印、叠打、低多边形、低面数、低模、多边形风、千禧年 3D、90 年代 3D、复古 3D 游戏、老游戏截图、PS1 风、N64 风、平面着色、线框、游戏 HUD、飞行游戏、穿环、喷漆、模板涂鸦、镂空模板、喷漆模板、模板喷绘、街头涂鸦、街头艺术、墙绘、滴漆、班克西风格、刺绣徽章、徽章、布章、臂章、刺绣贴、绣标、锁边、牛仔外套徽章、户外徽章、营地徽章、弧形条章、蓝图、工程图、施工图、蜡笔画、儿童画、绿屏终端、CRT、显像管、热成像、热像仪、温度图、代尔夫特、荷兰蓝瓷砖、洞穴壁画、史前壁画、赭石、1-bit、黑白画图软件、MacPaint 风、黑绘、古希腊陶瓶、希腊瓶画、铅笔素描、素描、铅笔画、X 光、X 光片、安检图像、橡皮管动画、黑白卡通、老动画、麻胶版画、黑白版画、藏书票、VHS、家庭录像、录像带、扁平插画、扁平风、矢量插画、绘本动画、角色动画、挤压拉伸、圆珠笔、圆珠笔涂鸦、原子笔、页边涂鸦、课本涂鸦、手画棋盘、描图纸、硫酸纸、叠片、叠层、分色片、灯箱、拷贝台、透光台、套准、定位钉、粉彩界面、粉彩 UI、Dot 风、Dot 那种风格、产品发布会界面、发布会质感、窗口卡片、macOS 窗口、界面卡片、讲解片界面页、小图标探头、阅卷、阅卷批改、批改、判卷、改卷、改作业、答题卡、试卷、考卷、测验卷、红笔批改、红笔打分、打分数、盖章批改、朱红印章、标准答案卡、长尾夹、讲解片评测 / 打分页、皮影、皮影戏、影子戏、驴皮影、灯影戏、皮影人偶、雕花戏台、戏台牌匾、亮相、钢笔淡彩、淡彩、淡彩速写、钢笔淡彩小人、针管笔、勾线笔、针管笔加水彩、线稿上色、速写卡片、速写本小人、水彩小卡、城市速写、街头速写、水笔、自来水笔、复古水粉、水粉、水粉画、不透明水粉、哑光丙烯、复古绘本、绘本插画、绘本大头像、童书插画、复古童书、大头像、大鼻子人物、针织毛衣、麻花毛衣、毛线帽、毛毡帽、卷发、胡子、蓝调绘本、蓝色绘本、软蓝绘本、蓝调童书、软蓝童书插画、蓝色童书插画、蓝色系绘本、限色绘本、蓝白绘本、现代绘本跨页、手绘绘本跨页、绘本跨页、绘本内页、干笔墨线、墨铅笔线、粉彩蜡笔质感绘本、白色毛绒动物、毛绒白熊、点彩腮红、江南园林、园林春景、春水园林、中式园林插画、古典园林插画、国风园林插画、苏式园林、细笔园林、园林风景插画、水榭、临水茶榭、亭台楼阁、粉墙黛瓦、黛瓦白墙、飞檐翘角、翼角起翘、月洞门、漏窗、冰裂纹窗、槅扇、挂落、九曲桥、曲桥、垂柳园林、碧水倒影、园林倒影、睡莲池、数字水粉风景、细腻厚涂风景、干刷色块、干笔色块、干刷、干刷插画、干笔插画、滚筒刷、滚筒色块、色块插画、大色块插画、毛边色块、刷痕色块、粗刷笔触、mid-century、世纪中期插画、中世纪现代插画、复古编辑插画、复古海报插画、水粉拼贴、撕纸色块、限色海报、暮色微缩绘本、暮色绘本、黄昏绘本、微缩绘本、黄昏转夜、昼夜交界、日夜交界、半边黄昏半边星空、粉彩黄昏、粉紫晚霞、黄昏星空、银河插画、野花坡、野花草坡、花海插画、萤火虫、放风筝插画、拼布山丘、条纹田野、小圆树、细节放大图、局部放大图、技术细节小窗、科学图版风插画、手写英文小字、晚安绘本、治愈系绘本插画、排线夜景、排线风夜景、彩铅夜景、色粉夜景、粉彩排线、短笔触夜景、笔触夜空、方向笔触、夜景版画、小版画、限量版画风、版画装裱、版痕、纸边标题、铅笔题字、夜景插画、夜空插画、深蓝夜景、靛蓝夜空、冷暖对比夜景、唯一暖光、夜里的火光、发光的云、被照亮的云、红色精灵闪电、精灵闪电、火山夜景、熔岩入海、熔岩、岩浆、火山喷发插画、海上风暴、海面倒影、光柱倒影、火星飞溅、星点、看海的人、礁石上的人、远处的小人、小人比例尺、雪夜篝火、渔火、笔记应用界面、笔记软件界面、笔记 App 界面、Obsidian 风、Obsidian 界面、Obsidian 风格、黑曜石笔记、深色笔记界面、暗色主题界面、Markdown 笔记、Markdown 编辑器、双链笔记、内部链接、关系图谱、知识图谱界面、图谱视图、局部图谱、反向链接、文件列表、侧边栏、标签页、属性栏、行内代码、代码块、mermaid、mermaid 流程图、代码块渲染成图、源码 / 阅读切换、阅读视图、引用标注、callout、读书笔记界面、知识库界面、第二大脑、讲解片里的笔记应用、应用窗口演示、白板卡片、无限白板、白板视图、画布视图、Canvas 视图、Obsidian Canvas、Obsidian 白板、笔记应用白板、卡片白板、卡片和连线、节点和连线、带箭头的连线、弯曲连线、连线标签、分组框、点阵背景、点阵白板、深色白板、深色界面卡片、彩色边卡片、勾选清单卡片、待办卡片、引用卡片、图片卡片、草图卡片、手绘平面图、缩放按钮、镜头平移、镜头缩放、卡片掉落动画、连线画出来、搬家计划、旅行计划白板、活动计划白板、头脑风暴白板、项目拆解白板、计划白板、Flexoki、Flexoki 纸面、Flexoki 配色、Flexoki 风、暖白纸、米白纸面、墨黑字、文档站风格、文档页图解、技术文档配图、图解页、一页图解、讲解片图表页、几张图讲清楚、流程图、画流程图、时序图、序列图、饼图、柱状图、条形图、对比表、参数对比、图表合集、图表墙、Mermaid 风、Mermaid 图、图表渲染器、灰底圆角框、小三角箭头、橙色聚焦框、数字滚动、计时器大数字、配方图解、步骤图解、手冲咖啡图解、菜谱图解、工作流程图解、暖调彩铅绘本、暖调彩铅、彩铅绘本、彩铅童书、彩铅童书插画、彩色铅笔绘本、彩色铅笔童书、软彩铅、彩铅叠涂、层层叠涂的彩铅、顺着形体排线、纸齿白点、纸纹透白、怀旧童书、翻绘本的感觉、温暖怀旧的绘本、暖色绘本页、巨物与小孩、大动物和小孩、巨大温柔的生物、温柔的巨兽、大乌龟、巨龟、老乌龟、背着花园的乌龟、龟背上的小花园、大龟过河、过河、小溪、踏脚石、提灯笼的小孩、黄色雨衣、纸灯笼、亮灯的窗、亮灯的小房子、黄昏小镇、成簇的毛、顺毛、毛一绺一绺、苔藓、金黄的树、彩色小镇、彩色房子、彩色街景、童话小镇、童话街景、治愈小镇、理想的生活环境、欧洲小镇、山城小镇、钟楼小镇、彩虹小镇、彩旗、三角彩旗、彩旗串、彩旗街、节日街道、节日早晨、钟楼、白色钟楼、洋葱顶、石板屋顶、曼莎屋顶、老虎窗、烟囱帽、电视天线、风向标、爬藤玫瑰、窗台花箱、铁艺阳台、台阶街、石头台阶、拱门下的台阶、湿街倒影、雨后街道、雨后的广场、水粉街景、水粉加描线、水粉平涂加细线、细节多到看不完、小红书彩色小镇、色粉小像、色粉画、软色粉、色粉笔触、色粉质感、色粉加水粉、粉彩笔触、粉彩质感、绘本角色、绘本人物、绘本小像、角色小像、人物小像、半身像、人和宠物、人和猫、人和狗、主人和宠物、抱着猫、抱着狗、橘猫、大橘、毛茸茸的猫、毛茸茸的狗、狐狸、猫围巾、把猫当围巾、白底插画、留白插画、不画背景、边缘散开、干笔散开、画到边上就散了、大眼睛、大圆眼、大腮红、红鼻头、红鼻尖、发丝、一根根头发、头发丝、飞丝、毛绒绒、蓬松的毛、温柔的小像、治愈系角色、Midjourney 色粉风、诗意万圣夜、诗意万圣节、万圣节、万圣夜、万圣节插画、万圣节绘本、万圣节头像、秋夜、秋夜插画、忧郁绘本、忧郁风、超现实绘本、诡异又温柔、瓷白的脸、瓷娃娃脸、瓷偶、脸上的红晕、红眼眶、红眼圈、红鼻头、厚眼皮、半闭的眼睛、悲伤的眼睛、不笑的小嘴、波波头、黑色波波头、银白波波头、齐刘海、刀切刘海、粗麻、麻布、麻袋布、粗麻帽子、毛毡帽、粗针织围巾、毛线手套、格子呢、格纹外套、苏格兰格子、小幽灵、床单幽灵、发光的小幽灵、发光的眼睛、罐子里的幽灵、深色叶丛、星空肖像、Midjourney 万圣风、油画棒、油画棒肖像、油画棒人像、油画棒小像、油画棒插画、油画棒头像、蜡笔肖像、蜡笔干刷、干刷肖像、干刷人像、干笔人物、粗犷笔触、纸纹白点、露白的纸纹、手作感肖像、不完美的肖像、白底人物小像、白纸上的人物、藏红花黄、橙黄配藏青、芥末黄配藏青、条纹围巾、粗针织围巾、露指手套、捧着热饮、冒热气的纸杯、冬天的早市、冬日早晨、冻红的脸颊、橙色腮红、橙红嘴唇、黑色蜡笔线、Midjourney 油画棒风、手账线描、手账风、手账风插画、手账小画、手账插画、速写本插画、速写本小画、速写本的一页、线描小人、细线插画、细线手绘、发丝细的线、细墨线、童趣手绘、可爱手绘、治愈系手绘、彩虹条纹、条纹毛衣、彩虹毛衣、彩虹条纹毛衣、彩条衣服、彩铅条纹、马克笔条纹、粉腮红、圆腮红、闭着眼睛的小人、小红嘴、单片叶子、叶脉排线、细线小树、团着睡觉的猫、读书的女孩、小人物大留白、Midjourney 手账风),或 "draw it yourself", "paint with code", "procedural painting", "watercolor / collage / colored pencil / anime / editorial / impasto oil / ukiyo-e / pixel art / clay / claymation / cyanotype / sun print / cross-stitch / embroidery / retro instrument panel / vintage radio / sticker collage / receipt / lab notebook / graph paper / chalkboard / blackboard / cyberpunk / neon city / cartoon / hand-drawn animation / isometric / 2.5D / continuous line / one-line drawing / soft 3D / 3D render / puffy letters / ball pit / shape morph / morphing / newspaper collage / Dada / ransom note / halftone / glassmorphism / aurora gradient / Bauhaus / geometric poster / screen print / synthwave / retrowave / outrun / perler beads / hama beads / artkal / fuse beads / melty beads / pegboard beads / petroglyph / rock art / rock carving / desert varnish / Egyptian tomb painting / ancient Egypt / hieroglyphs / Theban tomb / Roman mosaic / floor mosaic / tesserae / opus vermiculatum / Pompeii mosaic / stained glass / leaded glass / church window / Gothic window / grisaille / illuminated manuscript / medieval manuscript / book of hours / gold leaf / illuminated initial / blackletter / vellum / astrolabe / da Vinci notebook / Leonardo codex / Renaissance sketchbook / mirror writing / iron-gall ink / red chalk / sanguine / ornithopter / exploded view / inventor's sketch / silhouette / silhouette portrait / cut-paper profile / shade portrait / Georgian portrait / Regency portrait / oval gilt frame / letterpress / wood type / playbill / circus poster / Victorian poster / two-colour misregistration / woodcut poster / constructivism / constructivist poster / Soviet avant-garde / Russian avant-garde / Rodchenko style / photomontage poster / art deco / streamline moderne / 1930s travel poster / railway poster / airbrush poster / sunburst rays / Gatsby style / golden age comic / vintage comic book / comic cover / Ben-Day dots / four-color printing / newsprint / speech balloon / pulp cover / pop art / Warhol-style / pop silkscreen / silkscreen portrait / repeated pop portrait grid / ASCII art / text art / typewriter art / line printer / greenbar / fanfold paper / tractor feed / overstrike / printer plot / low poly / low-poly / retro 3D / 90s 3D game / PS1 style / N64 style / software rasterizer / flat shading / affine texture mapping / vertex fog / game HUD / stencil / stencil graffiti / spray paint stencil / street art / drips and overspray / Banksy-style stencil / embroidered patch / embroidery patch / iron-on patch / sew-on patch / merit badge / camp badge / merrow border / rocker patch / denim jacket patches / blueprint / technical drawing / crayon / kid's drawing / CRT terminal / green screen / thermal camera / thermal imaging / Delft tiles / Delft blue / cave painting / ochre / Lascaux-style / 1-bit / MacPaint-style / black-figure / Greek vase / pencil drawing / graphite / X-ray / baggage scanner / rubber hose / 1930s cartoon / linocut / lino print / VHS / home video / flat vector / flat illustration / storybook animation / squash and stretch / ballpoint / biro / ballpoint doodle / margin doodles / hand-drawn board game / overlay sheets / tracing-paper overlays / light box / colour separations / registration marks / acetate overlay / pastel UI / Dot-style product film / launch-film interface / macOS window cards / exam grading / grading an answer sheet / red-pen marking / graded test paper / rubber-stamped answer sheet / shadow puppet / shadow puppetry / Chinese shadow play / leather shadow puppets / backlit puppet screen / pen and wash / pen & wash / line and wash / ink and watercolour / ink and watercolor / fineliner sketch / fineliner and watercolour / sketchbook characters / sketch cards / urban sketching / water brush / gouache / retro gouache / gouache portrait / gouache illustration / opaque gouache / matte acrylic / picture-book portrait / vintage picture book / retro children's book illustration / mid-century children's book / big-nosed character portrait / cable-knit sweater / knitted bobble hat / blue picture book / soft blue picture book / soft-blue children's book illustration / modern picture book / limited-palette picture book / picture-book spread / scratchy ink line / dry-brush ink line / ink pencil line / crayon and pastel texture / chalky white marks / blue and coral palette / fluffy white bear / Jiangnan garden / Chinese garden / classical Chinese garden illustration / Chinese water garden / spring garden illustration / lush painterly garden / waterside pavilion / moon gate / lattice windows / zigzag bridge / weeping willow garden / upturned eaves / grey-tiled roof / blossom trees and reflections / lily pond with egrets / digital gouache landscape / dry-brush blocks / dry brush illustration / dry-brushed colour blocks / roller texture / brush-textured shapes / mid-century illustration / mid-century modern poster / mid-century editorial illustration / gouache collage / torn-paper collage poster / limited palette poster / scumbled texture / vintage book cover illustration / twilight storybook / dusk picture book / dusk to night sky / day and night split sky / pastel sunset sky / Milky Way illustration / wildflower meadow / wildflower hill / patchwork hills / tiny round trees / fireflies / paper kite / magnified detail inset / detail callout circle / scientific plate overlay / handwritten lowercase captions / cozy miniature illustration / bedtime story illustration / hatched nocturne / hatched night scene / pastel hatching night / coloured-pencil nocturne / directional strokes / short brush strokes sky / night print with margins / small art print / plate mark / pencilled title and caption / indigo night with one warm light / glowing cloud lit from below / red sprites / lava entering the sea / volcano at night / glowing threads and sparks / broken reflection on the sea / tiny figures for scale / Obsidian UI / Obsidian-style note app / dark note-taking app / dark-theme Markdown editor / note app window / file explorer sidebar / wiki links / backlinks / graph view / local graph / knowledge graph UI / properties and tags / inline code / mermaid code block / mermaid flowchart rendered / source vs reading view / callout block / reading notes app / second brain UI / knowledge base screen / canvas board / infinite whiteboard / dotted board / note-app canvas view / Obsidian-style canvas / cards and connectors / curved arrows between cards / edge labels / group frames / coloured card borders / task-list card / quote card / image card with a sketch / hand-drawn floor plan / zoom controls / camera pan and zoom / cards dropping in / moving plan board / Flexoki / Flexoki paper / Flexoki palette / warm paper and ink / docs-site diagrams / explainer sheet / diagram sheet / Mermaid-style diagrams / lightweight diagram renderer / flowchart / sequence diagram / pie chart / bar chart / comparison table / diagram wall / grey-bordered boxes / small triangular arrowheads / orange focus ring / rolling numbers / recipe explainer / warm pencil storybook / coloured-pencil storybook / colored pencil picture book / soft pencil textures / layered coloured pencil / pencil strokes following the form / paper tooth specks / nostalgic children's storybook / giant gentle creature and a small child / giant tortoise / tortoise with a garden on its back / stepping stones / child with a lantern / yellow raincoat / paper lantern / lit windows at dusk / tufted fur in locks / Midjourney sref 3220081856 look without an image model / colour town / colorful European town / storybook street / fairy-tale town / candy-coloured houses / hill town / bunting / pennant flags / festival street / clock tower / onion dome / slate mansard roofs / dormers / chimney pots / TV aerials / climbing roses / window boxes / wrought-iron balconies / stepped lane / wet street reflection / gouache and ink cityscape / pastel vignette / soft pastel character / chalk pastel portrait / pastel textures and painterly brushstrokes / whimsical character design / picture-book character on white / person with a pet / girl and her cat / ginger cat / cat scarf / big round eyes / rosy cheeks / red-tipped nose / wispy hair strands / fluffy fur / feathered edges / vignette on white paper / Midjourney sref 455581803 look without an image model / poetic halloween / halloween portrait / autumn night portrait / melancholic picture book / surreal storybook portrait / porcelain face / red flush round the eyes / red-rimmed eyes / red nose / heavy-lidded sad eyes / blunt black bob / straight fringe / silver bob / burlap hat / felt hat / chunky knit scarf / knitted mittens / tartan coat / plaid coat / sheet ghost / little glowing ghosts / ghost in a jar / glowing eyes / dark foliage / starry night sky / Midjourney sref 3822619412 look without an image model / oil pastel / oil-pastel portrait / oil pastel illustration / wax crayon portrait / dry brush portrait / bold dry brush strokes / textured colors / beautifully imperfect portraits / handmade aesthetic / paper tooth showing through / white specks of paper / saffron and navy / mustard and navy / striped scarf / chunky knit scarf / fingerless gloves / steaming paper cup / winter morning portrait / orange blush / red-orange lips / black crayon accents / figure vignette on white / Midjourney sref 2703086978 look without an image model / sketchbook doodle / sketchbook illustration / whimsical hand-drawn illustration / delicate ink lines / playful colors / charming characters / beautiful sketchbook aesthetic / so simple yet full of personality / fine ink line drawing / hair drawn strand by strand / rainbow-striped sweater / striped jumper / colored-pencil stripes / marker stripes / round pink blush / closed eyes with lashes / tiny red lips / leaf with vein hatching / thin line trees / steam curl / curled-up sleeping cat / small figure on a big empty page / Midjourney sref 1970397074 look without an image model" 时使用;也用于需要逐步画出(draw-on)动画的插画。单独说「剪纸」指剪纸拼贴、「刺绣」指十字绣、「丝网印刷 / screen print」指包豪斯几何;「打马赛克」是打码,不是马赛克画风;单说「蓝图」指蓝图工程图,「蓝晒 / 晒图」仍指蓝晒;「铅笔 / 素描」指铅笔素描,「彩铅」指韩国彩铅;「像素」仍指像素风,「1-bit / 黑白画图软件」指 1-bit 早期画图软件;「霓虹」仍指赛博朋克;「喷漆 / 街头涂鸦」仍指喷漆模板涂鸦,「圆珠笔 / 随手涂鸦 / 页边涂鸦」指圆珠笔涂鸦;「描图纸 / 硫酸纸 / 叠片 / 灯箱」指描图纸叠层(蓝图工程图那张描图布是晒成蓝图的,不是叠片);「Dot 风 / 粉彩界面 / 窗口卡片 / 发布会界面」指粉彩界面(纯色底 + 白色实心窗口卡片),要磨砂玻璃和弥散渐变仍用弥散玻璃;「阅卷 / 批改 / 答题卡 / 判卷 / 红笔打分」指阅卷批改,实验记录里的红笔圈和便利贴仍用实验笔记本,带「已付」橡皮章的小票拼贴仍用贴纸拼贴 · 小票;「皮影 / 皮影戏 / 影子戏」指皮影戏(透光的彩色驴皮人偶),黑纸剪出的侧影小像仍用剪影,彩纸剪贴仍用剪纸拼贴。「钢笔淡彩 / 淡彩速写 / 针管笔加水彩 / 线稿上色的速写小卡」指钢笔淡彩;单说「水彩」仍指水彩(风景、花卉的大片晕染),蓝铅笔稿 + 毛笔线 + 赛璐璐阴影的拟人小物仍用卡通手绘,「素描 / 铅笔」仍指铅笔素描。「水粉 / 复古水粉 / 绘本大头像 / 复古童书插画」指复古水粉(不透明水粉画的特写大头像);梵高式厚涂的风景、名画感仍用油画厚涂,扁平矢量、会挤压拉伸的小角色动画(「绘本动画」)仍用绘本角色动画,针管笔线稿加淡彩的速写小卡仍用钢笔淡彩,撞色多格的头像仍用波普丝网。「蓝调绘本 / 软蓝绘本 / 蓝色童书插画 / 绘本跨页」指蓝调绘本(软蓝限色的现代绘本跨页:干笔墨线 + 干蜡笔粉彩上色 + 白粉笔痕);单说「绘本」仍指绘本角色动画,「水粉 / 绘本大头像」仍指复古水粉,「编辑风 / Riso」仍指编辑风手绘,针管笔线稿加淡彩的速写小卡仍用钢笔淡彩,小孩自己画的蜡笔画仍用儿童蜡笔画。「江南园林 / 园林春景 / 中式园林插画 / 粉墙黛瓦 / 飞檐 / 月洞门 / 九曲桥」指江南园林(细笔数字水粉的园林春景:叶形小笔触堆出的繁茂树冠、繁花、垂柳、黛瓦飞檐、碧水倒影、层层远山);单说「水墨 / 山水」仍指水墨,单说「水彩」仍指水彩,动漫背景 / 赛璐璐天空仍指日本动漫,浮世绘仍是浮世绘;梵高式厚涂的风景仍用油画厚涂,皮影人偶的一场戏仍用皮影戏。「干刷色块 / 干笔色块 / 滚筒色块 / mid-century 海报插画」指干刷色块(米白纸上几大块干笔或滚筒刷出的限色色块,人物拆成几个大块面,背后一块纯色板、一旁一个小红方块);单说「水粉 / 绘本大头像」仍指复古水粉,「剪纸 / 彩纸拼贴」仍指剪纸拼贴,「丝网印刷 / screen print」仍指包豪斯几何,「Riso / 编辑风」仍指编辑风手绘,没有笔触的平滑几何色块仍用扁平矢量。「暮色微缩绘本 / 暮色绘本 / 黄昏转夜 / 昼夜交界 / 野花坡 / 细节放大图」指暮色微缩绘本(粉彩黄昏转入银河夜空、拼布山丘、几万朵小野花、很小的原创角色,加圆形放大图和手写小字);单说「绘本」仍指绘本角色动画,「蓝调绘本 / 软蓝绘本」仍指蓝调绘本,赛璐璐天空和夏日少年感仍用日本动漫,大片晕染的风景仍用水彩,整页的机械分解手稿仍用达·芬奇手稿,剖面和施工图仍用蓝图工程图。「排线夜景 / 彩铅或色粉夜景 / 短笔触夜空 / 夜景小版画 / 熔岩入海 / 精灵闪电 / 被照亮的云」指排线夜景(满画面顺着风向的短笔触、深蓝夜色里只有一个暖光、发光的丝和火星、碎的倒影、很小的人,装成带纸边和铅笔字的小版画);梵高式的厚涂漩涡和颜料浮雕仍用油画厚涂,明亮可爱的彩铅甜品仍用韩国彩铅,黑白石墨排线仍用铅笔素描,粉彩黄昏转入银河星空、满坡小野花仍用暮色微缩绘本,霓虹雨夜街道仍用赛博朋克。「Obsidian 风 / 笔记应用界面 / 深色笔记软件 / 双链笔记 / 关系图谱 / mermaid 代码块渲染成图」指笔记应用界面(深色主题的笔记应用窗口:文件列表、Markdown 正文、代码块切到阅读视图渲染成流程图、亮紫光点的关系图谱,只有一个紫色强调色);明亮的粉彩底和白色窗口卡片仍用粉彩界面,点阵无限白板上的卡片和弯曲连线用白板卡片,暖白纸面上的浅灰卡片图表用 Flexoki 纸面,磨砂玻璃和弥散渐变仍用弥散玻璃,绿屏荧光字符的老终端仍用绿屏终端 CRT,霓虹全息的未来界面仍用赛博朋克。「白板卡片 / 无限白板 / Canvas 视图 / 卡片和连线 / 点阵白板 / 分组框 / 带箭头的弯曲连线」指白板卡片(深色应用窗口里随镜头平移缩放的点阵白板:分组框、彩色边卡片、带箭头和标签的弯曲连线、清单 / 引用 / 草图卡片、右上角缩放按钮);笔记正文页、文件列表和关系图谱仍用笔记应用界面,暖白纸上的流程图、时序图和图表仍用 Flexoki 纸面,明亮的粉彩产品界面和检查结果仍用粉彩界面,一层层叠起来的图解仍用描图纸叠层。「Flexoki / Flexoki 纸面 / 暖白纸上的图解页 / Mermaid 那样的流程图、时序图、饼图、柱状图、对比表 / 讲解片里的图表页」指 Flexoki 纸面(暖白纸、墨黑字、不描边的浅灰圆角卡片,卡片里的图照轻量图表渲染器画:灰边框、墨线小三角箭头、普通标签,强调色只点在有意义的地方);手写粉笔的示意图仍用黑板板书,铅笔图表、荧光笔和便利贴仍用实验笔记本,彩色粉彩底、macOS 窗口和 ✓ / ✗ 徽章的产品界面仍用粉彩界面,深色笔记应用窗口仍用笔记应用界面,点阵无限白板上的卡片和连线仍用白板卡片,系统的微缩模型仍用等轴 2.5D,剖面和施工图仍用蓝图工程图。「暖调彩铅绘本 / 彩铅绘本 / 彩铅童书插画 / 巨物与小孩 / 大龟过河 / 纸齿白点 / 层层叠涂」指暖调彩铅绘本(暖白纸上满画面顺形体的彩铅叠涂、纸齿透出细白点、毛发成簇顺毛,大而温柔的生物和小小的孩子,黄昏暖光和橙黄的灯,没有墨线和黑色);单说「彩铅」仍指韩国彩铅(明亮可爱的甜品小物、粉嫩高光),黑白石墨仍用铅笔素描,软蓝限色、刮擦墨线加蜡笔颗粒的绘本跨页仍用蓝调绘本,粉彩黄昏转入星空、满坡小野花仍用暮色微缩绘本,不透明水粉的特写大头像仍用复古水粉,深蓝夜色里只有一个暖光的排线小版画仍用排线夜景;单说「绘本」仍指绘本角色动画。「彩色小镇 / 彩色房子 / 童话小镇 / 童话街景 / 彩旗街 / 钟楼小镇 / 水粉加描线的街景 / 有被这彩色小镇治愈到」指彩色小镇(水粉平涂加细墨线,密密的彩色房子堆上山坡,石板曼莎屋顶、白色钟楼、好几层三角彩旗、爬藤玫瑰和窗台花、湿街倒影);中式园林和古镇仍用江南园林,锡釉蓝砖上的运河小镇仍用代尔夫特蓝瓷砖,黑白刻版的雪村仍用黑白麻胶版画,彩纸剪出来的热气球小镇仍用剪纸拼贴,系统的微缩模型和小岛仍用等轴 2.5D,针管笔速写加淡彩的小卡仍用钢笔淡彩,水粉画的人物大头像仍用复古水粉,彩铅叠出来的黄昏小镇和巨物仍用暖调彩铅绘本,没有描线、没有笔触的几何色块仍用扁平矢量。「色粉小像 / 色粉画 / 绘本角色小像 / 人和宠物 / 猫围巾 / 白底不画背景、边上干笔散开的角色 / 大眼睛大腮红红鼻尖」指色粉小像(白纸上的半身角色小像,软色粉加一点水粉,大圆眼、大腮红、红鼻尖、一根根的发丝和蓬松的毛,柔和的粉蓝和奶油色里只有一组暖橙,边缘散进白纸);背后刷一块单色、看得见毛衣针脚的复古童书大头像仍用复古水粉,满画面彩铅叠涂、带天空和场景的黄昏绘本页仍用暖调彩铅绘本,软蓝限色、乱线墨线的绘本跨页仍用蓝调绘本,针管笔线稿加淡彩的速写小卡仍用钢笔淡彩,明亮可爱的彩铅甜品小物仍用韩国彩铅;「色粉夜景」仍指排线夜景,「粉彩界面」仍指产品界面。「诗意万圣夜 / 万圣节绘本 / 忧郁的瓷白脸 / 红眼眶红鼻头 / 黑色齐刘海波波头 / 粗麻帽子 / 发光的小幽灵」指诗意万圣夜(暗色画板上忧郁、超现实的秋夜绘本肖像:瓷白的脸泛红晕、半闭的厚眼皮、一整块的波波头、粗麻 / 针织 / 格子呢织物,靛蓝星空或深色叶丛里只有一处发光的点睛);白纸上不画背景、色调粉粉的角色小像仍用色粉小像,背后刷一块单色、大鼻子红脸蛋的复古童书大头像仍用复古水粉,满画面短排线、只有一个暖光的夜景小版画仍用排线夜景,粉彩黄昏转入星空的微缩风景仍用暮色微缩绘本,满画面彩铅叠涂的温暖黄昏童书页仍用暖调彩铅绘本。「油画棒 / 油画棒肖像 / 蜡笔干刷的人物 / 白纸上露着纸纹白点的粗笔触小像 / 橙黄配藏青」指油画棒肖像(浮在白色糙面纸上的人物小像:一道道平行干笔铺成的大块颜色里撒满纸纹白点,笔尾是硬的梳齿,藏红花黄、藏青、黑、一种冷蓝加橙色腮红和橙红嘴唇,黑色蜡笔只点在眼睛、眉毛和几处轮廓);同样白纸不画背景、但柔和粉粉、揉开的色粉小像仍用色粉小像,米白纸上几大块色加一块滚筒背景板的 mid-century 海报仍用干刷色块,小孩在糙纸上画的蜡笔画仍用儿童蜡笔画,梵高式厚涂的风景仍用油画厚涂。「手账线描 / 手账风 / 速写本小画 / 细线墨线加彩虹条纹 / 粉腮红闭着眼的小人」指手账线描(大片空着的暖米白纸上一个小人物和两三件道具:发丝细、略抖、不闭合的墨线,一根根分开的头发,彩铅和马克笔涂的彩虹条纹衣服,圆粉腮红、闭着的眼睛、小红嘴,单片叶子和细线小树);贴纸、小票、和纸胶带的「手帐拼贴」仍用贴纸拼贴 · 小票,橡木桌上针管笔加松散淡彩的速写小卡(「速写本小人」)仍用钢笔淡彩,满画面彩铅叠涂、带天空和场景的童书页仍用暖调彩铅绘本,白纸上粗笔干刷的人物小像仍用油画棒肖像,软色粉揉开、大圆眼的角色小像仍用色粉小像,草稿纸上的蓝色圆珠笔涂鸦仍用圆珠笔涂鸦。---# Claude 绘图@@ -92,6 +92,7 @@ description: Claude 绘图 / Claude Drawing —— 不借助任何生图模型| 色粉小像 · Pastel Vignette | `lib/pastelvignette.py` · `PastelVignette` | `examples/pastelvignette_marmalade_scarf.py` 橘猫围巾 · The Marmalade Scarf(1920×1080 的白底角色小像,软色粉加一点水粉:冷天的早上,一个年轻女人把她的大橘猫当围巾围在脖子上——猫头和两只前爪从她一边肩上垂下来,一只后爪和带深色环纹的尾巴从另一边垂在大衣前面;她朝猫歪着头、斜眼看它、抿着嘴笑,猫用一双圆圆的琥珀色眼睛抬头看她;蓝黑色的长波浪发,侧分的刘海斜过额头,大圆眼、深棕虹膜和白高光,两大圈腮红,红鼻尖,小嘴;浅粉蓝的大衣看得见顺着衣褶和袖子的干笔,大衣下摆在白纸上干笔散开,里面是奶油色的罗纹毛衣;猫毛先铺一层宽的软笔触,再一簇簇细毛、受光处的浅色毛尖、额头几道深色虎纹,轮廓蓬松地融进后面的头发和大衣,奶白的嘴套和爪子、粉色的耳朵里、白胡子;背后左边一枝桉树叶(夹几片赭黄的),右边一层很淡的铅笔小镇(几栋房子和一座圆顶塔),其余都是白纸;照色粉插画师的顺序画:空纸 → 铅笔起稿 → 桉树枝和铅笔小镇 → 平涂大块 → 塑形(揉开的脸、大衣的干笔)→ 猫毛 → 一绺绺的头发 → 五官 → 干笔高光和飞出来的几根头发;`--stages` 出 8 个阶段加成品) | 约 9 秒 || 诗意万圣夜 · Poetic Halloween | `lib/poetichalloween.py` · `PoeticHalloween` | `examples/poetichalloween_ghost_jar.py` 罐子里的小幽灵 · The Ghost in the Jar(1920×1080 的秋夜绘本肖像,暗色画板上的水粉加细排线:十月的最后一夜,一个苍白的孩子站在深色的树丛里,戴一顶软塌的粗麻钟形帽(帽檐垂着松开的麻线,一圈麻绳打了个小蝴蝶结),乌黑的齐耳波波头、刀切一样平的齐刘海,整块头发上一道柔和的光泽;瓷白的脸,眼睛一圈、鼻梁和脸颊泛着红晕(平滑的红加细密的红斑点),厚眼皮半闭、往外眼角垂,低头看着手里的罐子,虹膜里映着一点暖光,红鼻尖,不笑的小嘴;深红的粗针织围巾围到下巴,一头垂在胸前,深色格子呢外套(藏青、墨绿加细的锈红和赭黄线,斜纹织出来,格子随衣褶起伏),两颗牛角扣;一双深红针织手套从两边扶着一个玻璃罐,罐口蒙着粗麻布、用麻绳扎住,罐子里一个床单小幽灵发着光,暖光照亮手套、玻璃边和她的下巴;树丛里和星空中还有五个小幽灵(银色细丝的身子,琥珀色发光的眼睛,衣摆每个尖一颗光珠),身边的叶子被照成橄榄色和橙色,其余的叶子几乎是黑绿的,每片都往后面投一块影子;靛蓝夜空里有细的斜笔触和星星;照在暗色画板上作画的顺序画:画板 → 粉笔起稿 → 夜空和星星 → 深色叶丛 → 平涂大块 → 极简的体积 → 织物 → 五官 → 小幽灵和它们的暖光 → 前景叶子和最后几笔;`--stages` 出 9 个阶段加成品) | 约 10 秒 || 油画棒肖像 · Oil-Pastel Portrait | `lib/oilpastel.py` · `OilPastel` | `examples/oilpastel_warm_cup.py` 捧着一杯热的 · Something Warm to Hold(1600×1600 的白纸人物小像,油画棒干刷:冬天早上的露天市集,一个年轻女人把黑头发松松地挽成一个髻,双手捧着一个纸杯举到胸前,低头看着它,热气从杯口卷上来、飘过她的脸边;脸颊、鼻尖和耳朵冻得发红(两块排线的橙色腮红、一点橙红的鼻尖),平涂的橙红嘴唇,压低的厚眼皮下一对黑眼睛;藏红花黄的粗针织围巾在脖子上绕两圈、围到下巴,一头垂在胸前,上面是一段段藏青的短色条,末端一排流苏;藏青大衣用一道道长的平行干笔铺满,满是顺着笔拉长的纸纹白点,下摆一道道收成长短不一的梳齿;冷蓝的露指针织手套,一只手的四根手指绕在牛皮纸杯套前面,另一只手的拇指搭在上面,黑色塑料杯盖;没有背景,人浮在白纸上;照油画棒画家的顺序画:白纸 → 大衣和袖子 → 围巾 → 头发 → 肤色(背光一侧的桃色、脖子、耳朵、手指)→ 杯子和手套 → 条纹和罗纹 → 黑色蜡笔的点睛 → 五官 → 热气和最后几笔飞出来的头发;`--stages` 出 9 个阶段加成品) | 约 6 秒 |+| 手账线描 · Sketchbook Doodle | `lib/sketchbook.py` · `Sketchbook` | `examples/sketchbook_reading_hour.py` 读书的午后 · The Reading Hour(1600×1600 的速写本一页,大片暖米白纸空着,画都在下半部:一个女孩坐在小木凳上读书,双手把书举在胸前,低着头、闭着眼,读得入了神;中分的黑色长发一根根垂过肩膀,一侧别着一朵橙色小雏菊发夹;彩虹条纹毛衣(红、黄、青绿、橙、品红、蓝,条与条之间留着纸白,袖子上的条纹绕着胳膊转,有的冲出墨线、有的够不到),红色罗纹领口、芥末黄袖口;书是青绿色封面,上面画着一个小太阳,手指搭在封面边上,书拿得有点歪;蓝色百褶裙,白袜子、红鞋,一只脚垂得高一点、两只脚尖朝里;她的灰色虎斑猫在旁边地上团成一团睡着,旁边一杯冒热气的马克杯,热气一直卷到空白的纸上;另一边一盆植物伸出几片叶子(一片只用墨线画出人字形叶脉、一片蓝色的叶脉留白)和一个红花苞;右上方飘下一片黄叶;不画地面和背景;照速写本插画的顺序:空纸 → 细墨线线稿(脸、脖子、毛衣和袖子、书和手指、裙子、腿、鞋、后面的凳子)→ 一根根的头发 → 彩铅 / 马克笔的条纹 → 其他颜色(裙子、领口袖口、书皮、鞋、凳子)→ 猫 → 植物 → 马克杯和热气 → 脸(闭眼、鼻子、腮红、小嘴)→ 飘落的叶子和一个小涂鸦;`--stages` 出 9 个阶段加成品);`examples/sketchbook_kite_day.py` 放风筝 · Kite Day(1920×1080 的宽页,给讲解片用:一个穿条纹上衣、芥末黄短裤的小男孩站在空白页的左边,一只胳膊举着线轴,仰着头冲他的风筝笑;风筝飞在右上方,是红、黄、青绿、蓝四块的菱形,拖着一条挂着小蝴蝶结的长尾巴,一根发丝细的风筝线横穿整页;他身后两棵红线和绿线画的细树(绿的那棵点着粉色花苞),右边远处一棵小黄树,几丛草,两片叶子被风吹着走,两道轻轻的风;`--stages` 出 8 个阶段加成品) | 约 2.4 秒 / 约 1.4 秒 |各画风共用 `lib/core.py` 里的底层工具:噪声、模糊、样条曲线、多边形遮罩、有机轮廓 `blob_pts`、毛笔 `bristle_stroke`、中文字体查找;新四种还用到补零平移 `shift`、文字遮罩 `text_mask`、西文字体查找 `latin_font`/`load_font`,以及高度图打光 `height_normals`、`height_shadow`(沿光线步进的投影)、`ambient_occlusion`。@@ -173,7 +174,8 @@ description: Claude 绘图 / Claude Drawing —— 不借助任何生图模型- 治愈、明亮、「细节多到看不完」的童话街景:一座彩色的欧洲小镇、节日的街道、雨后的广场、钟楼和台阶,满街彩旗、玫瑰、花箱和阳台,要一眼就是「手画的水粉插画加细细的描线」,竖幅海报、小红书封面、旅行 / 城市 / 节日 / 「理想的生活」的配图,讲解片里「一个地方 / 一个社区 / 很多人一起生活」的页 → 彩色小镇(要中式园林、古镇和春水用江南园林;要锡釉蓝砖上的运河小镇用代尔夫特蓝瓷砖;要彩纸剪出来的小镇用剪纸拼贴;要系统的微缩模型用等轴 2.5D;要针管笔速写加淡彩的小卡用钢笔淡彩;要没有描线的几何色块用扁平矢量;要彩铅叠涂的黄昏小镇用暖调彩铅绘本);- 一两个讨喜的角色的小像:一个人和他的小动物(猫、狗、狐狸)、温柔的一刻(抱着、依偎、对视)、人设卡和头像,要一眼就是「绘本里的色粉加一点水粉」——白纸上不画背景,画到边上就干笔散开,大圆眼、大腮红、红鼻尖,一根根的发丝和蓬松的毛,柔和的粉彩色里只有一种暖橙,讲解片里「这个人 / 这只宠物 / 陪伴」的页,小红书头像和封面 → 色粉小像(要复古童书味、背后刷一块单色、看得见毛衣针脚的大头像用复古水粉;要满画面彩铅叠涂、有天空有场景的黄昏绘本页用暖调彩铅绘本;要软蓝限色、乱线墨线的绘本跨页用蓝调绘本;要针管笔线稿加淡彩的速写小卡用钢笔淡彩;要明亮可爱的彩铅甜品小物用韩国彩铅);- 秋天和万圣节的夜晚、忧郁又有点超现实的一刻:一个苍白的孩子或年轻人独自站在夜里,手里捧着一点光或一个发光的小东西,身边有几个发光的小幽灵,要一眼就是「诗意的万圣节绘本」——瓷白的脸上一圈红晕、半闭的厚眼皮、刀切的黑色波波头,摸得着的粗麻帽子、粗针织围巾、格子呢外套,暗沉的靛蓝夜空和深色叶丛里只有一处暖光,讲解片里「孤独 / 守护 / 秋天 / 夜晚」的页,万圣节海报、头像和小红书封面 → 诗意万圣夜(要白纸上不画背景、粉粉的温柔角色小像用色粉小像;要背后刷一块单色、看得见毛衣针脚的复古童书大头像用复古水粉;要深蓝夜色里只有一个暖光、满画面短排线的小版画用排线夜景;要粉彩黄昏转入星空、满坡小野花的微缩风景用暮色微缩绘本;要满画面彩铅叠涂、温暖治愈的黄昏童书页用暖调彩铅绘本);-- 一个人的小像或半身像(街上的路人、冬天捧着热饮的人、戴帽子的姑娘、「一个人在做一件小事」),人设卡、头像和小红书封面,要一眼就是「手画的油画棒 / 蜡笔干刷」——白纸上不画背景,颜色收得紧而浓(藏红花黄、藏青、黑、一种冷蓝,橙色腮红、橙红嘴唇),大块颜色用粗笔一道道铺满、露着纸纹白点,笔触收尾干而硬,黑色蜡笔只点在眼睛和几处轮廓,脸简化、略歪、有表情,讲解片里「这个人 / 用户画像 / 一个普通人的一刻」的页 → 油画棒肖像(要柔和粉粉、揉开的色粉加一个小动物用色粉小像;要米白纸上几大块色、背后一块滚筒色板的 mid-century 海报用干刷色块;要背后刷一块单色、看得见毛衣针脚的复古童书大头像用复古水粉;要小孩画的蜡笔画用儿童蜡笔画;要梵高式的厚涂漩涡用油画厚涂)。+- 一个人的小像或半身像(街上的路人、冬天捧着热饮的人、戴帽子的姑娘、「一个人在做一件小事」),人设卡、头像和小红书封面,要一眼就是「手画的油画棒 / 蜡笔干刷」——白纸上不画背景,颜色收得紧而浓(藏红花黄、藏青、黑、一种冷蓝,橙色腮红、橙红嘴唇),大块颜色用粗笔一道道铺满、露着纸纹白点,笔触收尾干而硬,黑色蜡笔只点在眼睛和几处轮廓,脸简化、略歪、有表情,讲解片里「这个人 / 用户画像 / 一个普通人的一刻」的页 → 油画棒肖像(要柔和粉粉、揉开的色粉加一个小动物用色粉小像;要米白纸上几大块色、背后一块滚筒色板的 mid-century 海报用干刷色块;要背后刷一块单色、看得见毛衣针脚的复古童书大头像用复古水粉;要小孩画的蜡笔画用儿童蜡笔画;要梵高式的厚涂漩涡用油画厚涂);+- 一个小人物的小日常(读书、喝茶、浇花、撸猫、放风筝,「一个人慢慢地做一件小事」),手账、日记和读书笔记的配图,小红书封面和头像,讲解片里「轻松的小场景 / 生活方式 / 慢下来」的页,要一眼就是「手账风 / 速写本里的小画」——大片空着的暖米白纸,发丝细、略抖、不闭合的墨线,一根根分开的头发,彩铅马克笔涂的彩虹条纹衣服,圆圆的粉腮红、闭着的眼睛和小红嘴,道具只有两三件(单片叶子、小花、细线小树、一缕热气、团着睡觉的猫) → 手账线描(要橡木桌上的速写小卡、针管笔加松散淡彩、搞笑的街坊用钢笔淡彩;要满画面彩铅叠涂、天空和场景俱全的温暖童书页用暖调彩铅绘本;要软蓝限色、乱线墨线的绘本跨页用蓝调绘本;要白纸上粗笔干刷的人物小像用油画棒肖像;要软色粉揉开、大圆眼的角色小像用色粉小像;要小孩画的蜡笔画用儿童蜡笔画;要草稿纸上的圆珠笔涂鸦用圆珠笔涂鸦)。每种画风一幅范例作为质量基准(范例都不用禅意主题);水墨另加一幅「月印万川」(留白托月、水面倒影)。@@ -1372,6 +1374,25 @@ from core import spline, curve, blob_pts, fbm1d, blur, polygon_mask- 颜色用 `PAINTS` 里的名字(paper white black charcoal warmgrey grey;navy_deep navy navy_light indigo cobalt cool_deep cool cool_light mist;saffron_deep saffron marigold yellow butter orange ochre;skin_pale peach_light peach peach_deep skin_tan skin_brown skin_deep blush blush_light vermilion lip lip_dark;olive moss kraft kraft_dark rust)或 '#rrggbb'。- 范例的场景脚本先把所有形状的遮罩算好(`plan()`),再按从前往后的遮挡算出每块「看得见的部分」(手指 > 近处的手套 > 拇指 > 杯子和杯盖 > 远处的手套 > 两只袖子 > 围巾垂下的一头 > 两圈围巾 > 脸 > 耳朵 > 脖子 > 头发 > 大衣),每一层只往自己看得见的部分上画;大衣下摆和袖子用 `spill` 冲出去,同时 `avoid` 它们前面的东西(不然会冲进手套和杯子留出来的空里);遮罩一赋值就存成 uint8,算完遮挡就删掉后面用不到的整形状。+**手账线描 `Sketchbook`**:+- 思路:照画速写本小画的顺序画(空纸 → 细墨线线稿 → 一根根的头发 → 彩铅 / 马克笔的条纹 → 其他颜色 → 道具 → 脸 → 飘着的小东西),画只占纸的一小块,其余都空着:不画地面、不画背景、不加边框。+ - 纸:暖米白、带一点粉(`#f2e9e1`),直方图均衡过的细纸纹 `T`(彩铅挂在纸纹上,墨线在最深的纸坑里断一点),极淡的大尺度斑驳和零星几根纤维;空白纸角上的明暗起伏约 1.9 级(参考图 0.1–3.0 级),纸色均值 (242, 233, 225),落在参考图的范围里。+ - 墨线:路径先过样条、按 1 px 重采样,再沿法向推一个慢的手抖(`wobble` px,`wscale` 是它的长度)加一点快的颤(`tremor`);起笔有一小段从细到粗(`taper[0]`),收笔一长段挑出细尖(`taper[1]`),中间粗细 ±12 % 慢慢变,墨色深浅也慢慢变(`flow`);`gaps` 让笔偶尔抬起来、断开几 px。很多根线一次画:按颜色分组,每根线切成粗细和深浅都不变的几段,Pillow 在 4 倍超采样的图层里一段一段画(`joint='curve'`),box 缩回原尺寸,在最深的纸坑里断一点(`grain`),再正片叠底进画面——墨是透明的,底下的颜色还在,压在颜色上的线照样黑。`clip` / `avoid` 让线只画在某块里、或绕开前面的东西(`grow()` 把前面东西的遮罩扩几 px,线就停在它前面一点)。`contour()` 把一个闭合轮廓画成一到三笔,接口要么留一个小缺口、要么两笔搭过头,不是一个严丝合缝的矢量圈。+ - 彩铅 / 马克笔:给一块覆盖率目标(一条色带、一个形状),沿笔的方向建 (u, s) 坐标,查一张可平铺的噪声纹理:沿笔拉得很长的道子(每一道自己的压力)加一层顺笔拉长的细颗粒;颜料挂在纸纹凸起上(`grain` 高:彩铅,留白点)或者平平地铺着(`grain` 低:马克笔,只有道子);`hatch` 叠一层看得见的平行排线(每 `spacing` px 一道)。颜色正片叠底,所以红压黄会变橙,和真的彩铅一样。+ - 条纹:`stripes()` 沿坐标 `s` 排一条条色带——`across` 给角度(90 = 横条从上往下排),`bend` 把条纹弯成微笑(+)或皱眉(−),`path` 给一条中心线(袖子:条纹绕着胳膊转,s 是投影到中心线上的弧长);每条带取下一个颜色(`order='cycle'` 或 `'random'`)、`band` 里的宽度(或 `widths` 列表)、`gap` 里的纸白间隔、自己的一点倾斜(`tilt`)、自己的颗粒和压力;上下两条边各自按一条噪声游移(`rough` px);两头在衣服遮罩的模糊版上按自己的阈值重新取边,所以每条都冲出墨线一点或够不到一点(约 `overrun` px),整层还可以 `shift` 几 px(套色错位)。+ - 道具:`leaf()` 一片叶子:墨线或彩色线的轮廓(叶尖留个小缺口)、主脉、一对对斜向叶尖的侧脉(人字形排线),可选错开一点的彩铅填色,或者在填色里把叶脉留白(`vein='white'`);`flower()` 一朵小花:'rose' 涂鸦式的螺旋加两片松的花瓣,'daisy' 一圈花瓣圈加一个黄点,'tulip' 彩铅填的三尖杯形,可带茎和小叶;`tree()` 一棵细线树:几根大致平行、各自抖动的线组成树干,往上分出枝和小杈,枝头一个小分叉,可点几颗花苞;`steam()` 一缕热气:懒洋洋的 S 形往上,顶上卷一个松的圈(`curl` 是圈数),`strands` 大于 1 时再加几缕更淡、更短、不卷的;`ticks()` 在一块里撒短毛刺(猫毛、草);`squiggle()` 空白纸上的小涂鸦:螺旋、四芒小星或一个小圈——不写假字。+ - 五官:`eye_closed()` 一道往下弯的弧(闭着的眼)加外眼角几根往下往外的睫毛;`eye_dot()` 一个小黑点;`mouth()` 马克笔涂的小红嘴(上唇两个小峰、下唇圆一点、中间一道深一点的线);`blush()` 一颗圆粉腮红:边缘清楚但不硬,细颗粒,边上深一点(`rim`);`hair()` 一绺头发:在两条或多条导线(从发根到发梢,按横过这一绺的顺序)之间插出 n 根细线,每根从发根附近出发(`start`),在自己的长度处结束(`length`),按 `wave`(振幅 px,周期 px)起伏——相邻的线相位差不多(`cohere` 是横过这一绺相位转几圈),所以一起起伏、不乱成一团——起伏从发根(`wave_root`)到发梢慢慢变大,发梢一长段收尖;`stray` 是飞出去的几根。+ - 收尾:`finish()` 只记参数、在 render 里加(每张阶段快照都和成品一致,要在画第一笔之前调用):极淡的纸面颗粒和极轻的柔化。+- 构造:`Sketchbook(W, H, seed, keep_stages=True, stages_dir=None)`(总像素不超过 4096²),先 `finish()` 再 `paper(tone, tooth, mottle, fibres)`。坐标是整张画布的像素,角度用度(0 向右、90 向下)。+- 遮罩:`poly(pts, smooth)`、`ellipse(cx, cy, rx, ry, rot)`、`blob(cx, cy, rx, ry, rough)`、`tube(path, w0, w1)`(`w0` 可以是一串沿路径的宽度)返回画布大小的浮点遮罩;`tube_pts()`、`ellipse_pts()`、`closed_pts()` 返回轮廓点(拿去给 `ink()` / `contour()` 描线);`soften(mask, sigma)`、`grow(mask, px)`。+- 线:`ink(path, width, colour, alpha, wobble, wscale, tremor, taper, wvar, flow, grain, gaps, smooth, closed, clip, avoid)`;`inks(paths, …)` 一次画很多根(`width` / `alpha` 可以是 (lo, hi) 或每根一个的列表,`colour` 可以是每根一个的名字列表或随机取的一组);`contour(pts, pieces, gap, overlap, p_gap, smooth, closed, …)`。+- 上色:`stripes(mask, colours, across, path, bend, band, gap, tilt, rough, overrun, grain, streak, pressure, shift, start, order, widths, clip, avoid)` 返回各条带的 (s0, s1, 颜色);`tint(mask, colour, angle, strength, grain, streak, pressure, hatch, spacing, overrun, shift, edge, clip, avoid)`;`blush(cx, cy, r, colour, strength, ry, grain, rim)`;`dots(pts, r, colour, strength)`。+- 五官:`eye_closed(cx, cy, w, sag, lashes, side, rot, width)`(`side` 是外眼角朝哪边);`eye_dot(cx, cy, r)`;`mouth(cx, cy, w, h, colour, rot, smile)`;`hair(guides, n, width, colour, wave, wave_root, length, start, spread, stray, alpha, taper, jitter, cohere, clip, avoid)`。+- 道具:`leaf(base, tip, width, fill, line, veins, vein, vein_colour, bend, asym, stem, lw, fill_shift, strength, grain, hatch, rib)` 返回叶子的遮罩;`flower(x, y, r, colour, kind, stem, stem_colour, leaves, lw)`;`tree(x, y, height, colour, lines, branches, lean, spread, width, trunk, blossoms, n_blossom)`;`steam(x, y, height, colour, sway, curl, width, alpha, strands, lean)`;`ticks(mask, n, length, angle, spread, width, colour, alpha)`;`squiggle(x, y, size, colour, kind)`。+- 收尾:`finish(grain, soft)`;`render()`、`composite()`、`stage(name)`、`save(path, stages_dir)`;`save('x.jpg')` 默认 quality 88、4:4:4 色度。+- 颜色用 `PAINTS` 里的名字(paper paper_light white;ink ink_soft sepia graphite grey forest_ink;red scarlet vermilion coral orange yellow gold mustard teal turquoise aqua blue cobalt navy sky magenta pink rose violet;cheek blush lip;leaf olive sage moss forest terracotta ochre tan wood cream ginger stone)或 '#rrggbb'。+- 范例的场景脚本先把所有形状的遮罩算好(`plan()`,存成 uint8),描每一层的线时把它前面所有东西的遮罩 `grow()` 一点传给 `avoid`(书和手指 > 袖子 > 头发 > 脸 > 脖子 > 毛衣 > 裙子 > 腿和鞋 > 凳子),上色时也 `avoid` 前面的东西;头发只绕开「看得见的脸」(脸的椭圆减去发际线以上),所以额头上方被头发盖住;浅色要放在深色上时(黑发里的小雏菊发夹、青绿书皮上的黄太阳)先在深色里把位置留出来,因为颜色是正片叠底,叠上去只会更暗。+**顺序**:都是先远后近、先大后小,文字最后叠加。水墨的雾要画在它该吞没的东西之后;水彩的叶梗要先画,并且只画在叶子外面。## 三、毛病清单(都真实出现过)@@ -2656,6 +2677,23 @@ from core import spline, curve, blob_pts, fbm1d, blur, polygon_mask| 大衣两侧下角多出一块方角(肘部) | 袖子遮罩乘上大衣遮罩;大衣轮廓的闭合样条在下角过冲,补几个点 || 峰值内存 0.99 GB | 场景里画布大小的遮罩从 float16 改存 uint8,算完遮挡只留看得见的部分和几个后面要用的整形状;光栅化每带 0.9M → 0.6M 子像素:0.76 GB,成品和改之前只差 p99 6 级 |+**手账线描**++| 问题 | 改法 |+|---|---|+| 头发从中缝往两边分,头顶却是一块光秃秃的圆额头,两绺头发像两只角 | 中缝落在额头上的那一点往下挪(y 527 → 548),发际线从这里斜着扫过额头到太阳穴,像两片窗帘;头发只绕开「看得见的脸」(脸的椭圆减去发际线以上),不再绕开整张脸 |+| 头发一卷一卷像烫过:振幅 4.2 px、周期 64 px,横过一绺相位转 2.5 圈 | 周期 110 px、振幅 5 px,`wave_root` 0(头顶上是直的,越往下越弯),`cohere` 0.6;每侧 34 根 |+| 手指是一排白色大爪子(每只手 4 根,18–23 px 长、13 px 粗) | 每只手 3 根,13–15 px 长、约 9 px 粗,随书一起歪 |+| 青绿书皮上的黄太阳变成了绿色;黑发里的黄色小花发夹看不见 | 颜色是正片叠底,浅色压在深色上只会更暗:先在书皮的填色和头发里留出那一块(`avoid=`),再画太阳和发夹 |+| 凳子中间那条后腿从她两条腿之间露出来,像她长了第三条腿 | 去掉,凳子只画前面两条腿和一根横档 |+| 袖子用 `tube_pts()` 的闭合轮廓描线,起头那一端在肩上横着画了一道 | 袖子的轮廓画成一根不闭合的线(两条边加袖口),起头藏在肩里 |+| 叶子的侧脉从叶子里戳出去、射到很远 | 侧脉终点写成「叶缘点 × w + 主脉点 × 0.1」,权重加起来不是 1,点被拉向原点:改成 w 和 1 − w |+| 整个人左右完全对称(两只袖子、两条腿、两只鞋互为镜像),像一个矢量图标 | 一条腿垂得高一点、往外一点,两只脚尖朝里;书歪 −4°;右胳膊单独给坐标,不镜像 |+| 两缕热气都在顶上卷一个小圈,像两根弹簧 | 只有第一缕卷,卷的半径跟着高度走(至少高度的 9 %),其余几缕更淡、更短、不卷 |+| 腮红像一团抹开的淡粉(强度 0.72、边缘模糊 0.9 px) | 强度 0.95、边缘模糊 0.7 px:一颗边缘清楚的圆粉点 |+| 放风筝的男孩:几绺头发各画各的,头顶露缝,像一顶假发;红嘴唇在男孩脸上像口红 | 一次 `hair()` 用六条导线从后颈一路扇到刘海,相邻导线之间都有头发(两边分开的地方自然翘起一撮);嘴改成一道上弯的线加线下一点红 |+| 正方形整页缩到动图的 405 px(0.25 倍),发丝细的墨线淡得几乎看不见 | 动图先裁出画周围 1100×1100 的一块再缩(0.37 倍),见第四节 |+## 四、做成动画- 各画风都有 `stage(name)` 和 `save(path, stages_dir)`,按阶段依次淡入叠化,就是「一幅画被逐步画出来」。README 里的动图就是这样做的。@@ -2762,6 +2800,12 @@ from core import spline, curve, blob_pts, fbm1d, blur, polygon_mask- 调色板:第一帧是空白纸,只给 12 色;228 色只从和它不同的像素里切(末帧 ×3、饱和色 ×3——藏红花黄的围巾、橙色腮红、橙红嘴唇、冷蓝手套、牛皮纸杯套,暗色 ×2——藏青大衣和黑头发,白点就落在它们上面);再留 15 色,其中 4 个是强制的(蜡笔黑、纸白、藏红花黄、唇红),另外 11 色只从末帧误差超过 14 级的像素里切;最后 1 色是纯品红,当「和上一帧相同」的透明占位色。- 固定 4×4 Bayer(约 ±2.4 级),末帧不加抖动、精确发送(差 0.5 级以上就重发)。和屏上已显示颜色差不到 5 级(叠化帧)或 3 级(关键帧)的像素沿用上一帧;整帧都没变的叠化帧不单独发,时长并到上一帧。- 结果:42 帧,14.75 秒,约 0.43 MB,按解码结果逐帧自检(和应显示的画面最大差 0),末帧误差中位数 0、p99 12。画只占中间 405 px、四周又是白纸,所以小。+- 手账线描的动图(脚本在 `workspace_projects/arte5/work/make_gif_sketchbook.py`):+ - 读书的午后是正方形(1600×1600),整页缩到 405 px 是 0.25 倍,发丝细的墨线会淡得几乎看不见:先裁出画周围 1100×1100 的一块(x 250–1350、y 420–1520,这块的边上都是空纸),再缩成 405×405 放在 720×405 的正中,两边 157 / 158 px 用第一张(空白纸)从画自己的边上往外镜像出去,没有接缝,补的边每帧都不变。放风筝本来就是 16:9,直接缩成 720×405。+ - 阶段:读书的午后是 空纸 → 墨线线稿 → 头发 → 条纹 → 其他颜色 → 猫 → 植物 → 马克杯和热气 → 脸 → 成品(飘落的叶子和小涂鸦);放风筝是 空纸 → 男孩的墨线 → 头发 → 条纹 → 其他颜色 → 脸 → 树和草 → 风筝和线 → 成品(尾巴、风里的叶子和两道风)。每段 900 毫秒加 5 帧叠化,末帧停 2600 毫秒;叠化一片片铺上去,和油画棒肖像的做法一样。+ - 调色板:第一帧是空白纸,只给 12 色;228 色只从和它不同的像素里切(末帧 ×3、饱和色 ×3——条纹、腮红、红嘴和红鞋、风筝,暗色 ×2——墨线和头发,它们细,颜色一少就淡进纸里);再留 15 色,其中 2 个是强制的(纸色和墨色,都在画上量出来),另外 13 色只从末帧误差超过 12 级的像素里切;最后 1 色是纯品红,当「和上一帧相同」的透明占位色。+ - 固定 4×4 Bayer(约 ±2.4 级),末帧不加抖动、精确发送;和屏上已显示颜色差不到 5 级(叠化帧)或 3 级(关键帧)的像素沿用上一帧。+ - 结果:读书的午后 40 帧、14.75 秒、0.33 MB,末帧误差中位数 0、p99 14;放风筝 34 帧、13.40 秒、0.31 MB,中位数 0、p99 8;都按解码结果逐帧自检(和应显示的画面最大差 0)。- 绘本角色动画的动图是真动画,不是阶段叠化:`Storybook.gif()` 按时间逐帧渲染,720×405、15 fps(GIF 延时只能写厘秒,按累计取整写成 7、7、6 厘秒交替),共用一张加权调色板 + 固定 4×4 Bayer,没变的像素记成品红透明,151 帧(动作 9.95 秒 + 末帧停 1.4 秒)约 0.56 MB;范例加 `--gif out.gif` 出这张,`--stages` 的关键帧仍可喂给上面的阶段动图工具。- 形变动画可以直接出真动画:`Morph.at(keys, T)` 给出全局时间 T 的轮廓,逐帧渲染即可。- 更细的逐笔动画:把一组笔画单独画到透明层上导出,再用 Motion Canvas 遮罩按顺序显现。这个还没做成现成接口。@@ -2848,6 +2892,7 @@ lib/colortown.py 彩色小镇(id 图光栅化的不透明色块:Pillowlib/pastelvignette.py 色粉小像(直方图均衡的白纸纸纹与存成 uint8、沿 8 个方向拖开的纸纹,颜料缓冲;按段编号的 id 图光栅化:Pillow 把每一笔的每一段按序号画进 2 倍超采样的整数 id 图,numpy 查回这一段,算出沿笔压力曲线(两头收圆)、两侧软边和越干越开的鬃毛条纹,色粉只挂在压力够得着的纸纹上,bincount 汇回像素,大批按 y 分带;近乎不透明的色粉混色;揉开的平滑色层(按场取色、纸坑留浅、边缘按纸纹断开)和按软穹顶光取色阶的塑形;干边与不长孤岛的游走边、按渐隐场逐像素减压变干的散开;漂移、函数、放射、等值线(只在形状附近算)方向场与双倍角混合;按流向场积分、成绺(共用起点、偏移、弯曲和明暗)、暗先亮后的发丝和飞丝;根散尖聚、背光侧暗的毛簇;从轮廓里侧取色往外长的蓬松边;带灰蓝眼皮影、放射纹虹膜、外眼角挑出眼线和双高光的大圆眼,色粉带加细毛的眉毛,粉状大腮红,鼻梁软影加红鼻尖,小嘴;平滑的细圆笔线、几笔叠成的淡铅笔线;受光一侧浅、带浅色叶脉的叶子和带叶的枝条;轻微柔化、细颗粒、只上在颜色上的一点暖色)lib/poetichalloween.py 诗意万圣夜(直方图均衡的暗色画板纸纹与存成 uint8、沿 8 个方向拖开的纸纹,单像素细点子纹,颜料缓冲;和色粉小像同一套按段编号的 id 图光栅化,按 y 分带;取画布颜色「再画一遍」的笔触,以白为参照的乘法混色;按行分带的平滑色层和按软穹顶光取色阶的塑形,只在形状附近做的模糊;整块头发的窄带光泽和顺发流拉开的淡笔触、成绺的低对比发丝;重眼皮杏仁眼(眼皮盖住半个虹膜、外眼角下垂、湿红的下眼睑、虹膜里映出的暖光),平滑加单像素斑点的红晕和软斑、软环场,自成体积的长鼻子和红鼻尖,不笑的小嘴;粗麻平纹(各自粗细、有疙瘩、游走、一上一下交织的线,高度场打光,黑孔、纤维、毛边,可顺弧线织)、粗针织 V 形针脚与罗纹、镜像 sett 的 2/2 斜纹格子呢、从轮廓长出的纤维、顺管子弯的坐标;宽裂片重锯齿的掌状叶(压扁、对折、叶脉、投影)和从后往前的叶丛;陡衰减的暖色点光源、按接受度照亮已画好的东西、发光缓冲;银色细丝的半透明床单小幽灵(发光的眼睛、每绺末端的光珠);星星;柔化、三档光晕、印刷颗粒和暗部更显的粗纸纹、提亮的黑,按行分带算)lib/oilpastel.py 油画棒肖像(直方图均衡的白纸纸纹、沿 8 个方向拖得更长的纸纹(uint8);和色粉小像同一套按段编号的 id 图光栅化,按 y 分带;宽度不变的棒:钝而饱满的起笔、略摆的两侧,分道的磨损面(每道自己的压力、明暗、第二色和终点:一道道断掉的硬梳齿笔尾),陡阈值的纸纹露白,已有蜡的地方吃蜡更多;近乎不透明的蜡混色和带底色的拖色;按噪声加纸纹断开的裁边、每段边冲出距离各不相同的 spill;平行干笔铺色、给定路径的干笔;抖动、分段搭接、粗细不一、偶尔断开和补笔的黑色蜡笔线;排线腮红、短色条、干刷投影、热气;压低眼皮的黑眼睛、粗眉、平涂嘴唇、收尖的长发丝;渲染时透出的纸纹、按颜色深浅减弱的蜡厚度、颗粒和极轻的柔化)+lib/sketchbook.py 手账线描(暖米白纸:直方图均衡的细纸纹、极淡的斑驳和纤维、一张可平铺的道子纹理;墨线:样条加慢手抖和快颤、起笔细收笔挑尖、粗细和墨色慢慢变、偶尔抬笔断开,按粗细和深浅不变切段、在 4 倍超采样图层里画,纸坑里断一点,正片叠底;一到三笔、接口留缺口或搭过头的轮廓;沿笔方向的 (u, s) 坐标里的彩铅 / 马克笔:长道子、顺笔细颗粒、挂纸纹或平铺、可选排线,颜色正片叠底;按角度、弯度或中心线排的彩虹条纹,每条自己的颜色、宽度、倾斜、颗粒、压力、两条游移的边和自己的出界阈值;圆粉腮红、圆点、闭眼弧线和睫毛、小红嘴;在导线之间插出、和相邻的线同相起伏、发梢收尖的一绺发丝;带人字叶脉或留白叶脉的单片叶子、螺旋 / 雏菊 / 郁金香小花、细线树、带卷的热气、短毛刺、小涂鸦;渲染时的纸面颗粒和极轻的柔化)examples/*.py 范例脚本;*.jpg 成品;drawing_*.gif 逐步画出的动图中文字体:自动找 Kaiti/Songti(macOS)、Noto CJK(Linux)、KaiTi/SimSun(Windows),或设 INKPAINT_FONT西文字体(后来新增的画风用):core.latin_font(style) 按 sans / sans_bold / rounded / script / hand / typewriter 等找系统字体,可用 INKPAINT_FONT_<STYLE> 指定;字体文件不要放进仓库diff --git a/examples/drawing_sketchbook_kite_day.gif b/examples/drawing_sketchbook_kite_day.gifnew file mode 100644index 0000000..4ff9d52Binary files /dev/null and b/examples/drawing_sketchbook_kite_day.gif differdiff --git a/examples/drawing_sketchbook_reading_hour.gif b/examples/drawing_sketchbook_reading_hour.gifnew file mode 100644index 0000000..8b2516aBinary files /dev/null and b/examples/drawing_sketchbook_reading_hour.gif differdiff --git a/examples/sketchbook_kite_day.jpg b/examples/sketchbook_kite_day.jpgnew file mode 100644index 0000000..f822384Binary files /dev/null and b/examples/sketchbook_kite_day.jpg differdiff --git a/examples/sketchbook_kite_day.py b/examples/sketchbook_kite_day.pynew file mode 100644index 0000000..bf54951--- /dev/null+++ b/examples/sketchbook_kite_day.py@@ -0,0 +1,247 @@+"""Example (sketchbook doodle): 放风筝 · Kite Day -- a wide sketchbook page (16:9, for explainer videos).++A small boy in a striped top and mustard shorts stands near the left of a big empty page, one arm up with the spool,+head tipped back, smiling up at his kite. The kite -- a diamond quartered in red, yellow, teal and blue, with a long+wavy tail of little bows -- flies high on the right, and the string, one hair-fine line, crosses the whole page to it.+Behind him two thin trees drawn in red and green lines (pink blossom dots on the green one), a little yellow tree far+off on the right, a few tufts of grass, two leaves blown along on the wind. No ground, no sky: the paper is the sky.++Drawn in the order a sketchbook illustrator works: the paper -> the ink line drawing of the boy -> his hair -> the+stripes -> the other colour (shorts, socks, shoes, the spool) -> his face -> the trees and the grass -> the kite and+its string -> the tail, the leaves on the wind. --stages writes those steps as snapshots for the draw-on. No image+model.+python3 sketchbook_kite_day.py [out.jpg] [--stages DIR]+"""+import os, sys, time+sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'lib'))+import numpy as np+from sketchbook import Sketchbook++W, H = 1920, 1080+HEAD = np.array([566.0, 598.0]) # centre of his face+TILT = -12.0 # head tipped back, looking up at the kite+++def rot(pts, deg=TILT, c=HEAD):+ a = np.deg2rad(deg); cs, sn = np.cos(a), np.sin(a)+ P = np.asarray(pts, np.float32) - c+ return np.stack([P[:, 0] * cs - P[:, 1] * sn, P[:, 0] * sn + P[:, 1] * cs], 1) + c+++class Scene:+ def __init__(self, p):+ self.p = p+ self.M = {}+ self.plan()++ def put(self, k, m):+ self.M[k] = np.round(np.clip(m, 0, 1) * 255).astype(np.uint8)++ def m(self, *ks):+ out = None+ for k in ks:+ a = self.M[k].astype(np.float32) * np.float32(1 / 255)+ out = a if out is None else np.maximum(out, a)+ return out++ def grow(self, *ks, px=2.5):+ return self.p.grow(self.m(*ks), px)++ # ------------------------------------------------------------------ shapes+ def plan(self):+ p = self.p+ # head (three-quarter view to the right, tipped back), ear, neck+ self.face_pts = rot([(560, 548), (596, 556), (612, 590), (609, 626), (590, 648), (562, 652), (536, 640),+ (522, 612), (524, 578), (536, 556)])+ self.put('face', p.poly(self.face_pts, smooth=True))+ self.ear = rot([(526, 600), (514, 594), (510, 610), (516, 624), (528, 624)])+ self.put('ear', p.poly(self.ear, smooth=True))+ self.put('neck', p.poly([(548, 640), (572, 644), (572, 668), (546, 668)]))+ # short tousled hair: a mop from the crown -- a fringe combed forward to the brow, the rest down the back+ c = (548, 538)+ self.mop = [rot(g) for g in (+ [c, (526, 556), (512, 584), (507, 610)], # the nape+ [c, (524, 542), (507, 566), (503, 592)], # the back+ [c, (532, 528), (515, 540), (505, 562)],+ [c, (552, 524), (572, 526), (590, 536)], # over the top (a cowlick where they part)+ [c, (572, 532), (597, 546), (613, 572)],+ [c, (566, 546), (586, 558), (599, 578)])] # the fringe, combed forward to the brow+ hm = self.p.poly(rot([(616, 578), (608, 552), (590, 534), (560, 524), (530, 530), (510, 548), (502, 580),+ (504, 610), (518, 616), (522, 594), (532, 576), (556, 568), (590, 574)]), smooth=True)+ self.put('hair', hm)+ self.put('face_vis', self.m('face') * (1 - hm))+ # striped top, the near arm raised with the spool, the far arm down+ self.body_pts = [(522, 668), (556, 660), (590, 664), (606, 684), (610, 740), (612, 792), (562, 798),+ (512, 792), (512, 740), (514, 692)]+ self.put('body', p.poly(self.body_pts, smooth=True))+ self.arm_up = [(596, 680), (624, 652), (642, 618), (652, 596)]+ self.arm_down = [(522, 682), (510, 724), (508, 760), (514, 780)]+ self.sl_up = p.tube_pts(self.arm_up, [34, 31, 28, 26])+ self.sl_down = p.tube_pts(self.arm_down, [34, 31, 28, 26])+ self.put('sl_up', p.poly(self.sl_up)); self.put('sl_down', p.poly(self.sl_down))+ self.hand_up = [(644, 594), (650, 578), (662, 574), (670, 584), (666, 600), (652, 604)]+ self.hand_down = [(506, 778), (522, 778), (524, 794), (514, 802), (504, 794)]+ self.put('hands', np.maximum(p.poly(self.hand_up, smooth=True), p.poly(self.hand_down, smooth=True)))+ self.spool = [(654, 566), (676, 562), (680, 582), (658, 586)]+ self.put('spool', p.poly(self.spool))+ # shorts, legs (the near one stepping forward), socks, shoes+ self.shorts = [(512, 786), (612, 786), (620, 842), (574, 846), (564, 820), (552, 846), (506, 842)]+ self.put('shorts', p.poly(self.shorts))+ self.leg_far = [(530, 840), (529, 880), (527, 920)]+ self.leg_near = [(594, 840), (600, 880), (608, 916)]+ self.put('legs', np.maximum(p.tube(self.leg_far, [20, 17, 15]), p.tube(self.leg_near, [20, 17, 15])))+ self.shoe_far = [(516, 914), (536, 914), (548, 922), (546, 932), (514, 932)]+ self.shoe_near = [(598, 910), (618, 908), (634, 916), (632, 928), (598, 928)]+ self.put('shoes', np.maximum(p.poly(self.shoe_far, smooth=True), p.poly(self.shoe_near, smooth=True)))+ # the kite+ self.kite_pts = [(1492, 108), (1586, 214), (1472, 346), (1394, 222)]+ self.kite_c = (1484, 226)++ # ------------------------------------------------------------------ 1. the boy in ink+ def lines(self):+ p = self.p+ fp = p.closed_pts(self.face_pts)+ n = len(fp)+ av = self.grow('hair', 'ear', px=1.2)+ p.ink(fp[int(0.05 * n):int(0.75 * n)], 1.9, 'ink_soft', avoid=av, seed=11)+ p.contour(self.ear, pieces=1, width=1.7, avoid=self.grow('hair', px=1.0), seed=12)+ p.ink(rot([(519, 606), (523, 614)]), 1.4, seed=13)+ p.inks([[(550, 646), (549, 662)], [(570, 648), (571, 662)]], 1.8, avoid=self.grow('face'), seed=14)+ fr = self.grow('sl_up', 'sl_down', 'hands', 'shorts')+ p.contour(self.body_pts, pieces=(2, 3), width=2.0, avoid=self.grow('sl_up', 'sl_down', 'hands'), seed=15)+ p.inks([[(538, 663), (556, 670), (576, 666)]], 1.6, seed=16)+ for k, (pts, s_) in enumerate(((self.sl_up, 20), (self.sl_down, 22))):+ p.ink(pts, 2.0, smooth=False, avoid=self.grow('hands', 'spool', px=1.5), gaps=0.5, seed=s_)+ p.contour(self.hand_up, pieces=1, width=1.8, avoid=self.grow('spool', px=1.2), seed=24)+ p.contour(self.hand_down, pieces=1, width=1.8, seed=25)+ p.contour(self.spool, pieces=2, width=1.8, smooth=False, seed=26)+ p.contour(self.shorts, pieces=(2, 3), width=1.9, smooth=False, avoid=self.grow('body', 'sl_down', 'hands'),+ seed=27)+ fl = self.grow('shorts', 'shoes', px=1.5)+ for k, (leg, w) in enumerate(((self.leg_far, [20, 17, 15]), (self.leg_near, [20, 17, 15]))):+ o = p.tube_pts(leg, w)+ m = len(o) // 2+ p.inks([o[:m], o[m:]], 1.8, avoid=fl, seed=30 + k)+ for k, sh in enumerate((self.shoe_far, self.shoe_near)):+ p.contour(sh, pieces=(1, 2), width=1.9, seed=34 + k)++ # ------------------------------------------------------------------ 2. hair+ def hair(self):+ p = self.p+ av = self.grow('face_vis', px=1.0)+ p.hair(self.mop, n=74, width=2.0, wave=(2.0, 44), wave_root=0.2, length=(0.74, 1.0), start=(0.0, 0.1),+ taper=(3, 16), stray=0.06, cohere=1.5, avoid=av, seed=40)++ # ------------------------------------------------------------------ 3. stripes+ def stripes(self):+ p = self.p+ cols = ['red', 'navy', 'yellow', 'navy', 'turquoise', 'navy']+ fr = self.m('sl_up', 'sl_down', 'hands')+ p.stripes(self.m('body'), cols, across=88, bend=4, widths=[11, 6, 11, 6, 11, 6], gap=(5, 8), start=8,+ avoid=fr, seed=50)+ p.stripes(self.m('sl_up'), cols, path=self.arm_up, widths=[10, 5, 10, 5, 10, 5], gap=(5, 7), start=4,+ avoid=self.m('hands', 'spool'), seed=51)+ p.stripes(self.m('sl_down'), cols, path=self.arm_down, widths=[10, 5, 10, 5, 10, 5], gap=(5, 7), start=4,+ avoid=self.m('hands'), seed=52)++ # ------------------------------------------------------------------ 4. other colour+ def colour(self):+ p = self.p+ p.tint(self.m('shorts'), 'mustard', 75, 0.85, 0.55, 0.5, 0.9, hatch=0.25, spacing=6,+ avoid=self.m('body', 'sl_down', 'hands'), shift=(2, 1), seed=60)+ p.tint(self.m('shoes'), 'blue', 10, 0.9, 0.25, overrun=1.5, shift=(1, -1), seed=61)+ p.tint(self.m('spool'), 'wood', 80, 0.8, 0.5, seed=62)+ for k, leg in enumerate((self.leg_far, self.leg_near)):+ x, y = leg[-1]+ sock = p.poly([(x - 9, y - 26), (x + 9, y - 26), (x + 9, y - 2), (x - 9, y - 2)]) * self.m('legs')+ p.stripes(sock, ['red'], across=90, band=(4, 5), gap=(4, 5), overrun=1.0, seed=63 + k)++ # ------------------------------------------------------------------ 5. the face+ def face(self):+ p = self.p+ e1, e2 = rot([(576, 590), (601, 587)])+ p.eye_dot(e1[0], e1[1], 3.5); p.eye_dot(e2[0], e2[1], 3.2)+ p.inks([rot([(568, 578), (576, 574), (584, 577)]), rot([(595, 574), (602, 571), (608, 574)])], 1.4,+ taper=(2, 3), seed=70)+ p.ink(rot([(613, 597), (619, 606), (611, 610)]), 1.6, taper=(2, 3), seed=71)+ b1, b2 = rot([(566, 610), (606, 607)])+ p.blush(b1[0], b1[1], 8.0, seed=72); p.blush(b2[0], b2[1], 6.5, seed=73)+ # an open smile: a little red under a curved line+ sm = rot([(584, 622), (593, 630), (603, 621)])+ p.tint(p.poly(np.vstack([sm, rot([(594, 623)])])), 'lip', 0, 0.85, 0.2, overrun=0.6, edge=0.2, seed=74)+ p.ink(rot([(582, 621), (593, 623), (605, 619)]), 1.5, taper=(2, 2), seed=75)+ p.ink(sm, 1.5, taper=(2, 3), seed=76)++ # ------------------------------------------------------------------ 6. trees and grass+ def trees(self):+ p = self.p+ p.tree(250, 965, 560, 'red', lines=5, branches=8, lean=0.02, width=1.8, seed=80)+ p.tree(372, 975, 420, 'forest', lines=4, branches=7, lean=-0.03, width=1.7, blossoms='pink', n_blossom=14,+ seed=81)+ p.tree(1738, 960, 300, 'gold', lines=3, branches=6, lean=0.02, width=1.7, seed=82)+ for k, (x, y, w) in enumerate(((250, 965, 60), (372, 975, 50), (566, 936, 90), (1738, 960, 50),+ (1640, 968, 30))):+ p.ticks(p.ellipse(x, y - 4, w, 8), int(w / 4), (8, 16), -90, 22, 1.4, 'leaf', 0.85, seed=90 + k)++ # ------------------------------------------------------------------ 7. kite and string+ def kite(self):+ p = self.p+ K = np.asarray(self.kite_pts, np.float32); c = np.asarray(self.kite_c, np.float32)+ cols = ['red', 'yellow', 'teal', 'blue']+ for i in range(4):+ tri = [K[i], K[(i + 1) % 4], c]+ p.tint(p.poly(tri), cols[i], 30 + 40 * i, 0.88, 0.5, 0.5, 0.9, overrun=2.0, shift=(2, 1),+ seed=100 + i)+ p.contour(self.kite_pts, pieces=2, width=2.0, smooth=False, seed=104)+ p.inks([[K[0], K[2]], [K[1], K[3]]], 1.6, seed=105)+ p.ink([(660, 580), (900, 468), (1160, 380), (1412, 300), (1478, 262)], 1.1, 'ink_soft', alpha=0.85,+ wobble=0.6, wscale=120, taper=(4, 4), seed=106)++ # ------------------------------------------------------------------ 8. tail and wind+ def last(self):+ p = self.p+ t = np.linspace(0, 1, 9)+ tail = np.stack([1472 + 70 * t + 22 * np.sin(2 * np.pi * 1.4 * t), 346 + 250 * t], 1)+ p.ink(tail, 1.4, seed=110)+ cols = ['red', 'gold', 'teal', 'magenta', 'blue']+ for i, tt in enumerate((0.18, 0.36, 0.54, 0.72, 0.9)):+ j = tt * 8; k = int(j); f = j - k+ x, y = tail[k] * (1 - f) + tail[min(8, k + 1)] * f+ for sd in (-1, 1):+ bow = [(x, y), (x + sd * 13, y - 7), (x + sd * 13, y + 7)]+ p.tint(p.poly(bow), cols[i], 0, 0.9, 0.4, overrun=1.0, seed=111 + 2 * i + (sd > 0))+ p.contour(bow, pieces=1, width=1.3, smooth=False, seed=121 + 2 * i + (sd > 0))+ # two light wind doodles, each ending in a little curl+ for k, (x, y, L) in enumerate(((900, 640, 150), (1250, 690, 120))):+ t = np.linspace(0, 1, 30)+ xs = x + L * t; ys = y - 10 * np.sin(np.pi * t) - 6 * t+ th = np.linspace(-np.pi / 2, np.pi * 1.1, 14)+ cx, cy = xs[-1], ys[-1] + 9+ P = np.vstack([np.stack([xs, ys], 1), np.stack([cx + 9 * np.cos(th), cy + 9 * np.sin(th)], 1)])+ p.ink(P, 1.3, 'graphite', alpha=0.55, taper=(10, 8), smooth=False, seed=133 + k)+ p.leaf((1010, 700), (1056, 676), 20, fill='olive', line='ink', veins=3, lw=1.4, seed=130)+ p.leaf((1196, 600), (1228, 568), 16, fill='coral', line='ink', veins=2, lw=1.3, seed=131)+++PHASES = ('lines', 'hair', 'stripes', 'colour', 'face', 'trees', 'kite', 'last')+++def main():+ out = sys.argv[1] if len(sys.argv) > 1 and not sys.argv[1].startswith('--') else 'sketchbook_kite_day.jpg'+ stages = sys.argv[sys.argv.index('--stages') + 1] if '--stages' in sys.argv else None+ T0 = time.time()+ p = Sketchbook(W, H, seed=12, keep_stages=bool(stages), stages_dir=stages)+ p.finish()+ p.paper()+ p.stage('paper')+ sc = Scene(p)+ for name in PHASES[:-1]:+ getattr(sc, name)()+ p.stage(name)+ getattr(sc, PHASES[-1])()+ p.save(out, stages_dir=stages)+ print('saved', out, f'{time.time() - T0:.1f}s', p.n_lines, 'lines')+++if __name__ == '__main__':+ main()diff --git a/examples/sketchbook_reading_hour.jpg b/examples/sketchbook_reading_hour.jpgnew file mode 100644index 0000000..ef55db0Binary files /dev/null and b/examples/sketchbook_reading_hour.jpg differdiff --git a/examples/sketchbook_reading_hour.py b/examples/sketchbook_reading_hour.pynew file mode 100644index 0000000..ead1b0f--- /dev/null+++ b/examples/sketchbook_reading_hour.py@@ -0,0 +1,385 @@+"""Example (sketchbook doodle): 读书的午后 · The Reading Hour -- a page from an illustrator's sketchbook.++A girl sits on a little wooden stool and reads, the book held up in both hands, her head bowed over it, eyes+closed in that way of someone deep in a story. Long wavy dark hair parted in the middle, a rainbow-striped jumper with+a red ribbed neck and mustard cuffs, a blue pleated skirt, white socks and red shoes. Her grey tabby is curled up+asleep on the floor beside a mug whose steam curls up into the empty page; on the other side a potted plant puts out+a few leaves (one inked with herringbone veins, one blue with its veins left white) and a red bud; a single leaf+drifts down. Everything floats on a big warm page: no ground, no background.++Drawn in the order a sketchbook illustrator works: the paper -> the fine ink line drawing (face, neck, jumper and+sleeves, the book and the fingers on it, skirt, legs, shoes, the stool behind) -> the hair, strand by strand -> the+stripes in colour pencil and marker -> the other colour (skirt, cuffs and neck, the book cover, shoes, the stool) ->+the cat -> the plant -> the mug and its steam -> the face (closed eyes, nose, blush, mouth) -> a drifting leaf and a+little doodle. --stages writes those steps as snapshots for the draw-on. No image model.+python3 sketchbook_reading_hour.py [out.jpg] [--stages DIR]+"""+import os, sys, time+sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'lib'))+import numpy as np+from sketchbook import Sketchbook++W, H = 1600, 1600+HEAD = np.array([800.0, 610.0]) # centre of the face+TILT = -5.0 # the head leans a little toward her right shoulder+BOOK_TILT = -4.0 # the book is held a little crooked+++def rot(pts, deg=TILT, c=HEAD):+ """turn points about the face centre (the head's tilt)"""+ a = np.deg2rad(deg); cs, sn = np.cos(a), np.sin(a)+ P = np.asarray(pts, np.float32) - c+ return np.stack([P[:, 0] * cs - P[:, 1] * sn, P[:, 0] * sn + P[:, 1] * cs], 1) + c+++def mirror(pts, x=800.0):+ P = np.asarray(pts, np.float32).copy(); P[:, 0] = 2 * x - P[:, 0]+ return P+++class Scene:+ def __init__(self, p):+ self.p = p+ self.M = {}+ self.plan()++ # masks are kept as uint8 (a quarter of the memory of float32)+ def put(self, k, m):+ self.M[k] = np.round(np.clip(m, 0, 1) * 255).astype(np.uint8)++ def m(self, *ks):+ out = None+ for k in ks:+ a = self.M[k].astype(np.float32) * np.float32(1 / 255)+ out = a if out is None else np.maximum(out, a)+ return out++ def grow(self, *ks, px=2.5):+ """the union of some masks grown by a few px (a line stops just short of what is in front of it)"""+ return self.p.grow(self.m(*ks), px)++ # ------------------------------------------------------------------ shapes+ def plan(self):+ p = self.p+ # the head: face, neck, the hair's two locks (from the parting, the hairline sweeping over the forehead)+ self.face_pts = rot([(800, 534), (840, 541), (864, 572), (868, 615), (860, 655), (836, 686), (800, 698),+ (764, 686), (740, 655), (732, 615), (736, 572), (760, 541)])+ self.put('face', p.poly(self.face_pts, smooth=True))+ self.put('neck', p.poly([(786, 680), (814, 680), (815, 742), (785, 742)]))+ apex = (806, 548) # where the parting meets the forehead+ rg = [[apex, (815, 568), (832, 592), (854, 612), (867, 640), (872, 676), (878, 716), (888, 758), (899, 800)],+ [(806, 530), (832, 534), (860, 556), (882, 592), (895, 636), (899, 690), (907, 746), (920, 792),+ (932, 826)],+ [(808, 516), (848, 511), (884, 528), (907, 564), (918, 620), (922, 682), (930, 742), (944, 794),+ (958, 830)]]+ self.lock_r = [rot(g) for g in rg]+ self.lock_l = [rot(mirror(g, 806)) for g in rg]+ hr = np.vstack([self.lock_r[0], self.lock_r[-1][::-1]])+ hl = np.vstack([self.lock_l[0], self.lock_l[-1][::-1]])+ self.put('hair', np.maximum(p.poly(hr, smooth=False), p.poly(hl, smooth=False)))+ # the face you see: the oval below the hairline+ below = np.vstack([self.lock_r[0][:8], [(900, 900), (712, 900)], self.lock_l[0][:8][::-1]])+ self.put('face_vis', self.m('face') * p.poly(below))+ # the jumper: body, two sleeves bent to hold the book, a ribbed neck, cuffs+ self.body_pts = [(772, 735), (742, 742), (712, 754), (705, 800), (703, 900), (700, 986), (800, 994),+ (900, 986), (897, 900), (895, 800), (888, 754), (858, 742), (828, 735)]+ self.put('body', p.poly(self.body_pts, smooth=True))+ self.arm_l = [(718, 768), (697, 836), (690, 884), (708, 908), (746, 916)]+ self.arm_r = [(882, 768), (904, 832), (913, 878), (894, 902), (856, 909)]+ self.sleeve_l = p.tube_pts(self.arm_l, [62, 58, 54, 50, 46])+ self.sleeve_r = p.tube_pts(self.arm_r, [62, 58, 54, 50, 46])+ self.put('sleeve_l', p.poly(self.sleeve_l)); self.put('sleeve_r', p.poly(self.sleeve_r))+ # the open book held up (a little crooked) in front of her, its covers toward us; three fingers on each cover+ book = lambda pts: rot(pts, BOOK_TILT, (800, 905))+ self.book = book+ self.cover_l = book([(724, 846), (800, 857), (800, 962), (728, 953)])+ self.cover_r = book(mirror([(724, 846), (800, 857), (800, 962), (728, 953)]))+ self.put('book', np.maximum(p.poly(self.cover_l), p.poly(self.cover_r)))+ self.fingers = []+ for side in (-1, 1):+ for i, (fy, fl) in enumerate(((889, 13), (900, 15), (911, 13))):+ x0 = 800 + side * 77+ x1 = x0 - side * fl+ pts = [(x0, fy - 4.6), (x1 + side * 2.5, fy - 4.8), (x1, fy), (x1 + side * 2.5, fy + 4.8), (x0, fy + 4.6)]+ self.fingers.append(book(pts))+ fm = np.zeros((H, W), np.float32)+ for f in self.fingers: fm = np.maximum(fm, p.poly(f, smooth=True))+ self.put('fingers', fm)+ # skirt, legs, shoes+ self.skirt_pts = [(708, 968), (800, 974), (892, 968), (904, 1020), (914, 1066), (858, 1072), (800, 1068),+ (742, 1072), (686, 1066), (696, 1020)]+ self.put('skirt', p.poly(self.skirt_pts, smooth=False))+ self.leg_l = [(779, 1060), (778, 1150), (777, 1220), (777, 1294)]+ self.leg_r = [(821, 1060), (825, 1146), (831, 1212), (839, 1278)]+ self.legw = [27, 26, 22, 18]+ self.put('legs', np.maximum(p.tube(self.leg_l, self.legw), p.tube(self.leg_r, self.legw)))+ self.shoe_l = [(766, 1288), (786, 1288), (800, 1296), (806, 1306), (796, 1314), (770, 1314), (762, 1302)]+ self.shoe_r = rot([(830, 1270), (850, 1270), (856, 1284), (850, 1297), (826, 1298), (814, 1292), (818, 1280)],+ 8, (838, 1284))+ self.put('shoes', np.maximum(p.poly(self.shoe_l, smooth=True), p.poly(self.shoe_r, smooth=True)))+ # the stool behind her: a round seat, two splayed legs, a rung (a third leg between hers read as a third leg)+ self.seat = p.ellipse_pts(800, 1050, 130, 19)+ self.put('seat', np.maximum(p.ellipse(800, 1050, 130, 19), p.poly([(670, 1050), (930, 1050), (928, 1066),+ (672, 1066)])))+ self.stool_legs = [[(696, 1062), (668, 1326)], [(904, 1062), (932, 1326)]]+ self.put('stool_legs', np.maximum.reduce([p.tube(l, 13, 11) for l in self.stool_legs]))+ self.rung = [(680, 1220), (920, 1220)]+ self.put('rung', p.tube(self.rung, 9))++ # ------------------------------------------------------------------ 1. the ink line drawing+ def lines(self):+ p = self.p+ front_of_face = self.grow('hair', px=1.5)+ # face: only the cheeks and the chin, a lighter line, open at the top (the hair frames it)+ fp = p.closed_pts(self.face_pts)+ n = len(fp)+ p.ink(fp[int(0.18 * n):int(0.47 * n)], 1.9, 'ink_soft', avoid=front_of_face, seed=11)+ p.ink(fp[int(0.53 * n):int(0.83 * n)], 1.9, 'ink_soft', avoid=front_of_face, seed=12)+ # neck+ p.inks([[(788, 692), (787, 716), (786, 736)], [(812, 692), (813, 716), (814, 736)]], 1.9, 'ink',+ avoid=self.grow('face'), seed=13)+ fr_body = self.grow('sleeve_l', 'sleeve_r', 'book', 'fingers', 'hair')+ p.contour(self.body_pts, pieces=(2, 3), width=2.1, avoid=fr_body, seed=14)+ # a ribbed crew neck+ nb_top = [(771, 735), (800, 741), (829, 735)]+ nb_bot = [(764, 748), (800, 756), (836, 748)]+ p.inks([nb_top, nb_bot], 1.8, seed=15)+ # sleeves (the near forearm passes in front of the body), cuffs+ fr_sl = self.grow('book', 'fingers', 'hair')+ for k, (pts, arm) in enumerate(((self.sleeve_l, self.arm_l), (self.sleeve_r, self.arm_r))):+ p.ink(pts, 2.1, avoid=fr_sl, smooth=False, gaps=0.6, seed=20 + k)+ # the elbow crease+ a = np.asarray(arm, np.float32)+ p.ink([a[2] + (8 if k == 0 else -8, -4), a[2] + (14 if k == 0 else -14, 8)], 1.6, seed=22 + k)+ # the book: two covers in a shallow V, the page block's top edges, the spine+ bk = self.grow('fingers', px=1.2)+ for k, cv in enumerate((self.cover_l, self.cover_r)):+ p.contour(cv, pieces=(2, 3), width=2.0, smooth=False, avoid=bk, seed=30 + k)+ for i, dy in enumerate((5, 9, 13)):+ p.ink(self.book([(731, 846 - dy * 0.6), (764, 848 - dy), (797, 856 - dy)]), 1.3, alpha=0.8, seed=33 + i)+ p.ink(self.book([(869, 846 - dy * 0.6), (836, 848 - dy), (803, 856 - dy)]), 1.3, alpha=0.8, seed=36 + i)+ for k, f in enumerate(self.fingers):+ p.contour(f, pieces=1, width=1.7, p_gap=1.0, gap=(2, 5), seed=40 + k)+ # skirt and its pleats+ fr_sk = self.grow('body', 'sleeve_l', 'sleeve_r', 'book')+ p.contour(self.skirt_pts, pieces=(2, 3), width=2.0, smooth=False, avoid=fr_sk, seed=50)+ for i, x in enumerate((736, 770, 832, 866)):+ p.ink([(x + (x - 800) * 0.02, 990), (x + (x - 800) * 0.12, 1066)], 1.4, alpha=0.75, avoid=fr_sk,+ seed=51 + i)+ # legs (only their sides), socks, shoes with a strap+ fr_leg = self.grow('skirt', 'shoes', px=1.5)+ for k, leg in enumerate((self.leg_l, self.leg_r)):+ o = p.tube_pts(leg, self.legw)+ m = len(o) // 2+ p.inks([o[:m], o[m:]], 1.9, avoid=fr_leg, seed=60 + k)+ sx, sy = np.asarray(leg)[-1]+ cy = sy - 30+ p.ink([(sx - 11, cy), (sx, cy + 3), (sx + 11, cy)], 1.6, avoid=fr_leg, seed=62 + k)+ p.inks([[(sx + d, cy + 4), (sx + d * 0.95, cy + 20)] for d in (-6, -1, 4, 8)], 1.0, alpha=0.6,+ avoid=fr_leg, seed=64 + k)+ for k, sh in enumerate((self.shoe_l, self.shoe_r)):+ p.contour(sh, pieces=(1, 2), width=2.0, seed=66 + k)+ p.inks([[(772, 1300), (782, 1297), (792, 1300)], rot([(828, 1284), (838, 1281), (848, 1283)], 8, (838, 1284))],+ 1.5, seed=68)+ # the stool, behind everything+ fr_st = self.grow('skirt', 'legs', 'shoes', 'body', 'sleeve_l', 'sleeve_r', px=2.0)+ p.contour(self.seat, pieces=2, width=1.9, avoid=fr_st, smooth=False, seed=70)+ p.inks([[(670, 1051), (672, 1066)], [(930, 1051), (928, 1066)], [(672, 1066), (800, 1072), (928, 1066)]],+ 1.8, avoid=fr_st, seed=71)+ for k, lg in enumerate(self.stool_legs):+ o = p.tube_pts(lg, 13, 11)+ m = len(o) // 2+ p.inks([o[:m], o[m:]], 1.7, avoid=fr_st, seed=72 + k)+ ro = p.tube_pts(self.rung, 9)+ m = len(ro) // 2+ p.inks([ro[:m], ro[m:]], 1.5, avoid=self.grow('legs', 'stool_legs', px=1.5), seed=76)++ # ------------------------------------------------------------------ 2. hair+ def hair(self):+ p = self.p+ self.clip_c = rot([(886, 600)])[0]+ cm = p.ellipse(self.clip_c[0], self.clip_c[1], 12, 12)+ av = np.maximum(self.grow('face_vis', px=1.0), cm)+ p.hair(self.lock_r, n=34, width=2.2, wave=(5.0, 110), wave_root=0.0, cohere=0.6, avoid=av, seed=80)+ p.hair(self.lock_l, n=34, width=2.2, wave=(5.0, 110), wave_root=0.0, cohere=0.6, avoid=av, seed=81)++ # a little daisy clip, the hair parted round it+ c = self.clip_c+ p.flower(c[0], c[1], 10, 'orange', 'daisy', lw=1.7, seed=84)++ # ------------------------------------------------------------------ 3. stripes+ def stripes(self):+ p = self.p+ front = self.m('sleeve_l', 'sleeve_r', 'book', 'fingers', 'hair')+ rainbow = ['red', 'yellow', 'teal', 'orange', 'magenta', 'gold', 'turquoise', 'red', 'yellow', 'blue']+ p.stripes(self.m('body'), rainbow, across=90, bend=7, band=(13, 22), gap=(6, 12), avoid=front, start=22,+ seed=90)+ fr = self.m('book', 'fingers', 'hair')+ for k, arm in enumerate((self.arm_l, self.arm_r)):+ m = self.m('sleeve_l' if k == 0 else 'sleeve_r')+ cuff = p.tube(np.asarray(arm)[-2:].tolist(), 52, 48)+ p.stripes(m * (1 - cuff), ['yellow', 'red', 'teal', 'orange', 'magenta', 'turquoise'], path=arm,+ band=(11, 18), gap=(6, 10), avoid=fr, start=14, seed=91 + k)++ # ------------------------------------------------------------------ 4. the other colour+ def colour(self):+ p = self.p+ # ribbed neck in red, mustard cuffs, both with rib lines+ nb = p.poly([(771, 735), (800, 741), (829, 735), (836, 748), (800, 756), (764, 748)], smooth=False)+ p.tint(nb, 'red', 0, 0.9, 0.45, overrun=1.5, seed=100)+ p.inks([[(770 + i * 6.5, 737 + 0.5 * abs(i - 4.5)), (766 + i * 7.3, 749 + 0.6 * abs(i - 4.5))]+ for i in range(1, 10)], 1.0, alpha=0.7, seed=101)+ fr = self.m('book', 'fingers')+ for k, arm in enumerate((self.arm_l, self.arm_r)):+ a = np.asarray(arm, np.float32)+ cuff = p.tube(a[-2:].tolist(), 52, 48) * self.m('sleeve_l' if k == 0 else 'sleeve_r')+ p.tint(cuff, 'gold', 0, 0.92, 0.4, avoid=fr, overrun=1.5, seed=102 + k)+ d = a[-1] - a[-2]; d /= np.linalg.norm(d); nrm = np.array([-d[1], d[0]])+ ribs = [[a[-2] + d * t + nrm * 22, a[-2] + d * t - nrm * 22] for t in np.linspace(4, 34, 7)]+ p.inks(ribs, 1.0, alpha=0.7, avoid=self.grow('book', 'fingers', px=1.0), seed=104 + k)+ # the skirt: blue pencil laid in vertical strokes+ p.tint(self.m('skirt'), 'cobalt', 88, 0.82, 0.6, 0.6, 0.85, hatch=0.35, spacing=6.0,+ avoid=self.m('body', 'sleeve_l', 'sleeve_r', 'book'), shift=(2, 2), seed=106)+ # the book cover in teal with a little sun drawn on it+ sx, sy = self.book([(838, 900)])[0]+ sun = p.ellipse(sx, sy, 12, 12)+ p.tint(self.m('book'), 'teal', -40, 0.85, 0.55, 0.5, 0.88, avoid=np.maximum(self.m('fingers'), sun),+ shift=(-2, 1), seed=107)+ p.dots([(sx, sy)], 9, 'yellow', 0.95)+ p.inks([[(sx + 13 * np.cos(a), sy + 13 * np.sin(a)), (sx + 19 * np.cos(a), sy + 19 * np.sin(a))]+ for a in np.linspace(0, 2 * np.pi, 8, endpoint=False)], 1.3, 'gold', seed=108)+ # red shoes in marker+ p.tint(self.m('shoes'), 'red', 10, 0.92, 0.2, 0.4, 0.95, overrun=1.5, shift=(1, -1), seed=109)+ # the stool: wood pencil on the seat edge and the legs+ st = self.m('seat', 'stool_legs', 'rung') * (1 - self.m('skirt', 'legs', 'shoes', 'body'))+ p.tint(st, 'wood', 80, 0.65, 0.65, 0.5, 0.8, seed=110)++ # ------------------------------------------------------------------ 5. the cat, asleep+ def cat(self):+ p = self.p+ body = [(410, 1302), (418, 1266), (452, 1244), (510, 1238), (562, 1246), (596, 1266), (606, 1300),+ (590, 1324), (540, 1334), (470, 1334), (428, 1324)]+ head_c = (588, 1288)+ head = p.ellipse_pts(head_c[0], head_c[1], 37, 31, -8)+ ears = [[(560, 1272), (565, 1246), (583, 1262)], [(596, 1259), (614, 1240), (619, 1268)]]+ tail = [(418, 1318), (446, 1338), (510, 1346), (566, 1338)]+ hm = np.maximum(p.poly(head), np.maximum(p.poly(ears[0]), p.poly(ears[1])))+ tm = p.tube(tail, 20, 14)+ bm = p.poly(body, smooth=True)+ p.tint(np.maximum.reduce([bm, hm, tm]), 'stone', 30, 0.45, 0.55, 0.5, 0.8, overrun=2.0, shift=(2, -2),+ seed=120)+ p.contour(body, pieces=(2, 3), width=1.9, avoid=p.grow(np.maximum(hm, tm)), seed=121)+ p.contour(head, pieces=2, width=1.9, smooth=False, avoid=p.grow(tm), seed=122)+ p.inks(ears, 1.9, smooth=False, seed=123)+ p.contour(p.tube_pts(tail, 20, 14), pieces=2, width=1.8, smooth=True, seed=124)+ # tabby stripes over the back, a few on the tail, fur ticks+ stripes = [[(462 + 26 * i, 1246 + 2 * abs(i - 2)), (458 + 26 * i, 1262 + 2 * abs(i - 2)),+ (466 + 26 * i, 1276)] for i in range(5)]+ p.inks(stripes, 2.6, 'graphite', 0.8, taper=(3, 8), clip=bm, seed=125)+ p.inks([[(470 + 22 * i, 1336), (474 + 22 * i, 1346)] for i in range(4)], 2.4, 'graphite', 0.8, clip=tm,+ seed=126)+ p.ticks(bm * (1 - p.grow(hm)), 26, (5, 9), 75, 30, 1.0, 'ink', 0.55, seed=127)+ # the sleeping face+ p.eye_closed(574, 1292, 13, 3.0, lashes=0, rot=-8, width=1.6, seed=128)+ p.eye_closed(600, 1289, 13, 3.0, lashes=0, rot=-8, width=1.6, seed=129)+ p.inks([[(585, 1302), (588, 1305), (591, 1302)]], 1.6, seed=130)+ p.dots([(588, 1300)], 2.4, 'pink', 0.9)+ p.inks([[(568, 1302), (538, 1298)], [(568, 1306), (540, 1310)], [(610, 1300), (640, 1294)],+ [(610, 1305), (638, 1308)]], 1.1, alpha=0.75, seed=131)+ p.blush(566, 1300, 5, 'pink', 0.6); p.blush(610, 1297, 5, 'pink', 0.6)++ # ------------------------------------------------------------------ 6. the plant+ def plant(self):+ p = self.p+ pot = [(1048, 1252), (1142, 1252), (1131, 1328), (1059, 1328)]+ rim = [(1040, 1236), (1150, 1236), (1147, 1256), (1043, 1256)]+ pm, rm = p.poly(pot), p.poly(rim)+ p.tint(np.maximum(pm, rm), 'terracotta', 70, 0.72, 0.6, 0.55, 0.85, hatch=0.25, spacing=6, shift=(2, 2),+ seed=140)+ p.contour(rim, pieces=2, width=1.9, smooth=False, seed=141)+ p.contour(pot, pieces=2, width=1.9, smooth=False, avoid=p.grow(rm, 1.5), seed=142)+ # three stems+ stems = [[(1082, 1238), (1074, 1120), (1058, 1000), (1046, 948)],+ [(1096, 1238), (1100, 1100), (1106, 960), (1112, 872)],+ [(1110, 1238), (1128, 1130), (1152, 1040), (1174, 990)]]+ p.inks(stems, 2.0, 'forest', 0.95, grain=0.3, taper=(3, 10), seed=143)+ S = [np.asarray(s, np.float32) for s in stems]++ def at(si, t):+ s = S[si]; i = t * (len(s) - 1); k = min(int(i), len(s) - 2); f = i - k+ return s[k] * (1 - f) + s[k + 1] * f+ leaves = [ # (stem, t, angle, length, width, fill, line, veins, vein)+ (0, 0.35, -150, 86, 34, 'olive', 'ink', 5, 'line'),+ (0, 0.75, -40, 74, 30, 'sage', 'forest', 4, 'line'),+ (0, 0.98, -120, 64, 28, None, 'ink', 9, 'line'),+ (1, 0.45, -32, 90, 36, 'cobalt', None, 7, 'white'),+ (1, 0.78, -140, 70, 30, 'teal', 'forest', 4, 'line'),+ (2, 0.4, -20, 78, 32, 'leaf', 'forest', 4, 'line'),+ (2, 0.97, -60, 66, 28, 'olive', 'ink', 5, 'line'),+ ]+ for i, (si, t, ang, ln, wd, fill, line, nv, vein) in enumerate(leaves):+ b = at(si, t)+ tip = b + ln * np.array([np.cos(np.deg2rad(ang)), np.sin(np.deg2rad(ang))])+ p.leaf(b, tip, wd, fill=fill, line=line, veins=nv, vein=vein, bend=0.07 * (1 if i % 2 else -1),+ fill_shift=(0, 0) if vein == 'white' else (3, -2), seed=150 + i)+ p.flower(1112, 858, 15, 'red', 'tulip', seed=160)++ # ------------------------------------------------------------------ 7. the mug and its steam+ def mug(self):+ p = self.p+ body = [(328, 1270), (378, 1270), (376, 1318), (370, 1326), (334, 1326), (328, 1318)]+ bm = p.poly(body)+ band = bm * p.poly([(320, 1290), (390, 1290), (390, 1304), (320, 1304)])+ p.tint(band, 'turquoise', 0, 0.9, 0.35, overrun=1.0, seed=170)+ top = p.ellipse_pts(353, 1270, 25, 6)+ p.tint(p.ellipse(353, 1271, 21, 4), 'sepia', 0, 0.75, 0.3, seed=171)+ p.ink(top, 1.8, closed=False, seed=172)+ p.inks([[(328, 1271), (330, 1318), (336, 1326), (368, 1326), (374, 1318), (378, 1271)]], 1.9, seed=173)+ p.ink([(328, 1282), (312, 1280), (308, 1296), (314, 1310), (329, 1310)], 1.8, seed=174)+ p.steam(350, 1258, 380, 'graphite', sway=26, curl=0.85, width=1.5, alpha=0.7, strands=2, lean=0.06, seed=175)++ # ------------------------------------------------------------------ 8. the face+ def face(self):+ p = self.p+ el, er = rot([(775, 630), (826, 630)])+ p.eye_closed(el[0], el[1], 24, 6.0, lashes=3, side=-1, rot=TILT, width=1.9, seed=180)+ p.eye_closed(er[0], er[1], 24, 6.0, lashes=3, side=1, rot=TILT, width=1.9, seed=181)+ p.ink(rot([(802, 640), (799, 657), (804, 660)]), 1.6, taper=(2, 3), seed=182)+ bl, br = rot([(764, 655), (838, 655)])+ p.blush(bl[0], bl[1], 11.5, seed=183); p.blush(br[0], br[1], 11.5, seed=184)+ mc = rot([(801, 675)])[0]+ p.mouth(mc[0], mc[1], 12, 5, rot=TILT, seed=185)++ # ------------------------------------------------------------------ 9. last touches+ def last(self):+ p = self.p+ p.leaf((1238, 652), (1286, 606), 30, fill='gold', line='ink', veins=4, lw=1.6, seed=190)+ p.squiggle(486, 668, 22, 'graphite', 'spiral', alpha=0.55, seed=191)+++PHASES = ('lines', 'hair', 'stripes', 'colour', 'cat', 'plant', 'mug', 'face', 'last')+++def main():+ out = sys.argv[1] if len(sys.argv) > 1 and not sys.argv[1].startswith('--') else 'sketchbook_reading_hour.jpg'+ stages = sys.argv[sys.argv.index('--stages') + 1] if '--stages' in sys.argv else None+ T0 = time.time()+ tick = (lambda name: print(f'{name:10s} {time.time() - T0:5.1f}s')) if os.environ.get('SB_TIMING') else (lambda n: None)+ p = Sketchbook(W, H, seed=5, keep_stages=bool(stages), stages_dir=stages)+ p.finish()+ p.paper()+ p.stage('paper')+ sc = Scene(p)+ tick('setup')+ for name in PHASES[:-1]:+ getattr(sc, name)()+ tick(name)+ p.stage(name)+ getattr(sc, PHASES[-1])()+ tick(PHASES[-1])+ p.save(out, stages_dir=stages)+ print('saved', out, f'{time.time() - T0:.1f}s', p.n_lines, 'lines')+++if __name__ == '__main__':+ main()diff --git a/lib/sketchbook.py b/lib/sketchbook.pynew file mode 100644index 0000000..4a9bdd2--- /dev/null+++ b/lib/sketchbook.py@@ -0,0 +1,972 @@+"""sketchbook — 手账线描 / Sketchbook Doodle: delicate ink lines, playful stripes of colour pencil, charming little+characters floating on a big warm page (numpy + Pillow only).++The look: a page from an illustrator's sketchbook. Warm off-white paper with a faint blush, mostly left empty; one+small character in the lower middle with two or three sparse props, everything lightly floating (no ground, no+background). The drawing is hair-thin dark ink that wobbles a little, tapers in and out and leaves gaps -- a contour+is one or two strokes that do not quite close. Hair is many separate fine strands that flow together, paper showing+between them. Faces are tiny and simple: closed arcs with a few lashes (or dot eyes), a short nose line, a small red+mouth and two round pink blush dots. Clothes are filled with playful stripes laid in colour pencil and marker -- red,+yellow, teal, orange, magenta, blue -- loose hand-drawn bands with streaky texture, white paper gaps between them,+edges that wander and overrun or fall short of the ink line. Props are drawn in thin coloured lines: single leaves+with vein hatching, small flowers, thin multi-line trees, a steam curl, a curled-up cat.++Physical model+ paper A warm off-white with a faint blush: a fine equalised tooth `T` (used by the pencil and to break the ink a+ little), a very low mottle and a scatter of faint fibres. Most of the page stays bare.+ ink A fine pen line. Every stroke is the drawn path smoothed, resampled at 1 px and pushed sideways by a slow+ hand wobble plus a tiny tremor; its width tapers in where the nib lands and out in a longer flick where it+ lifts, drifts +-12 % along the way, and its ink flow varies a little (some stretches greyer). `gaps` lifts+ the pen for a few px now and then; `contour()` draws a closed shape as one to three strokes that leave a+ gap or overlap at the joins. Strokes are drawn with per-run width and darkness into a 4x supersampled+ layer (Pillow), box-filtered down, broken a touch by the tooth and multiplied into the page (ink is+ transparent: colour under it stays, lines over colour stay dark).+ pencil Colour is laid as colour pencil / marker: a coverage target (a band, a shape) is turned into strokes+ along a direction -- long streak noise along the stroke and a finer elongated grain -- and the pigment+ catches the tooth (grainy, white specks) or lies flatter (marker), `grain` mixing the two. Colours+ multiply, so a red band over a yellow one turns orange, as real pencil does.+ stripes `stripes()` lays bands across a garment: band positions along a coordinate `s` (straight across an+ angle, bent into a smile with `bend`, or wrapped round a sleeve's centre-line with `path`), each band its+ own colour, width, small tilt, grain and pressure, its two edges wandering independently, and its ends+ re-found on a blurred copy of the garment mask with a threshold of its own -- so each band overruns the+ ink line a little or stops short of it, and the whole layer can slip a few px (`shift`).+ props `leaf()` an ink or coloured outline with a midrib and paired veins (herringbone hatching), an optional+ pencil fill set slightly off the line, or veins reserved in white; `flower()` a scribbled rose, a daisy+ of petal loops or a pencil tulip; `tree()` a trunk of several thin parallel lines that part into+ branches and twigs, with optional blossom dots; `steam()` a fine rising curl; `ticks()` short marks+ (fur, grass); `squiggle()` a tiny spiral or sparkle doodle (never fake writing).+ faces `eye_closed()` a little downward arc with lashes; `eye_dot()`; `mouth()` a small red bow; `blush()` a+ round pink dot with a slightly darker rim and a fine grain; `hair()` a lock of strands interpolated+ between guide curves, each with a coherent wave (neighbours wave together), its own length and a long+ tapering tip, plus a few strays.+ finish `finish()` records a faint paper grain over everything and a very slight softening, applied in render+ (every stage snapshot matches).++API (canvas pixel coordinates; directions in degrees, 0 = to the right, 90 = down; colours are PAINTS names,+ '#rrggbb' or RGB triples)+ surface Sketchbook(W, H, seed, keep_stages, stages_dir); paper(tone, tooth, mottle, fibres); finish(grain, soft)+ masks poly(pts, smooth) / ellipse(cx, cy, rx, ry, rot) / blob(cx, cy, rx, ry, rough) / tube(path, w0, w1) ->+ canvas-sized float masks; tube_pts(path, w0, w1), ellipse_pts(...), closed_pts(pts) (outline points);+ soften(mask, sigma); grow(mask, px) (pass as `avoid` so a line stops short of what is in front)+ lines ink(path, width, colour, alpha, wobble, tremor, taper, flow, grain, gaps, closed, clip, avoid);+ inks(paths, ...) (per-path lists allowed); contour(pts, pieces, gap, overlap, ...)+ colour stripes(mask, colours, across, path, bend, band, gap, tilt, rough, overrun, grain, streak, pressure,+ shift, avoid); tint(mask, colour, angle, strength, grain, streak, hatch, spacing, overrun, shift);+ blush(cx, cy, r, colour, strength); dots(pts, r, colour)+ faces eye_closed(cx, cy, w, sag, lashes, side, rot); eye_dot(cx, cy, r); mouth(cx, cy, w, h, rot);+ hair(guides, n, width, colour, wave, length, start, spread, stray, clip, avoid)+ props leaf(base, tip, width, fill, line, veins, vein, bend, stem); flower(x, y, r, colour, kind, stem);+ tree(x, y, height, colour, lines, branches, lean, blossoms); steam(x, y, height, colour, sway, curl);+ ticks(mask, n, length, angle, colour); squiggle(x, y, size, colour, kind)+ output render(); composite(); stage(name); save(path, stages_dir) -- save('x.jpg') quality 88, 4:4:4 chroma++ import sys; sys.path.insert(0, 'lib')+ from sketchbook import Sketchbook+ p = Sketchbook(1200, 1200, seed=3); p.finish(); p.paper()+ body = [(520, 700), (680, 700), (700, 900), (500, 900)]+ p.contour(body); p.stripes(p.poly(body, smooth=True), ['red', 'yellow', 'teal', 'orange'], across=90, bend=8)+ p.contour([(600, 560), (660, 610), (600, 680), (540, 610)])+ p.eye_closed(578, 615, 22); p.eye_closed(624, 615, 22); p.blush(570, 640, 13); p.blush(632, 640, 13)+ p.mouth(601, 655, 12, 5)+ p.leaf((800, 900), (860, 700), 70, fill='olive'); p.save('sketch.jpg')+"""+import io+import os+import numpy as np+from PIL import Image, ImageDraw+from core import blur, spline, noise2d, smoothstep, blob_pts++PAINTS = {+ # paper and inks+ 'paper': '#f2e9e1', 'paper_light': '#f7f1ea', 'white': '#fbf8f3',+ 'ink': '#24201e', 'ink_soft': '#3e3733', 'sepia': '#6a4f3e', 'graphite': '#7a736d', 'grey': '#b4ada6',+ 'forest_ink': '#1f3326',+ # the stripe colours+ 'red': '#e3322c', 'scarlet': '#d42a30', 'vermilion': '#ec5a2c', 'coral': '#f07c5c', 'orange': '#f39232',+ 'yellow': '#f6cb2a', 'gold': '#efb21c', 'mustard': '#d7a425', 'teal': '#17a19c', 'turquoise': '#38b6c0',+ 'aqua': '#86d0cf', 'blue': '#2f62b0', 'cobalt': '#2b4f9e', 'navy': '#243a70', 'sky': '#90bde0',+ 'magenta': '#d8287b', 'pink': '#ef93ab', 'rose': '#e56a80', 'violet': '#7b5aa6',+ # faces+ 'cheek': '#f08e8a', 'blush': '#ec7d74', 'lip': '#d8262b',+ # props+ 'leaf': '#7f9c48', 'olive': '#a09a35', 'sage': '#98b894', 'moss': '#66803a', 'forest': '#2f5c3c',+ 'terracotta': '#c9663e', 'ochre': '#c9913c', 'tan': '#d9b68c', 'wood': '#b98650', 'cream': '#f5e9d0',+ 'ginger': '#e39646', 'stone': '#9c948c',+}+++def hexc(c):+ """'#rrggbb', a PAINTS name or an RGB triple -> float32 RGB in 0..1"""+ if not isinstance(c, str): return np.asarray(c, np.float32)+ h = PAINTS.get(c, c).lstrip('#')[:6]+ return np.array([int(h[i:i + 2], 16) for i in (0, 2, 4)], np.float32) / 255+++def _equalise(a):+ """rank-equalise to a uniform 0..1 distribution"""+ flat = a.ravel()+ o = np.argsort(flat, kind='stable')+ out = np.empty(flat.size, np.float32)+ out[o] = np.linspace(0, 1, flat.size, dtype=np.float32)+ return out.reshape(a.shape)+++def _resample(P, step):+ P = np.asarray(P, np.float32)+ if len(P) < 2: return P+ d = np.r_[0, np.cumsum(np.linalg.norm(np.diff(P, axis=0), axis=1))]+ if d[-1] < 1e-3: return P[:1]+ s = np.linspace(0, d[-1], max(2, int(d[-1] / step) + 1))+ return np.stack([np.interp(s, d, P[:, 0]), np.interp(s, d, P[:, 1])], 1).astype(np.float32)+++def _closed(P, per=10):+ """a closed Catmull-Rom loop through the points (first point repeated at the end)"""+ P = np.asarray(P, np.float32)+ Q = np.vstack([P[-1:], P, P[:2]])+ L = spline(Q, per)[per:-per]+ return np.vstack([L, L[:1]])+++def _normals(P):+ Tg = np.gradient(P, axis=0) if len(P) > 1 else np.array([[1.0, 0.0]], np.float32)+ Tg = Tg / (np.linalg.norm(Tg, axis=1, keepdims=True) + 1e-6)+ return Tg.astype(np.float32), np.stack([-Tg[:, 1], Tg[:, 0]], 1).astype(np.float32)+++def _noise1(n, sigma, r):+ """smooth 1D noise of unit std, correlation length ~sigma samples"""+ if n < 1: return np.zeros(0, np.float32)+ sigma = float(np.clip(sigma, 0.5, 400))+ m = int(3 * sigma) + 1+ k = np.exp(-0.5 * (np.arange(-m, m + 1) / sigma) ** 2)+ k /= np.sqrt((k * k).sum())+ x = r.standard_normal(n + 2 * m)+ return np.convolve(x, k, mode='valid')[:n].astype(np.float32)+++class Sketchbook:+ PAINTS = PAINTS++ def __init__(self, W=1600, H=1600, seed=0, keep_stages=True, stages_dir=None):+ if W * H > 4096 * 4096: raise ValueError('canvas larger than 4096 x 4096')+ self.W, self.H, self.seed = W, H, seed+ self.rng = np.random.default_rng(seed)+ self.keep_stages, self.stages_dir = keep_stages, stages_dir+ self.stages, self._n_stages = [], 0+ self.base = hexc('paper')+ self.C = np.empty((H, W, 3), np.float32); self.C[:] = self.base+ self.T = None; self.NT = None+ self.fin = None+ self.n_lines = 0++ def _r(self, seed=None):+ return np.random.default_rng(int(self.rng.integers(1 << 30)) if seed is None else seed)++ # ================================================================== paper+ def paper(self, tone='paper', tooth=1.0, mottle=1.0, fibres=1.0, seed=None):+ """warm off-white sketchbook paper: a fine tooth, a very low mottle and a scatter of faint fibres"""+ H, W = self.H, self.W+ r = self._r(seed)+ z = lambda a: (a - a.mean()) / (a.std() + 1e-6)+ g1 = blur(r.random((H, W)).astype(np.float32), 0.6)+ g2 = noise2d(H, W, 3.0, 2, int(r.integers(1 << 30)))+ g3 = noise2d(H, W, 11.0, 2, int(r.integers(1 << 30)))+ self.T = _equalise(0.8 * z(g1) + 0.5 * z(g2) + 0.2 * z(g3))+ del g1, g2, g3+ m1 = noise2d(H, W, 320, 3, int(r.integers(1 << 30))) - 0.5+ m2 = noise2d(H, W, 70, 2, int(r.integers(1 << 30))) - 0.5+ self.base = hexc(tone)+ self.C = (self.base[None, None] * (1 + mottle * (0.02 * m1[..., None] + 0.007 * m2[..., None])+ + 0.016 * tooth * (self.T[..., None] - 0.5))).astype(np.float32)+ del m1, m2+ # a tileable streak texture, sampled in stroke coordinates by the pencil+ q = blur(np.pad(r.random((256, 256)).astype(np.float32), 8, mode='wrap'), 0.8)[8:-8, 8:-8]+ self.NT = _equalise(q)+ rg = np.random.default_rng(self.seed + 7)+ self._grain = rg.standard_normal((H, W), dtype=np.float32)+ if fibres:+ n = int(W * H / 14000 * fibres)+ x = r.uniform(0, W, n); y = r.uniform(0, H, n)+ a = r.uniform(0, np.pi, n); L = r.uniform(4, 16, n)+ paths = []+ for i in range(n):+ bend = r.normal(0, 0.4)+ t = np.linspace(-0.5, 0.5, 5)+ px = x[i] + np.cos(a[i] + bend * t) * L[i] * t+ py = y[i] + np.sin(a[i] + bend * t) * L[i] * t+ paths.append(np.stack([px, py], 1))+ self.inks(paths, width=(0.6, 1.2), colour=['tan', 'stone', 'white'], alpha=(0.06, 0.16), wobble=0.2,+ taper=(2, 3), grain=0.3, seed=int(r.integers(1 << 30)), count=False)+ return self++ def _need(self):+ if self.T is None: self.paper()++ def _tex(self, u, v):+ """bilinear lookup of the tileable streak texture (wraps every 256 texels)"""+ NT = self.NT+ u = np.mod(u, 256.0); v = np.mod(v, 256.0)+ i0 = np.floor(u).astype(np.int32); j0 = np.floor(v).astype(np.int32)+ fu = (u - i0).astype(np.float32); fv = (v - j0).astype(np.float32)+ i1 = (i0 + 1) & 255; j1 = (j0 + 1) & 255+ i0 &= 255; j0 &= 255+ a = NT[j0, i0] * (1 - fu) + NT[j0, i1] * fu+ b = NT[j1, i0] * (1 - fu) + NT[j1, i1] * fu+ return a * (1 - fv) + b * fv++ # ================================================================== masks+ def poly(self, pts, smooth=False, ss=2):+ """filled polygon -> canvas-sized float mask (smooth=True: a closed Catmull-Rom loop through the points)"""+ P = _closed(pts) if smooth else np.asarray(pts, np.float32)+ out = np.zeros((self.H, self.W), np.float32)+ x0, y0 = max(0, int(np.floor(P[:, 0].min())) - 1), max(0, int(np.floor(P[:, 1].min())) - 1)+ x1, y1 = min(self.W, int(np.ceil(P[:, 0].max())) + 2), min(self.H, int(np.ceil(P[:, 1].max())) + 2)+ if x1 <= x0 or y1 <= y0: return out+ im = Image.new('L', ((x1 - x0) * ss, (y1 - y0) * ss), 0)+ ImageDraw.Draw(im).polygon([((float(x) - x0) * ss, (float(y) - y0) * ss) for x, y in P], fill=255)+ out[y0:y1, x0:x1] = np.asarray(im.resize((x1 - x0, y1 - y0), Image.BOX), np.float32) / 255+ return out++ @staticmethod+ def closed_pts(pts, per=10):+ """the smoothed closed outline through the points (what poly(smooth=True) fills)"""+ return _closed(pts, per)++ @staticmethod+ def ellipse_pts(cx, cy, rx, ry=None, rot=0.0, n=72):+ ry = rx if ry is None else ry+ t = np.linspace(0, 2 * np.pi, n + 1)+ c, s = np.cos(np.deg2rad(rot)), np.sin(np.deg2rad(rot))+ x, y = rx * np.cos(t), ry * np.sin(t)+ return np.stack([cx + x * c - y * s, cy + x * s + y * c], 1).astype(np.float32)++ def ellipse(self, cx, cy, rx, ry=None, rot=0.0):+ return self.poly(self.ellipse_pts(cx, cy, rx, ry, rot, 120))++ def blob(self, cx, cy, rx, ry=None, rough=0.08, seed=None, rot=0.0):+ ry = rx if ry is None else ry+ return self.poly(blob_pts(cx, cy, rx, ry, rough, 120, int(self._r(seed).integers(1 << 30)), np.deg2rad(rot)))++ @staticmethod+ def tube_pts(path, w0, w1=None, per=8):+ """outline points of a tube of width w0 -> w1 along a path (an arm, a stem); w0 may be a list"""+ w1 = w0 if w1 is None else w1+ P = spline(path, per) if len(path) > 2 else _resample(path, 4)+ n = len(P)+ _, Nn = _normals(P)+ w = (np.linspace(w0, w1, n) if np.ndim(w0) == 0+ else np.interp(np.linspace(0, 1, n), np.linspace(0, 1, len(w0)), w0))+ w = np.asarray(w, np.float32)[:, None] * 0.5+ return np.vstack([P + Nn * w, (P - Nn * w)[::-1]])++ def tube(self, path, w0, w1=None):+ return self.poly(self.tube_pts(path, w0, w1))++ def soften(self, mask, sigma):+ """a blurred copy of a mask, blurred only round the shape"""+ out = np.zeros((self.H, self.W), np.float32)+ bb = self._bbox(mask, pad=int(3 * sigma) + 4)+ if bb is None: return out+ x0, y0, x1, y1 = bb+ out[y0:y1, x0:x1] = blur(np.asarray(mask[y0:y1, x0:x1], np.float32), sigma)+ return out++ def grow(self, mask, px=2.0):+ """a mask grown by about px (pass it as `avoid` so a line stops just short of what is in front)"""+ return np.clip(self.soften(mask, px) * 3.0, 0, 1)++ @staticmethod+ def _bbox(M, thr=0.004, pad=0):+ rows = np.flatnonzero(M.max(1) > thr); cols = np.flatnonzero(M.max(0) > thr)+ if not len(rows) or not len(cols): return None+ H, W = M.shape+ return (max(0, cols[0] - pad), max(0, rows[0] - pad), min(W, cols[-1] + 1 + pad), min(H, rows[-1] + 1 + pad))++ @staticmethod+ def _shifted(M, dx, dy):+ dx, dy = int(round(dx)), int(round(dy))+ if not dx and not dy: return M+ out = np.zeros_like(M)+ H, W = M.shape+ ys0, ys1 = max(0, dy), min(H, H + dy); xs0, xs1 = max(0, dx), min(W, W + dx)+ out[ys0:ys1, xs0:xs1] = M[ys0 - dy:ys1 - dy, xs0 - dx:xs1 - dx]+ return out++ # ================================================================== ink lines+ def _profile(self, path, width, closed, smooth, wobble, wscale, tremor, taper, wvar, flow, gaps, r):+ P = np.asarray(path, np.float32)+ if len(P) < 2: return None+ if closed: P = _closed(P, 10)+ elif smooth and len(P) > 2: P = spline(P, 8)+ P = _resample(P, 1.0)+ n = len(P)+ if n < 3: return None+ _, Nn = _normals(P)+ off = wobble * _noise1(n, wscale, r) + tremor * _noise1(n, 2.5, r)+ P = P + Nn * off[:, None]+ s = np.r_[0, np.cumsum(np.linalg.norm(np.diff(P, axis=0), axis=1))].astype(np.float32)+ L = float(s[-1])+ t0, t1 = taper+ t0 = min(t0, 0.3 * L); t1 = min(t1, 0.5 * L)+ tin = smoothstep(0, max(t0, 1e-3), s); tout = smoothstep(L, L - max(t1, 1e-3), s)+ w = width * (0.35 + 0.65 * tin) * (0.1 + 0.9 * tout) * (1 + wvar * _noise1(n, 22, r))+ dk = 1 - flow * np.abs(_noise1(n, 45, r))+ if gaps and L > 40:+ k = r.poisson(gaps * L / 220.0)+ for c in r.uniform(0.12 * L, 0.88 * L, k):+ hl = r.uniform(2.0, 5.5)+ w = w * smoothstep(0.5 * hl, 1.6 * hl, np.abs(s - c))+ return P, w.astype(np.float32), np.clip(dk, 0, 1).astype(np.float32)++ def _stamp(self, items, grain, clip, avoid, ss=4):+ """rasterise (P, width, darkness, colour) lines: grouped by colour, drawn run by run (constant width and+ darkness) into a 4x supersampled layer, box-filtered, broken a touch by the tooth, multiplied in"""+ groups = {}+ for P, w, dk, col in items:+ groups.setdefault(tuple(np.round(col, 4).tolist()), []).append((P, w, dk))+ for col, lines in groups.items():+ pad = max(float(np.max(l[1])) for l in lines) + 3+ lo = np.min([l[0].min(0) for l in lines], 0) - pad+ hi = np.max([l[0].max(0) for l in lines], 0) + pad+ x0, y0 = max(0, int(np.floor(lo[0]))), max(0, int(np.floor(lo[1])))+ x1, y1 = min(self.W, int(np.ceil(hi[0]))), min(self.H, int(np.ceil(hi[1])))+ if x1 <= x0 or y1 <= y0: continue+ w, h = x1 - x0, y1 - y0+ im = Image.new('L', (w * ss, h * ss), 0)+ d = ImageDraw.Draw(im)+ org = np.array([x0, y0], np.float32)+ for P, wd, dk in lines:+ Q = ((P - org) * ss).tolist()+ wi = np.round(0.5 * (wd[:-1] + wd[1:]) * ss).astype(np.int32)+ vi = (np.round(0.5 * (dk[:-1] + dk[1:]) * 31) * 8.2).astype(np.int32).clip(0, 255)+ key = wi * 1000 + vi+ j = 0; ns = len(wi)+ while j < ns:+ e = j+ while e + 1 < ns and key[e + 1] == key[j]: e += 1+ if wi[j] > 0 and vi[j] > 0:+ seg = Q[j:e + 2]+ if wi[j] <= 1: d.line(seg, fill=int(vi[j]), width=1)+ else: d.line(seg, fill=int(vi[j]), width=int(wi[j]), joint='curve')+ j = e + 1+ a = np.asarray(im.resize((w, h), Image.BOX), np.float32) * (1.0 / 255)+ del im+ if grain:+ a *= 1 - grain * smoothstep(0.62, 1.0, 1 - self.T[y0:y1, x0:x1])+ if clip is not None: a *= clip[y0:y1, x0:x1]+ if avoid is not None: a *= 1 - np.clip(avoid[y0:y1, x0:x1], 0, 1)+ self._mul(x0, y0, a, np.array(col, np.float32))++ def _mul(self, x0, y0, a, col):+ """multiply a transparent colour into the page (pen ink, pencil, marker)"""+ h, w = a.shape+ k = np.clip(col / np.maximum(self.base, 0.3), 0, 1)+ Cb = self.C[y0:y0 + h, x0:x0 + w]+ Cb *= 1 - np.clip(a, 0, 1)[..., None] * (1 - k)++ def _lighten(self, x0, y0, a, col):+ h, w = a.shape+ Cb = self.C[y0:y0 + h, x0:x0 + w]+ Cb += np.clip(a, 0, 1)[..., None] * (np.asarray(col, np.float32) - Cb)++ def inks(self, paths, width=2.2, colour='ink', alpha=1.0, wobble=1.0, wscale=60.0, tremor=0.22, taper=(5.0, 14.0),+ wvar=0.12, flow=0.12, grain=0.15, gaps=0.0, smooth=True, closed=False, clip=None, avoid=None, seed=None,+ count=True):+ """fine pen lines along a list of paths. width / alpha / colour may be numbers (or names), (lo, hi) ranges+ or per-path lists; wobble: px of slow hand wobble (wscale: its length in px), tremor: px of fast jitter;+ taper: (in, out) px; flow: how much the ink greys along the line; grain: how much the tooth breaks it;+ gaps: pen lifts per 220 px; clip / avoid: masks the ink is kept to / kept off"""+ self._need()+ r = self._r(seed)+ n = len(paths)+ if not n: return 0++ def per(spec, i):+ if isinstance(spec, tuple) and len(spec) == 2: return float(r.uniform(spec[0], spec[1]))+ if isinstance(spec, (list, np.ndarray)) and len(spec) == n: return float(spec[i])+ return float(spec)+ items = []+ for i, path in enumerate(paths):+ col = colour+ if isinstance(colour, (list, tuple)) and colour and all(isinstance(c, str) for c in colour):+ col = colour[i] if len(colour) == n else colour[int(r.integers(len(colour)))]+ prof = self._profile(path, per(width, i), closed, smooth, wobble, wscale, tremor, taper, wvar, flow,+ gaps, r)+ if prof is None: continue+ P, w, dk = prof+ items.append((P, w, dk * per(alpha, i), hexc(col)))+ self._stamp(items, grain, clip, avoid)+ if count: self.n_lines += len(items)+ return len(items)++ def ink(self, path, width=2.2, colour='ink', **kw):+ """one fine pen line along `path` (smoothed through the points)"""+ return self.inks([path], width, colour, **kw)++ def contour(self, pts, pieces=(1, 3), gap=(3.0, 12.0), overlap=(4.0, 14.0), p_gap=0.6, smooth=True, closed=True,+ seed=None, **kw):+ """a closed outline drawn the quick way: one to three strokes that leave a small gap or run past each+ other at the joins (never a perfectly closed vector loop)"""+ r = self._r(seed)+ P = _closed(pts, 10) if (smooth and closed) else (spline(pts, 8) if smooth and len(pts) > 2+ else np.asarray(pts, np.float32))+ P = _resample(P, 1.0)+ n = len(P)+ if n < 6: return 0+ k = int(r.integers(pieces[0], pieces[1] + 1)) if isinstance(pieces, tuple) else int(pieces)+ if not closed:+ return self.inks([P], seed=int(r.integers(1 << 30)), **kw)+ start = int(r.integers(n))+ cuts = np.sort((start + np.sort(r.uniform(0, n, k - 1)).astype(int)) % n) if k > 1 else np.array([], int)+ cuts = np.r_[start, cuts] if k > 1 else np.array([start])+ cuts = np.unique(cuts)+ paths = []+ for i in range(len(cuts)):+ a = cuts[i]; b = cuts[(i + 1) % len(cuts)] if len(cuts) > 1 else cuts[0] + n+ if b <= a: b += n+ if r.random() < p_gap:+ b = b - int(r.uniform(*gap))+ else:+ b = b + int(r.uniform(*overlap))+ idx = np.arange(a, max(a + 3, b)) % n+ paths.append(P[idx])+ return self.inks(paths, smooth=False, seed=int(r.integers(1 << 30)), **kw)++ # ================================================================== colour pencil / marker+ def _uv(self, bb, angle):+ """stroke coordinates in a box: u along `angle`, s across it"""+ x0, y0, x1, y1 = bb+ Y, X = np.mgrid[y0:y1, x0:x1].astype(np.float32)+ a = np.deg2rad(angle)+ return X * np.cos(a) + Y * np.sin(a), -X * np.sin(a) + Y * np.cos(a)++ def _pencil(self, bb, A, colour, u, s, grain, streak, pressure, hatch=0.0, spacing=7.0, r=None):+ """lay colour pencil / marker over coverage A (box bb) with strokes along u: long streaks along the stroke,+ an elongated grain, the pigment catching the tooth (grain) or lying flat (marker)"""+ x0, y0, x1, y1 = bb+ o = r.uniform(0, 256, 4)+ St = self._tex(u / 17.0 + o[0], s / 1.4 + o[1])+ Sg = self._tex(u / 3.2 + o[2], s / 0.85 + o[3])+ p = pressure * (1 - streak * 0.55 * (St - 0.5) * 2)+ if hatch:+ ph = r.uniform(0, 2 * np.pi)+ p = p * (1 - hatch * 0.5 * (1 + np.cos(2 * np.pi * s / spacing + ph + 1.5 * St)))+ p = np.clip(p, 0, 1)+ g = 0.55 * self.T[y0:y1, x0:x1] + 0.45 * Sg+ cpen = smoothstep(1 - p - 0.13, 1 - p + 0.13, g)+ cov = (1 - grain) * p + grain * cpen+ col = hexc(colour)+ if colour == 'paper' or colour == 'white':+ self._lighten(x0, y0, A * cov, col)+ else:+ self._mul(x0, y0, A * cov, col)++ def _ends(self, M, bb, overrun):+ """blurred garment mask in the box (each band re-finds its ends on it with a threshold of its own)"""+ x0, y0, x1, y1 = bb+ return blur(M[y0:y1, x0:x1].astype(np.float32), max(0.5, overrun))++ def tint(self, mask, colour, angle=45.0, strength=0.9, grain=0.5, streak=0.5, pressure=0.9, hatch=0.0,+ spacing=7.0, overrun=2.5, shift=(0.0, 0.0), edge=0.12, clip=None, avoid=None, seed=None):+ """colour a shape with colour pencil / marker laid along `angle`: grain 0 = marker (flat with streaks),+ 1 = pencil on the tooth (white specks); hatch draws visible parallel lines `spacing` px apart; the colour+ is set `shift` px off the shape and its edge overruns or falls short by up to ~overrun px"""+ self._need()+ r = self._r(seed)+ M = self._shifted(np.asarray(mask, np.float32), *shift)+ if avoid is not None: M = M * (1 - np.clip(avoid, 0, 1))+ bb = self._bbox(M, pad=int(2 * overrun) + 3)+ if bb is None: return 0+ x0, y0, x1, y1 = bb+ u, s = self._uv(bb, angle)+ G = self._ends(M, bb, overrun)+ th = 0.5 + 0.28 * (self._tex(u / 45.0 + r.uniform(0, 256), s / 45.0 + r.uniform(0, 256)) - 0.5) * 2+ St = self._tex(u / 6.0 + r.uniform(0, 256), s / 1.4 + r.uniform(0, 256))+ A = smoothstep(th - edge, th + edge, G + 0.1 * (St - 0.5)) * strength+ if clip is not None: A = A * clip[y0:y1, x0:x1]+ self._pencil(bb, A, colour, u, s, grain, streak, pressure, hatch, spacing, r)+ return 1++ def stripes(self, mask, colours, across=90.0, path=None, bend=0.0, band=(16.0, 28.0), gap=(5.0, 14.0), tilt=0.035,+ rough=2.2, overrun=3.0, grain=(0.2, 0.75), streak=0.55, pressure=(0.8, 0.97), shift=(0.0, 0.0),+ start=None, order='cycle', widths=None, clip=None, avoid=None, seed=None):+ """fill a garment mask with loose hand-drawn bands of colour pencil / marker. Bands run across `across`+ (degrees: 90 = horizontal bands stacked downward) or across a centre-line `path` (a sleeve: the bands wrap+ round it); bend (px) bows them into a smile (+) or a frown (-); each band takes the next colour (order+ 'cycle' or 'random'), a width in `band` (or `widths`, a list), a paper gap in `gap`, its own small tilt,+ grain and pressure, two independently wandering edges (rough px) and ends that overrun or fall short of the+ mask by up to ~overrun px. Returns the list of (s0, s1, colour) bands."""+ self._need()+ r = self._r(seed)+ M = self._shifted(np.asarray(mask, np.float32), *shift)+ if avoid is not None: M = M * (1 - np.clip(avoid, 0, 1))+ bb = self._bbox(M, pad=int(2 * overrun) + 4)+ if bb is None: return []+ x0, y0, x1, y1 = bb+ Y, X = np.mgrid[y0:y1, x0:x1].astype(np.float32)+ if path is not None:+ Pp = _resample(spline(path, 10) if len(path) > 2 else np.asarray(path, np.float32), 2.0)+ Tg, Nn = _normals(Pp)+ cum = np.r_[0, np.cumsum(np.linalg.norm(np.diff(Pp, axis=0), axis=1))].astype(np.float32)+ xf, yf = X.ravel(), Y.ravel()+ best = np.zeros(len(xf), np.int32)+ bd = np.full(len(xf), 1e18, np.float32)+ for j in range(len(Pp)):+ dd = (xf - Pp[j, 0]) ** 2 + (yf - Pp[j, 1]) ** 2+ m = dd < bd+ bd[m] = dd[m]; best[m] = j+ dx, dy = xf - Pp[best, 0], yf - Pp[best, 1]+ s = (cum[best] + dx * Tg[best, 0] + dy * Tg[best, 1]).reshape(X.shape)+ u = (dx * Nn[best, 0] + dy * Nn[best, 1]).reshape(X.shape)+ del xf, yf, dx, dy, bd, best+ else:+ a = np.deg2rad(across)+ s = X * np.cos(a) + Y * np.sin(a); u = -X * np.sin(a) + Y * np.cos(a)+ Mb = M[y0:y1, x0:x1]+ inside = Mb > 0.5+ if not inside.any(): return []+ uc = float(u[inside].mean()); hw = max(1.0, 0.5 * float(u[inside].max() - u[inside].min()))+ if bend: s = s + bend * ((u - uc) / hw) ** 2+ smin, smax = float(s[inside].min()), float(s[inside].max())+ G = self._ends(M, bb, overrun)+ cols = list(colours)+ pos = smin - r.uniform(0, gap[1]) if start is None else smin + start+ bands = []+ i = 0+ while pos < smax:+ bw = widths[i % len(widths)] if widths is not None else r.uniform(*band)+ col = cols[i % len(cols)] if order == 'cycle' else cols[int(r.integers(len(cols)))]+ bands.append((pos, pos + bw, col))+ pos += bw + r.uniform(*gap)+ i += 1+ for k, (a0, a1, col) in enumerate(bands):+ tk = r.normal(0, tilt)+ sk = s + tk * (u - uc)+ sel = (sk > a0 - rough - 3) & (sk < a1 + rough + 3) & (G > 0.02)+ if not sel.any(): continue+ rows = np.flatnonzero(sel.any(1)); cs = np.flatnonzero(sel.any(0))+ ry0, ry1, rx0, rx1 = rows[0], rows[-1] + 1, cs[0], cs[-1] + 1+ sub = (x0 + rx0, y0 + ry0, x0 + rx1, y0 + ry1)+ uu = u[ry0:ry1, rx0:rx1]; ss_ = sk[ry0:ry1, rx0:rx1]+ o = r.uniform(0, 256, 6)+ e0 = rough * (self._tex(uu / 38.0 + o[0], o[1]) - 0.5) * 2+ e1 = rough * (self._tex(uu / 38.0 + o[2], o[3]) - 0.5) * 2+ fz = 0.9 * (self._tex(uu / 4.0 + o[4], ss_ / 3.0 + o[5]) - 0.5)+ B = smoothstep(a0 + e0 - 0.9, a0 + e0 + 0.9, ss_ + fz) * smoothstep(a1 + e1 + 0.9, a1 + e1 - 0.9, ss_ - fz)+ th = float(np.clip(r.normal(0.5, 0.13), 0.2, 0.8))+ Gs = G[ry0:ry1, rx0:rx1]+ St = self._tex(uu / 5.0 + o[1], ss_ / 1.3 + o[3])+ E = smoothstep(th - 0.1, th + 0.1, Gs + 0.16 * (St - 0.5))+ A = B * E+ if clip is not None: A = A * clip[sub[1]:sub[3], sub[0]:sub[2]]+ gk = r.uniform(*grain) if isinstance(grain, tuple) else grain+ pk = r.uniform(*pressure) if isinstance(pressure, tuple) else pressure+ self._pencil(sub, A, col, uu, ss_, gk, streak, pk, 0.0, 7.0, r)+ return bands++ def blush(self, cx, cy, r_, colour='cheek', strength=0.95, ry=None, grain=0.3, rim=0.3, rough=0.05, seed=None):+ """a round blush dot: a soft-edged disc of fine-grained colour with a slightly darker rim"""+ self._need()+ r = self._r(seed)+ ry = r_ if ry is None else ry+ P = blob_pts(cx, cy, r_, ry, rough, 90, int(r.integers(1 << 30)))+ M = self.poly(P)+ bb = self._bbox(M, pad=4)+ if bb is None: return 0+ x0, y0, x1, y1 = bb+ Mb = blur(M[y0:y1, x0:x1], 0.7)+ Y, X = np.mgrid[y0:y1, x0:x1].astype(np.float32)+ d = np.sqrt(((X - cx) / r_) ** 2 + ((Y - cy) / ry) ** 2)+ A = Mb * strength * (0.82 + rim * smoothstep(0.55, 0.98, d)) * (1 + 0.08 * (self._tex(X / 9, Y / 9) - 0.5))+ u, s = self._uv(bb, r.uniform(20, 70))+ self._pencil(bb, A, colour, u, s, grain, 0.3, 0.95, 0.0, 7.0, r)+ return 1++ def dots(self, pts, r_=3.0, colour='pink', strength=0.85, seed=None):+ """small pencil / marker dots (blossoms, buttons, freckles)"""+ r = self._r(seed)+ for x, y in pts:+ rr = r_ * r.uniform(0.75, 1.2)+ self.blush(x, y, rr, colour, strength, rr * r.uniform(0.8, 1.1), 0.25, 0.15, 0.12,+ seed=int(r.integers(1 << 30)))+ return len(pts)++ # ================================================================== faces+ def eye_closed(self, cx, cy, w, sag=None, lashes=3, side=1, rot=0.0, width=2.0, colour='ink', seed=None):+ """a closed eye: a small downward arc (a smile-shaped lid line) with `lashes` short lashes ticking down and+ out from its outer half (`side` = +1 if the outer corner is on the right)"""+ r = self._r(seed)+ sag = 0.28 * w if sag is None else sag+ c, s = np.cos(np.deg2rad(rot)), np.sin(np.deg2rad(rot))+ L = lambda pts: np.array([(cx + u * c - v * s, cy + u * s + v * c) for u, v in pts], np.float32)+ t = np.linspace(-1, 1, 9)+ arc = L([(0.5 * w * x, sag * (1 - x * x) - 0.08 * sag) for x in t])+ n = self.ink(arc, width, colour, taper=(2.5, 4.0), wobble=0.25, tremor=0.12, seed=int(r.integers(1 << 30)))+ paths = []+ for i in range(lashes):+ x = side * (0.15 + 0.75 * (i + 0.5) / max(1, lashes))+ y = sag * (1 - x * x) - 0.08 * sag+ ang = np.deg2rad(90 - side * (20 + 45 * (i + 0.5) / max(1, lashes)))+ ln = w * r.uniform(0.2, 0.3)+ p0 = (0.5 * w * x, y)+ paths.append(L([p0, (p0[0] + np.cos(ang) * ln, p0[1] + np.sin(ang) * ln)]))+ if paths:+ n += self.inks(paths, width * 0.75, colour, taper=(1.0, 3.0), wobble=0.1, tremor=0.08,+ seed=int(r.integers(1 << 30)))+ return n++ def eye_dot(self, cx, cy, r_=3.2, colour='ink'):+ """a dot eye"""+ return self.dots([(cx, cy)], r_, colour, 0.95)++ def mouth(self, cx, cy, w, h=None, colour='lip', rot=0.0, smile=0.0, seed=None):+ """a small red mouth: a tiny bow of two lips laid in marker with a darker line between"""+ r = self._r(seed)+ h = 0.4 * w if h is None else h+ c, s = np.cos(np.deg2rad(rot)), np.sin(np.deg2rad(rot))+ L = lambda pts: [(cx + u * c - v * s, cy + u * s + v * c) for u, v in pts]+ hw = 0.5 * w; sm = smile * 0.3 * h+ up = L([(-hw, -sm), (-0.4 * hw, -0.45 * h), (0, -0.25 * h), (0.4 * hw, -0.45 * h), (hw, -sm), (0, 0.05 * h)])+ lo = L([(-0.8 * hw, -sm * 0.8), (0, 0.08 * h), (0.8 * hw, -sm * 0.8), (0.3 * hw, 0.5 * h), (-0.3 * hw, 0.5 * h)])+ M = np.clip(self.poly(up, smooth=True) + self.poly(lo, smooth=True), 0, 1)+ self.tint(M, colour, rot + 10, 0.92, 0.15, 0.3, 0.95, overrun=0.6, edge=0.2, seed=int(r.integers(1 << 30)))+ self.ink(L([(-0.85 * hw, -sm * 0.85), (0, 0.06 * h), (0.85 * hw, -sm * 0.85)]), max(1.0, 0.11 * h), 'scarlet',+ alpha=0.8, taper=(1.5, 2.5), wobble=0.1, seed=int(r.integers(1 << 30)))+ return 1++ def hair(self, guides, n=40, width=2.2, colour='ink', wave=(4.0, 80.0), wave_root=0.25, length=(0.8, 1.0),+ start=(0.0, 0.05), spread=1.0, stray=0.06, alpha=(0.82, 1.0), taper=(4.0, 40.0), jitter=1.2,+ cohere=2.5, clip=None, avoid=None, seed=None):+ """a lock of hair as n separate fine strands interpolated between guide curves (two or more polylines from+ root to tip, in order across the lock): each strand starts near the root (`start`), ends at its own+ fraction of the length (`length`), waves (`wave` = (amplitude px, period px)) in phase with its+ neighbours (`cohere` turns of phase across the lock), the wave growing from root (`wave_root`) to tip, and+ thins to a long tip; `stray` is the share of strands that wander off as flyaways"""+ r = self._r(seed)+ K = len(guides)+ if K < 2: raise ValueError('hair() needs two or more guide curves')+ m = 90+ G = []+ for g in guides:+ g = np.asarray(g, np.float32)+ g = spline(g, 10) if len(g) > 2 else g+ d = np.r_[0, np.cumsum(np.linalg.norm(np.diff(g, axis=0), axis=1))]+ q = np.linspace(0, d[-1], m)+ G.append(np.stack([np.interp(q, d, g[:, 0]), np.interp(q, d, g[:, 1])], 1))+ G = np.stack(G).astype(np.float32)+ ph0 = r.uniform(0, 2 * np.pi)+ paths, ws, als = [], [], []+ for i in range(n):+ t = (i + r.uniform(0.15, 0.85)) / n+ t = 0.5 + (t - 0.5) * spread+ g = np.clip(t, 0, 1) * (K - 1)+ k = min(int(g), K - 2); f = g - k+ B = G[k] * (1 - f) + G[k + 1] * f+ s0 = r.uniform(*start); s1 = r.uniform(*length)+ if s1 - s0 < 0.08: continue+ q = np.linspace(s0, s1, max(8, int((s1 - s0) * m)))+ idx = q * (m - 1)+ P = np.stack([np.interp(idx, np.arange(m), B[:, 0]), np.interp(idx, np.arange(m), B[:, 1])], 1)+ P = _resample(P, 2.0)+ if len(P) < 4: continue+ _, Nn = _normals(P)+ arc = np.r_[0, np.cumsum(np.linalg.norm(np.diff(P, axis=0), axis=1))]+ frac = np.linspace(s0, s1, len(P))+ amp, per_ = wave+ is_stray = r.random() < stray+ if is_stray: amp, per_ = amp * r.uniform(1.6, 2.6), per_ * r.uniform(0.7, 1.3)+ ph = ph0 + 2 * np.pi * cohere * t + r.normal(0, 0.35) + (r.uniform(0, 2 * np.pi) if is_stray else 0)+ env = wave_root + (1 - wave_root) * frac+ off = amp * env * np.sin(2 * np.pi * (arc + s0 * 300) / per_ + ph) + jitter * r.normal() * frac+ if is_stray: off = off + r.normal(0, amp) * frac ** 2+ paths.append(P + Nn * off[:, None])+ ws.append(width * r.uniform(0.75, 1.15) * (0.75 if is_stray else 1.0))+ als.append(r.uniform(*alpha) if isinstance(alpha, tuple) else alpha)+ return self.inks(paths, ws, colour, als, wobble=0.5, wscale=40, tremor=0.15, taper=taper, flow=0.1,+ grain=0.12, clip=clip, avoid=avoid, seed=int(r.integers(1 << 30)))++ # ================================================================== props+ def leaf(self, base, tip, width, fill=None, line='ink', veins=6, vein='line', vein_colour=None, bend=0.08,+ asym=0.08, stem=0.0, stem_bend=0.1, lw=1.8, fill_shift=(3.0, -2.0), strength=0.85, grain=0.5,+ hatch=0.0, rib=True, seed=None):+ """a single leaf from `base` to `tip`: an outline (ink or a coloured line, a small gap at the tip), a midrib,+ `veins` pairs of veins slanting toward the tip ('line' = drawn, 'white' = reserved in the fill, None),+ an optional colour-pencil `fill` set a little off the line, and an optional `stem` (px) below the base.+ Returns the leaf's mask."""+ r = self._r(seed)+ B = np.asarray(base, np.float32); Tp = np.asarray(tip, np.float32)+ ax = Tp - B; L = float(np.linalg.norm(ax)) + 1e-6+ dn = ax / L; nr = np.array([-dn[1], dn[0]], np.float32)+ t = np.linspace(0, 1, 40)[:, None]+ mid = B + ax * t + nr * (bend * L * np.sin(np.pi * t))+ prof = (np.sin(np.pi * np.clip(t, 0, 1) ** 0.85) ** 0.9) * 0.5 * width+ left = mid + nr * prof * (1 + asym); right = mid - nr * prof * (1 - asym)+ outline = np.vstack([left, right[::-1]])+ M = self.poly(outline)+ ang = float(np.degrees(np.arctan2(dn[1], dn[0])))+ if fill:+ self.tint(M, fill, ang + 50, strength, grain, 0.5, 0.92, hatch, 6.0, 2.0, fill_shift,+ seed=int(r.integers(1 << 30)))+ lc = line+ if vein == 'white':+ paths = []+ for i in range(veins):+ tv = 0.12 + 0.75 * (i + 0.5) / veins+ for sd, ed in ((1, left), (-1, right)):+ p0 = B + ax * tv + nr * (bend * L * np.sin(np.pi * tv))+ te = min(0.98, tv + 0.16)+ p1 = ed[int(te * 39)] * 0.85 + p0 * 0.15+ paths.append(np.array([p0, 0.5 * (p0 + p1) + dn * 2, p1], np.float32))+ paths.append(mid[2:-3])+ self._lighten_lines(paths, lw * 1.2, M, r, hexc(vein_colour) if vein_colour else self.base * 1.01)+ if lc:+ self.contour(outline, pieces=(1, 2), gap=(2, 6), overlap=(3, 8), width=lw, colour=lc,+ seed=int(r.integers(1 << 30)))+ if rib: self.ink(mid[1:-2], lw * 0.9, lc, taper=(2, 8), seed=int(r.integers(1 << 30)))+ if vein == 'line' and veins:+ paths = []+ for i in range(veins):+ tv = 0.1 + 0.78 * (i + 0.5) / veins+ for ed in (left, right):+ p0 = B + ax * tv + nr * (bend * L * np.sin(np.pi * tv))+ te = min(0.97, tv + r.uniform(0.1, 0.18))+ wv = r.uniform(0.82, 0.95)+ p1 = ed[int(te * 39)] * wv + p0 * (1 - wv)+ paths.append(np.array([p0, 0.55 * p0 + 0.45 * p1 + dn * 1.5, p1], np.float32))+ self.inks(paths, lw * 0.7, vein_colour or lc, alpha=0.85, taper=(1.5, 5), wobble=0.3,+ seed=int(r.integers(1 << 30)))+ if stem:+ sp = [B, B - dn * stem * 0.5 + nr * stem * stem_bend, B - dn * stem]+ self.ink(sp, lw, lc or 'ink', taper=(2, 10), seed=int(r.integers(1 << 30)))+ return M++ def _lighten_lines(self, paths, width, clip, r, col):+ """reserve veins in a fill: lift the colour back toward the paper (or `col`) along the lines"""+ items = []+ for P in paths:+ prof = self._profile(P, width, False, True, 0.3, 40, 0.1, (2, 5), 0.1, 0.05, 0, r)+ if prof is not None: items.append(prof)+ if not items: return+ pad = width + 3+ lo = np.min([p[0].min(0) for p in items], 0) - pad; hi = np.max([p[0].max(0) for p in items], 0) + pad+ x0, y0 = max(0, int(lo[0])), max(0, int(lo[1])); x1, y1 = min(self.W, int(hi[0]) + 1), min(self.H, int(hi[1]) + 1)+ ss = 4+ im = Image.new('L', ((x1 - x0) * ss, (y1 - y0) * ss), 0)+ d = ImageDraw.Draw(im)+ for P, w, _ in items:+ d.line(((P - [x0, y0]) * ss).tolist(), fill=255, width=max(1, int(round(float(np.median(w)) * ss))),+ joint='curve')+ a = np.asarray(im.resize((x1 - x0, y1 - y0), Image.BOX), np.float32) / 255+ a *= clip[y0:y1, x0:x1] * 0.85+ self._lighten(x0, y0, a, col)++ def flower(self, x, y, r_=14.0, colour='red', kind='rose', stem=0.0, stem_colour='forest', leaves=1, lw=1.8,+ seed=None):+ """a little flower: 'rose' a scribbled spiral with a couple of loose petals, 'daisy' petal loops round a+ dot, 'tulip' a pencil-filled cup with three points; `stem` px of stem below with `leaves` small leaves"""+ r = self._r(seed)+ if stem:+ sx = x + r.normal(0, 0.1 * stem)+ sp = [(x, y + r_ * 0.6), (0.5 * (x + sx) + r.normal(0, 4), y + stem * 0.5), (sx, y + stem)]+ self.ink(sp, lw, stem_colour, taper=(2, 6), grain=0.35, seed=int(r.integers(1 << 30)))+ for i in range(leaves):+ ty = y + stem * r.uniform(0.35, 0.8)+ sd = 1 if i % 2 == 0 else -1+ bx = x + (sx - x) * (ty - y) / stem+ self.leaf((bx, ty), (bx + sd * r_ * 1.6, ty - r_ * 1.2), r_ * 0.7, line=stem_colour, veins=0,+ rib=True, lw=lw * 0.9, seed=int(r.integers(1 << 30)))+ if kind == 'rose':+ th = np.linspace(0, 4.2 * np.pi, 80)+ rad = r_ * (0.15 + 0.85 * th / th[-1]) * (1 + 0.12 * np.sin(3 * th))+ P = np.stack([x + rad * np.cos(th), y + 0.85 * rad * np.sin(th)], 1)+ self.ink(P, lw, colour, taper=(2, 8), grain=0.35, seed=int(r.integers(1 << 30)))+ arcs = []+ for k in range(2):+ a0 = r.uniform(0, 2 * np.pi); t = np.linspace(a0, a0 + r.uniform(1.6, 2.6), 12)+ rr = r_ * r.uniform(1.05, 1.3)+ arcs.append(np.stack([x + rr * np.cos(t), y + 0.85 * rr * np.sin(t) + 2], 1))+ self.inks(arcs, lw * 0.9, colour, taper=(2, 6), grain=0.35, seed=int(r.integers(1 << 30)))+ elif kind == 'daisy':+ k = int(r.integers(6, 9))+ petals = []+ for i in range(k):+ a = 2 * np.pi * i / k + r.normal(0, 0.12)+ t = np.linspace(-1, 1, 11)+ px = (0.3 + 0.7 * (1 - t * t)) * r_ * (0.35 + 0.65 * np.abs(np.sin(np.pi * (t + 1) / 2)))+ ln = r_ * (0.3 + 0.7 * np.sin(np.pi * (t + 1) / 2))+ wdt = 0.3 * r_ * np.sin(np.pi * (t + 1))+ petals.append(np.stack([x + np.cos(a) * ln - np.sin(a) * wdt, y + np.sin(a) * ln + np.cos(a) * wdt], 1))+ self.inks(petals, lw * 0.9, colour, taper=(1.5, 4), grain=0.3, seed=int(r.integers(1 << 30)))+ self.dots([(x, y)], r_ * 0.22, 'gold')+ else: # tulip+ pts = [(x - r_, y - 0.1 * r_), (x - 0.95 * r_, y - r_), (x - 0.45 * r_, y - 0.55 * r_), (x, y - 1.15 * r_),+ (x + 0.45 * r_, y - 0.55 * r_), (x + 0.95 * r_, y - r_), (x + r_, y - 0.1 * r_),+ (x + 0.6 * r_, y + 0.6 * r_), (x - 0.6 * r_, y + 0.6 * r_)]+ M = self.poly(pts, smooth=False)+ self.tint(M, colour, -60, 0.9, 0.65, 0.6, 0.9, 0.25, 4.0, 2.5, seed=int(r.integers(1 << 30)))+ return 1++ def tree(self, x, y, height, colour='forest', lines=4, branches=7, lean=0.03, spread=1.0, width=1.7, trunk=None,+ blossoms=None, n_blossom=10, alpha=0.95, grain=0.4, seed=None):+ """a thin tree drawn in coloured line: a trunk of `lines` roughly parallel wobbly strokes that part into+ `branches` up-and-out branches, each with a twig or two and a little fork at the tip; optional blossom dots"""+ r = self._r(seed)+ tw = height * 0.03 if trunk is None else trunk+ top = np.array([x + lean * height, y - height], np.float32)+ paths, wds = [], []+ for i in range(lines):+ o = (i / max(1, lines - 1) - 0.5) * tw + r.normal(0, tw * 0.12)+ ys = np.linspace(y, y - height * r.uniform(0.86, 1.0), 9)+ xs = x + o * np.linspace(1, 0.35, 9) + lean * (y - ys) + r.normal(0, tw * 0.08, 9)+ paths.append(np.stack([xs, ys], 1)); wds.append(width * r.uniform(0.8, 1.15))+ hs = np.sort(r.uniform(0.28, 0.92, branches))+ sides = np.where(np.arange(branches) % 2 == 0, 1, -1) * (1 if r.random() < 0.5 else -1)+ tips = []+ for h, sd in zip(hs, sides):+ b0 = np.array([x + lean * height * h + sd * tw * 0.3, y - height * h], np.float32)+ ang = np.deg2rad(-90 + sd * r.uniform(22, 48) * spread)+ ln = height * r.uniform(0.14, 0.3) * (1.15 - 0.6 * h)+ b1 = b0 + ln * np.array([np.cos(ang), np.sin(ang)], np.float32)+ bm = 0.5 * (b0 + b1) + r.normal(0, ln * 0.06, 2)+ for j in range(int(r.integers(1, 3))):+ off = np.array([sd * j * 2.5, 0], np.float32)+ paths.append(np.array([b0 + off, bm + off, b1 + off * 0.3], np.float32)); wds.append(width * 0.9)+ for j in range(int(r.integers(1, 3))):+ tt = r.uniform(0.4, 0.75)+ c0 = b0 + (b1 - b0) * tt+ a2 = ang + np.deg2rad(r.choice([-1, 1]) * r.uniform(25, 45))+ l2 = ln * r.uniform(0.3, 0.5)+ c1 = c0 + l2 * np.array([np.cos(a2), np.sin(a2)], np.float32)+ paths.append(np.array([c0, 0.5 * (c0 + c1) + r.normal(0, 1.5, 2), c1], np.float32))+ wds.append(width * 0.75); tips.append(c1)+ for j in (-1, 1):+ a3 = ang + np.deg2rad(j * r.uniform(12, 30))+ c1 = b1 + ln * r.uniform(0.12, 0.25) * np.array([np.cos(a3), np.sin(a3)], np.float32)+ paths.append(np.array([b1, c1], np.float32)); wds.append(width * 0.6); tips.append(c1)+ for j in (-1, 1):+ a3 = np.deg2rad(-90 + j * r.uniform(8, 25))+ c1 = top + height * 0.08 * np.array([np.cos(a3), np.sin(a3)], np.float32)+ paths.append(np.array([top + [0, height * 0.06], c1], np.float32)); wds.append(width * 0.7); tips.append(c1)+ self.inks(paths, wds, colour, alpha, taper=(3, 18), grain=grain, wobble=0.8, seed=int(r.integers(1 << 30)))+ if blossoms and tips:+ sel = r.choice(len(tips), min(n_blossom, len(tips)), replace=False)+ self.dots([tuple(np.asarray(tips[i]) + r.normal(0, 3, 2)) for i in sel], 2.6, blossoms, 0.8)+ return len(paths)++ def steam(self, x, y, height, colour='graphite', sway=18.0, curl=1.0, width=1.5, alpha=0.75, strands=1,+ lean=0.12, seed=None):+ """a fine curl of steam rising from (x, y): a lazy S-curve that ends in a loose spiral (`curl` its turns;+ 0 = no curl); `strands` > 1 adds fainter, shorter companions without the curl"""+ r = self._r(seed)+ paths, als = [], []+ for k in range(strands):+ ph = r.uniform(0, 2 * np.pi)+ hk = height * (1 - 0.25 * k) * r.uniform(0.9, 1.05)+ t = np.linspace(0, 1, 9)+ xs = x + k * sway * 0.6 + sway * np.sin(2 * np.pi * 0.9 * t + ph) * (0.25 + 0.75 * t) + lean * hk * t+ ys = y - 0.78 * hk * t+ pts = list(zip(xs, ys))+ if curl and k == 0:+ ex, ey = pts[-1]+ dx = xs[-1] - xs[-2]+ sg = 1 if dx >= 0 else -1+ R = max(sway, 0.09 * hk) * r.uniform(0.9, 1.2)+ cx, cy = ex + sg * R, ey - 0.2 * R+ a0 = np.arctan2(ey - cy, ex - cx)+ th = a0 - sg * np.linspace(0, 2 * np.pi * curl, 24)[1:]+ rad = R * np.linspace(1, 0.35, len(th) + 1)[1:]+ pts += list(zip(cx + rad * np.cos(th), cy + rad * np.sin(th)))+ paths.append(np.array(pts, np.float32)); als.append(alpha * (1 - 0.4 * k))+ return self.inks(paths, width, colour, als, taper=(14, 30), wobble=0.5, flow=0.25, grain=0.2,+ seed=int(r.integers(1 << 30)))++ def ticks(self, mask, n=30, length=(5, 10), angle=90.0, spread=20.0, width=1.4, colour='ink', alpha=0.8,+ seed=None):+ """short marks scattered inside a mask (fur, grass, texture), each `length` px along `angle` +- spread"""+ r = self._r(seed)+ M = np.asarray(mask, np.float32)+ bb = self._bbox(M)+ if bb is None: return 0+ x0, y0, x1, y1 = bb+ xs, ys = [], []+ tries = 0+ while len(xs) < n and tries < n * 40:+ tries += 1+ px, py = r.uniform(x0, x1), r.uniform(y0, y1)+ if M[int(py), int(px)] > 0.6: xs.append(px); ys.append(py)+ paths = []+ for px, py in zip(xs, ys):+ a = np.deg2rad(angle + r.normal(0, spread)); ln = r.uniform(*length)+ paths.append(np.array([(px, py), (px + np.cos(a) * ln * 0.5 + r.normal(0, 0.5), py + np.sin(a) * ln * 0.5),+ (px + np.cos(a) * ln, py + np.sin(a) * ln)], np.float32))+ return self.inks(paths, width, colour, alpha, taper=(1.5, 3.5), wobble=0.2, seed=int(r.integers(1 << 30)))++ def squiggle(self, x, y, size=16.0, colour='ink', kind='spiral', width=1.4, alpha=0.8, seed=None):+ """a tiny doodle mark in the empty paper: 'spiral', 'sparkle' (a four-line star) or 'loop' -- never fake+ writing"""+ r = self._r(seed)+ if kind == 'spiral':+ th = np.linspace(0, 3.3 * np.pi, 60)+ rad = size * 0.5 * th / th[-1]+ P = np.stack([x + rad * np.cos(th), y + rad * np.sin(th)], 1)+ return self.ink(P, width, colour, alpha=alpha, taper=(2, 6), seed=int(r.integers(1 << 30)))+ if kind == 'sparkle':+ paths = []+ for a in (0, 90, 45, 135):+ ln = size * (0.5 if a % 90 == 0 else 0.28)+ d = np.array([np.cos(np.deg2rad(a)), np.sin(np.deg2rad(a))]) * ln+ paths.append(np.array([(x - d[0], y - d[1]), (x + d[0], y + d[1])], np.float32))+ return self.inks(paths, width, colour, alpha, taper=(3, 3), seed=int(r.integers(1 << 30)))+ t = np.linspace(0, 1, 70)+ P = np.stack([x + size * (t - 0.5) * 1.6 + 0.3 * size * np.sin(2 * np.pi * 2 * t),+ y - 0.35 * size * np.cos(2 * np.pi * 2 * t) * np.sin(np.pi * t)], 1)+ return self.ink(P, width, colour, alpha=alpha, taper=(3, 6), smooth=False, seed=int(r.integers(1 << 30)))++ # ================================================================== output+ def finish(self, grain=1.0, soft=0.12):+ """record the finishing (applied in render, so every stage snapshot matches; call it before the first mark):+ a faint paper grain over everything and a very slight softening"""+ self.fin = dict(grain=grain, soft=soft)+ return self++ def render(self):+ """the finished picture (the canvas is untouched)"""+ out = self.C+ f = self.fin+ if not f: return np.clip(out, 0, 1)+ self._need()+ out = out.copy()+ if f['grain']:+ out *= (1 + f['grain'] * 0.006 * self._grain)[..., None]+ if f['soft']:+ for c in range(3): out[..., c] = out[..., c] * (1 - f['soft']) + blur(out[..., c], 0.6) * f['soft']+ return np.clip(out, 0, 1)++ def composite(self):+ out = self.render()+ out *= 255; out += 0.5+ return Image.fromarray(out.astype(np.uint8))++ def stage(self, name):+ if not self.keep_stages: return+ im = self.composite()+ if self.stages_dir:+ os.makedirs(self.stages_dir, exist_ok=True)+ im.save(f'{self.stages_dir}/{self._n_stages:02d}_{name}.png', compress_level=1)+ else:+ b = io.BytesIO(); im.save(b, 'PNG', compress_level=1)+ self.stages.append((name, b.getvalue()))+ self._n_stages += 1++ def save(self, path, stages_dir=None, quality=88):+ img = self.composite()+ if str(path).lower().endswith(('.jpg', '.jpeg')): img.save(path, quality=quality, subsampling=0)+ else: img.save(path)+ sd = stages_dir or self.stages_dir+ if sd and self.keep_stages:+ os.makedirs(sd, exist_ok=True)+ for i, (name, b) in enumerate(self.stages):+ with open(f'{sd}/{i:02d}_{name}.png', 'wb') as f: f.write(b)+ img.save(f'{sd}/{self._n_stages:02d}_final.png', compress_level=1)+ return img