漸近線球體“有斑點”,從 PDF 到 SVG 的轉換模糊且被線條損壞

漸近線球體“有斑點”,從 PDF 到 SVG 的轉換模糊且被線條損壞

我剛開始使用Asymptote生成一氧化氮的球圖。我的 MWE 是一個名為ball.asy

settings.tex = "lualatex";
settings.outformat = "pdf";
settings.prc = false;
settings.render = 0;

import three;

pen Maroon = RGB(128, 0, 0);
pen Teal = RGB(0, 128, 128);
unitsize(5cm);

/* Code below inspired by the examples at
http://dominique.vrel.free.fr/latex2.htm
*/

draw(shift(0.3, 0.6, 0.9) * scale3(0.21) * unitsphere, Maroon, light = Viewport);
draw(shift(0.3, 0.3, 0.3) * scale3(0.2) * unitsphere, Teal, light = Viewport);

currentprojection = perspective(2, 3, 4);

輸出的 PDF 影像asy ball.asy底部有“斑點”,如圖所示。

Q1.要怎麼去除「斑點」呢?

我實際上需要一個用於網頁圖形的 SVG,並嘗試使用將 PDF 轉換為 svgpdftocairo -svg ball.pdf ball-cairo.svg 但該影像有水平條紋,看起來很模糊。我嘗試過在線 PDF 到 SVG 轉換器,但它們的 SVG“球體”甚至不是球形的。

Q2。如何從漸近線輸出的 PDF 中取得可用的 SVG 輸出。

相關內容