You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Adobe Illustrator Artwork 3版格式规范查询及圆形绘制技术问询

Identifying Circles in Adobe Illustrator 3.x (PostScript-Based) Files

First off, your old Illustrator 3.x file is essentially a PostScript Level 3 document with Illustrator-specific metadata comments (like the %%Creator and %%AI8_CreatorVersion lines). AI versions 1 through 3 stored artwork directly as PostScript code, so the core specifications you need are rooted in PostScript standards, with minor Illustrator-specific additions.

Where to Find the Specifications

  • PostScript Language Reference Manual (3rd Edition): This is the definitive source for understanding the drawing commands in your file. It covers every PostScript operator, including m (moveto), c (curveto), and b (closepath + fill + stroke) that you see in the circle code. This manual defines how vector paths are constructed, including how Bézier curves are used to approximate shapes like circles.
  • Adobe Illustrator 3.x File Format Documentation: While older, Adobe's archived docs for early AI formats note that these files are PostScript documents with additional metadata comments (the lines starting with %%). The actual drawing logic is 100% PostScript, so the PostScript manual is your primary resource.

How to Identify Circles in This Format

PostScript doesn't have a native "draw circle" operator—instead, circles are approximated using four cubic Bézier curve segments (the c commands in your code). Here's how to parse and recognize this pattern:

Breakdown of Your Circle Code

Let's walk through the code you provided:

253 -433 m 
253 -465.0325 227.0325 -491 195 -491 c 
162.9675 -491 137 -465.0325 137 -433 c 
137 -400.9675 162.9675 -375 195 -375 c 
227.0325 -375 253 -400.9675 253 -433 c 
b
  1. 253 -433 m: Moves the pen to the starting point (the rightmost point of the circle).
  2. Four c commands: Each defines a cubic Bézier curve segment that approximates one quadrant of the circle. For a perfect approximation, the control points follow a fixed ratio relative to the circle's radius (~0.55228, which is 4*(sqrt(2)-1)/3).
  3. b: Closes the path, fills it with the current fill color, and strokes it with the current stroke color.

Key Features to Detect a Circle

To programmatically identify this as a circle:

  • Look for a closed path made of four consecutive cubic Bézier curves (four c operators) that start and end at the same point (the m point, which is repeated at the end of the last c).
  • Calculate the center point: In your example, the center is (195, -433)—this is the midpoint between opposing curve endpoints (e.g., 253 and 137 for the x-axis, -491 and -375 for the y-axis).
  • Verify the radius is consistent: The distance from the center to any curve endpoint (e.g., 253-195=58, -491 - (-433)=58) should be identical.
  • Check the control points: Each control point should be offset from the center by radius * 0.55228 along one axis, and by the full radius along the other (matching the quadrant of the curve segment).

内容的提问来源于stack exchange,提问作者David Portabella

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 07:32:51