
手写数据结构作业照片
生成一张逼真的手机拍摄照片,内容为笔记本横线纸上书写的手写中文数据结构作业答案,用于课程提交。
Goal: Create a realistic smartphone photo of a lined notebook page on a wooden desk, showing a handwritten software/data-structure homework answer sheet in slightly messy but believable black gel-pen handwriting. The page title should be centered near the top as {argument name="page title" default="第五章答案"}. Make it look like an actual photo submitted for class, with small imperfections, uneven writing, mild page curvature, shadows, and perspective distortion.
Canvas and camera: Vertical 3:4 photo, shot from above at a slight angle. The main notebook page fills most of the frame, tilted very slightly. The lighting is warm indoor desk lighting, with soft shadows and a realistic phone-camera look, not a flat scan.
Scene details: Use an open notebook with pale gray horizontal ruled lines and rounded page corners. A partial previous page is visible along the left edge. The notebook rests on a medium-brown wooden desk. On the right side, place a black transparent-bodied gel pen vertically near the lower-right edge, and a small white eraser with gray smudges near the upper-right corner. Add a few tiny eraser crumbs or paper debris scattered around the eraser. Keep the page off-white with subtle texture.
Handwritten content: Use Chinese handwritten notes mixed with math and C-style pseudocode. The handwriting should be neat enough to read but intentionally slightly casual and uneven, with natural spacing and occasional slant variation. Write exactly 3 numbered answer sections:
1. Section 1 contains exactly 2 subitems:
- “(1) 叶结点数 = (k-1)m + 1。”
- “(2) 最多结点数 = (k^h - 1)/(k - 1),最少结点数 = k(h-1)+1。”
2. Section 2 defines WPL and contains a short explanation plus exactly 5 pseudocode lines. Write:
- “WPL:遍历二叉树,遇到叶子就加 weight × depth,”
- “根深度为 0。”
- “代码大意:”
Then center or indent the following 5 code lines beneath it:
- “if(root == NULL) return 0;”
- “if(!root->left && !root->right)”
- “return root->weight * depth;”
- “return WPL(root->left, depth+1) +”
- “WPL(root->right, depth+1);”
3. Section 3 contains exactly 5 handwritten lines describing binary tree and forest conversion:
- “二叉树根为 A,左子树 B-D-E-H,”
- “右子树 C-F,其中 F下有 I、G,I下有 M,”
- “M下有 K,G下有 J,J下有 L。”
- “森林按左孩子右兄弟关系转换即可。”
The section number “3.” should start on the left margin, with the text continuing across the lower half of the page.
Visual style: Photorealistic, natural shadows, realistic lined paper, black ink, casual student handwriting. The writing should look handwritten rather than printed or typeset. Slightly imperfect alignment with ruled lines is desirable.
Constraints: Do not add extra diagrams, stamps, watermarks, decorative graphics, or typed fonts. Keep exactly 3 numbered sections, exactly 2 subitems in section 1, exactly 5 pseudocode lines in section 2, and the listed Chinese homework text only.目标:创建一张逼真的手机拍摄照片,画面为木质桌面上的一页横线笔记本,展示一份手写的软件/数据结构作业答案,使用略显凌乱但真实的黑色中性笔笔迹。页面标题应居中置于顶部,格式为 {argument name="page title" default="第五章答案"}。使其看起来像是一张实际提交的课程作业照片,包含细微瑕疵、笔迹不匀、轻微的纸张卷曲、阴影和透视畸变。
画布与相机:竖向 3:4 照片,从上方以微小角度拍摄。笔记本页面主体占据大部分画面,略微倾斜。光线为温暖的室内桌面光,带有柔和阴影,呈现真实的手机拍摄效果,而非平整的扫描件。
场景细节:使用一本打开的笔记本,纸张带有浅灰色横线和圆角。左侧边缘可见部分前一页纸。笔记本放置在深棕色木质桌面上。在右侧,靠近右下边缘垂直放置一支黑色透明外壳中性笔,右上角放置一块带有灰色污渍的小型白色橡皮擦。在橡皮擦周围散落一些细小的橡皮屑或纸屑。纸张保持米白色,带有细微纹理。
手写内容:使用中文手写笔记,混合数学公式和 C 语言风格伪代码。笔迹应清晰可辨,但刻意保持略微随意和不均匀,间距自然,偶尔出现倾斜变化。准确书写 3 个编号的答案部分:
1. 第 1 部分包含 2 个子项:
- “(1) 叶结点数 = (k-1)m + 1。”
- “(2) 最多结点数 = (k^h - 1)/(k - 1),最少结点数 = k(h-1)+1。”
2. 第 2 部分定义 WPL 并包含简短说明及 5 行伪代码。书写:
- “WPL:遍历二叉树,遇到叶子就加 weight × depth,”
- “根深度为 0。”
- “代码大意:”
在其下方居中或缩进书写以下 5 行代码:
- “if(root == NULL) return 0;”
- “if(!root->left && !root->right)”
- “return root->weight * depth;”
- “return WPL(root->left, depth+1) +”
- “WPL(root->right, depth+1);”
3. 第 3 部分包含 5 行手写内容,描述二叉树与森林的转换:
- “二叉树根为 A,左子树 B-D-E-H,”
- “右子树 C-F,其中 F下有 I、G,I下有 M,”
- “M下有 K,G下有 J,J下有 L。”
- “森林按左孩子右兄弟关系转换即可。”
编号“3.”应从左侧页边距开始,文字延续至页面下半部分。
视觉风格:照片级真实感,自然的阴影,真实的横线纸,黑色墨水,随意的学生笔迹。笔迹应看起来是手写的,而非打印或排版的。笔迹与横线之间存在轻微的不对齐效果更佳。
约束:不要添加额外的图表、印章、水印、装饰图形或打印字体。保持 3 个编号部分,第 1 部分包含 2 个子项,第 2 部分包含 5 行伪代码,且仅包含所列的中文作业文本。