使用SVG画出脱氢维生素C的结构简式

생성일: 2025년 5월 6일

답변에 사용된 모델 O3 by Chat01

질문

使用SVG画出脱氢维生素C的结构简式

질문

使用SVG画出脱氢维生素C的结构简式

사고

Generating SVG code for structure

The user asked for an SVG of the skeletal formula of dehydroascorbic acid (the oxidized form of vitamin C). It's a bicyclic compound with an unsaturated lactone and a side chain. I can represent this structure using simple lines for bonds and labeling key atoms. Instead of complex encoding, I'll produce an SVG code snippet that shows the skeletal formula. I'll present the code in a visible block for easy copying. No need for additional processing like base64 here.

Thought for 32 seconds

답변

下面是一段可直接嵌入 HTML 或 Markdown 的 SVG 代码,绘制了脱氢维生素 C(DHA)的常见结构简式。
(尺寸为 300 × 200 px,可按需修改 width/height 或坐标位置。)

svg
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="200" viewBox="0 0 300 200" stroke="black" stroke-width="2" font-family="Helvetica, Arial, sans-serif" font-size="16"> <!-- 五元内酯环 --> <polyline points="100,100 140,80 180,100 170,140 130,140 100,100" fill="none"/> <!-- C2,C3 的双酮(=O) --> <line x1="140" y1="80" x2="140" y2="50"/> <line x1="145" y1="80" x2="145" y2="50"/> <text x="135" y="40">O</text> <line x1="180" y1="100" x2="210" y2="100"/> <line x1="180" y1="105" x2="210" y2="105"/> <text x="215" y="105" dominant-baseline="middle">O</text> <!-- 3‑OH --> <line x1="110" y1="70" x2="90" y2="55"/> <text x="75" y="55" dominant-baseline="middle">OH</text> <!-- 4‑OH --> <line x1="170" y1="140" x2="190" y2="160"/> <text x="195" y="165" dominant-baseline="middle">OH</text> <!-- 侧链羧基(γ‑羧基),通常书写为–COOH,这里用简式 --> <line x1="130" y1="140" x2="110" y2="165"/> <text x="82" y="170" dominant-baseline="middle">HOOC</text> </svg>

使用方法

  • 直接把上方代码块复制到 .html 文件或支持 SVG 渲染的 Markdown 块,即可显示结构。
  • 若需调整大小,只需修改 width 和 height,或整体缩放 viewBox 与内部坐标。
  • 你也可以根据排版需要,改变字体、线宽、颜色等 SVG 属性。

이 Q&A 공유하기