在 TikZ 中绘制罗马月桂叶 (SPQR)

在 TikZ 中绘制罗马月桂叶 (SPQR)

我试图得到旧的罗马徽记(SPQR)。我其实对月桂叶感兴趣,对横幅不太感兴趣本身

我希望有类似的东西(在 中Tikz,而不是简单的\includegraphics)。并可以将样式更改A为任何其他简单的罗马字母。

在此处输入图片描述

我是 TikZ 的新手,尽管我知道这个问题听起来像帮我做这件事,如果有人能至少画出从哪里开始的草图,我将非常感激。

答案1

首先,在 Paint 中清理位图,删除不需要的部分,然后将文件保存为.bmp。例如

在此处输入图片描述

使用 POTrace 进行跟踪

然后下载波特雷斯在命令窗口中只需输入

potrace <filename>.bmp

这样就可以得到矢量文件格式.eps(我可以选择将其转换为 PDF 以方便使用)。轨迹的质量与图形的复杂性成反比。有时令人惊叹,有时却令人困惑。

转换为 TikZ 代码

下载并安装 Inkscape。将 Inkscape 添加到 TikZ 导出器扩展中此链接。从左侧面板底部的外部链接下载tikz_export.py, tikz_export_effect.inx、 和。将它们放在Inkscape 安装目录内的目录中。tikz_export_output.inxshare-->extension

从菜单导出:Extension -> Export -> Export to TikZ path。出现一个选项窗口。选择您的选项并从那里导出(按规范导出到文件中,或导出到剪贴板中)。

因此我们得到

在此处输入图片描述

这是我得到的结果文件。

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}

\begin{document}


\begin{tikzpicture}[y=0.80pt,x=0.80pt,yscale=-1, inner sep=0pt, outer sep=0pt]
\begin{scope}[cm={{1.25,0.0,0.0,-1.25,(0.0,838.75)}}]% g2993
  \begin{scope}[scale=0.100]% g2995
    % path2997
    \path[fill=black,nonzero rule] (1189.0000,5151.6900) .. controls
      (1023.0300,5080.8400) and (878.5270,4938.0000) .. (799.8440,4767.0000) ..
      controls (767.6330,4697.0000) and (737.5200,4600.2400) .. (748.0000,4600.4100)
      .. controls (781.3520,4600.9500) and (948.2810,4728.0000) ..
      (1001.0500,4793.0000) .. controls (1061.1200,4867.0000) and
      (1260.0000,5155.0100) .. (1260.0000,5168.0000) .. controls
      (1260.0000,5183.1800) and (1266.0000,5184.5600) .. (1189.0000,5151.6900);

    % path2999
    \path[fill=black,nonzero rule] (4700.0000,5167.0000) .. controls
      (4700.0000,5153.4500) and (4847.3600,4938.0000) .. (4932.5600,4827.0000) ..
      controls (5001.6400,4737.0000) and (5189.3400,4585.8500) ..
      (5208.2400,4605.0000) .. controls (5217.2900,4614.1700) and
      (5192.5700,4698.0000) .. (5160.4600,4767.0000) .. controls
      (5078.5800,4943.0000) and (4918.4700,5096.9000) .. (4751.0000,5160.6000) ..
      controls (4713.0000,5175.0500) and (4700.0000,5176.6900) ..
      (4700.0000,5167.0000);

    % path3001
    \path[fill=black,nonzero rule] (734.7660,4967.0000) .. controls
      (629.0630,4857.9200) and (554.9570,4720.0000) .. (525.7460,4578.0000) ..
      controls (501.2660,4459.0000) and (506.9690,4192.0200) .. (535.9140,4102.0000)
      .. controls (545.8910,4070.9700) and (896.6720,4416.0000) ..
      (992.3980,4551.0000) .. controls (1085.2900,4682.0000) and
      (1160.5200,4822.9900) .. (1127.0000,4803.2600) .. controls
      (1068.0000,4768.5300) and (724.4410,4501.3300) .. (703.6410,4474.0000) ..
      controls (689.1800,4455.0000) and (675.2300,4440.8300) .. (673.1290,4443.0000)
      .. controls (668.5080,4447.7700) and (715.5080,4726.0000) ..
      (730.2270,4781.0000) .. controls (736.6480,4805.0000) and (755.6370,4867.5000)
      .. (772.0000,4918.5000) .. controls (788.3630,4969.5000) and
      (799.2730,5014.7300) .. (796.0000,5018.0000) .. controls (792.7380,5021.2600)
      and (764.8050,4998.0000) .. (734.7660,4967.0000);

    % path3003
    \path[fill=black,nonzero rule] (5162.5900,5004.0000) .. controls
      (5165.5500,4993.6100) and (5184.2300,4932.0000) .. (5203.8400,4868.0000) ..
      controls (5236.0000,4763.0000) and (5295.9900,4452.6400) ..
      (5286.0000,4442.9000) .. controls (5283.7800,4440.7300) and
      (5269.7700,4455.0000) .. (5254.4700,4475.0000) .. controls
      (5233.2700,4502.7200) and (4899.0000,4762.9700) .. (4833.0000,4803.1400) ..
      controls (4799.2700,4823.6700) and (4875.0500,4682.0000) ..
      (4967.8800,4551.0000) .. controls (5063.5400,4416.0000) and
      (5414.2000,4070.9700) .. (5424.2100,4102.0000) .. controls
      (5438.9800,4147.8300) and (5450.0000,4264.0000) .. (5450.0000,4374.0000) ..
      controls (5450.0000,4568.0000) and (5416.7000,4697.2800) ..
      (5332.8100,4829.0000) .. controls (5264.0300,4937.0000) and
      (5147.5600,5056.7400) .. (5162.5900,5004.0000);

    % path3005
    \path[fill=black,nonzero rule] (430.8980,4615.0000) .. controls
      (384.6910,4550.2300) and (332.9340,4433.0000) .. (308.1600,4337.0000) ..
      controls (291.5470,4272.6100) and (287.0000,4226.0000) .. (287.0000,4120.0000)
      .. controls (287.0000,3969.0600) and (298.3240,3904.0000) ..
      (359.2190,3705.0000) .. controls (381.2500,3633.0000) and (404.8010,3549.1300)
      .. (412.0000,3517.0000) .. controls (419.1720,3485.0000) and
      (429.0350,3459.0000) .. (434.0000,3459.0000) .. controls (438.9260,3459.0000)
      and (450.6450,3483.0000) .. (459.8830,3512.0000) .. controls
      (482.4840,3582.9600) and (500.0000,3615.0000) .. (590.0000,3750.0000) ..
      controls (699.3320,3914.0000) and (782.2230,4054.2700) .. (817.5120,4135.0000)
      .. controls (852.0390,4214.0000) and (884.6760,4319.3200) ..
      (877.0000,4327.0000) .. controls (874.2770,4329.7200) and (836.0000,4300.1200)
      .. (793.0000,4262.0400) .. controls (665.0000,4148.6800) and
      (573.9610,4043.6700) .. (519.8870,3947.0000) .. controls (502.5430,3916.0000)
      and (484.5780,3890.0000) .. (480.5000,3890.0000) .. controls
      (476.3910,3890.0000) and (470.0590,3963.5000) .. (466.5000,4052.5000) ..
      controls (462.9410,4141.5000) and (455.6680,4235.3600) .. (450.4260,4260.0000)
      .. controls (434.7770,4333.5400) and (438.8520,4488.0000) ..
      (458.8130,4578.0000) .. controls (468.7930,4623.0000) and (473.8400,4660.0000)
      .. (470.0000,4660.0000) .. controls (466.1090,4660.0000) and
      (448.7340,4640.0000) .. (430.8980,4615.0000);

    % path3007
    \path[fill=black,nonzero rule] (5502.0000,4572.5000) .. controls
      (5518.5000,4500.3100) and (5520.9500,4464.0000) .. (5516.0000,4365.0000) ..
      controls (5512.7000,4299.0000) and (5505.9500,4218.0000) ..
      (5501.0000,4185.0000) .. controls (5496.0200,4151.8100) and
      (5491.5500,4072.5000) .. (5491.0000,4007.5000) .. controls
      (5490.4100,3938.5000) and (5486.0800,3890.0000) .. (5480.5000,3890.0000) ..
      controls (5475.3200,3890.0000) and (5463.2700,3905.0000) ..
      (5453.9900,3923.0000) .. controls (5423.4600,3982.2300) and
      (5363.5300,4064.0000) .. (5300.0500,4133.0000) .. controls
      (5217.2700,4223.0000) and (5086.9100,4336.0600) .. (5082.1400,4322.0000) ..
      controls (5076.9400,4306.6400) and (5104.1800,4223.0000) ..
      (5145.3100,4128.0000) .. controls (5179.9700,4047.9600) and
      (5262.7200,3909.0000) .. (5378.7600,3736.0000) .. controls
      (5459.9100,3615.0000) and (5477.8600,3581.8800) .. (5500.1200,3512.0000) ..
      controls (5509.3600,3483.0000) and (5521.0700,3459.0000) ..
      (5526.0000,3459.0000) .. controls (5530.9600,3459.0000) and
      (5540.8300,3485.0000) .. (5548.0000,3517.0000) .. controls
      (5555.2000,3549.1300) and (5578.6400,3633.0000) .. (5600.5400,3705.0000) ..
      controls (5660.7500,3903.0000) and (5672.0700,3968.3400) ..
      (5672.4600,4120.0000) .. controls (5672.8600,4274.0000) and
      (5652.7800,4371.8800) .. (5595.1200,4497.0000) .. controls
      (5561.4800,4570.0000) and (5502.8800,4660.0000) .. (5489.0000,4660.0000) ..
      controls (5485.1600,4660.0000) and (5491.0300,4620.5000) ..
      (5502.0000,4572.5000);

    % path3009
    \path[fill=black,nonzero rule] (135.8750,3978.0000) .. controls
      (121.0230,3926.6700) and (117.1840,3728.0000) .. (129.3160,3639.0000) ..
      controls (143.7730,3533.0000) and (186.0630,3401.2300) .. (231.3750,3321.0000)
      .. controls (248.7700,3290.2000) and (316.7730,3193.0000) ..
      (382.5000,3105.0000) .. controls (448.2270,3017.0000) and (504.3590,2939.1500)
      .. (507.2460,2932.0000) .. controls (518.7420,2903.5000) and
      (527.7190,2925.0000) .. (532.7110,2993.0000) .. controls (536.7850,3048.4600)
      and (550.5900,3096.0000) .. (592.8160,3200.0000) .. controls
      (663.8790,3375.0000) and (675.3950,3411.4100) .. (705.1020,3555.0000) ..
      controls (729.9300,3675.0000) and (738.8910,3830.0000) .. (721.0000,3830.0000)
      .. controls (704.6450,3830.0000) and (547.9220,3569.0000) ..
      (512.6410,3483.0000) .. controls (493.9100,3437.3400) and (473.2380,3362.0000)
      .. (466.0000,3313.0000) .. controls (458.9100,3265.0000) and
      (450.5000,3231.8200) .. (447.5000,3240.0000) .. controls (444.4770,3248.2500)
      and (425.3520,3309.0000) .. (405.0000,3375.0000) .. controls
      (384.7110,3440.8000) and (335.0310,3565.0000) .. (295.0000,3650.0000) ..
      controls (254.9690,3735.0000) and (207.1480,3845.6400) .. (189.1170,3895.0000)
      .. controls (150.7500,4000.0000) and (144.8830,4009.1400) ..
      (135.8750,3978.0000);

    % path3011
    \path[fill=black,nonzero rule] (5804.5000,3985.0000) .. controls
      (5800.3800,3974.0000) and (5783.5000,3929.0000) .. (5767.0000,3885.0000) ..
      controls (5750.5500,3841.1300) and (5704.2600,3735.0000) ..
      (5664.5000,3650.0000) .. controls (5624.7400,3565.0000) and
      (5575.2900,3440.8000) .. (5555.0000,3375.0000) .. controls
      (5534.6500,3309.0000) and (5515.5300,3248.2500) .. (5512.5000,3240.0000) ..
      controls (5509.4800,3231.7500) and (5501.6000,3261.0000) ..
      (5495.0000,3305.0000) .. controls (5480.0000,3405.0000) and
      (5467.4500,3444.3300) .. (5419.7100,3541.0000) .. controls
      (5372.8000,3636.0000) and (5251.4900,3830.0000) .. (5239.0000,3830.0000) ..
      controls (5221.2600,3830.0000) and (5230.4000,3674.0000) ..
      (5255.1100,3555.0000) .. controls (5284.1000,3415.4200) and
      (5303.8300,3353.0000) .. (5371.7700,3186.0000) .. controls
      (5409.2000,3094.0000) and (5422.4400,3047.6300) .. (5427.0000,2992.5000) ..
      controls (5430.3100,2952.5000) and (5435.6900,2920.2200) ..
      (5439.0000,2920.5000) .. controls (5442.2900,2920.7700) and
      (5470.7200,2958.0000) .. (5502.0000,3003.0000) .. controls
      (5533.5200,3048.3400) and (5588.5100,3123.0000) .. (5625.0000,3170.0000) ..
      controls (5661.5000,3217.0000) and (5706.1600,3281.8200) ..
      (5724.9000,3315.0000) .. controls (5769.6100,3394.1300) and
      (5815.5700,3535.0000) .. (5830.6000,3639.0000) .. controls
      (5843.7600,3730.0000) and (5838.3200,3936.6700) .. (5821.6300,3980.0000) ..
      controls (5812.3900,4004.0000) and (5811.7000,4004.2000) ..
      (5804.5000,3985.0000);

    % path3013
    \path[fill=black,nonzero rule] (711.5780,3358.0000) .. controls
      (696.2230,3318.2200) and (662.1990,3144.0000) .. (648.8870,3037.0000) ..
      controls (634.3280,2920.0000) and (642.8670,2759.8100) .. (669.4650,2651.0000)
      .. controls (680.7110,2605.0000) and (688.6450,2565.6400) ..
      (687.0000,2564.0000) .. controls (685.3360,2562.3400) and (660.8240,2602.0000)
      .. (632.0000,2653.0000) .. controls (594.3090,2719.6800) and
      (542.7150,2786.0000) .. (444.5000,2894.0000) .. controls (349.9220,2998.0000)
      and (292.0860,3071.9900) .. (253.0000,3139.0000) .. controls
      (222.0820,3192.0000) and (188.2660,3248.4400) .. (177.5000,3265.0000) --
      (158.0000,3295.0000) -- (163.9730,3213.0000) .. controls (175.7700,3051.0000)
      and (239.0390,2860.7500) .. (317.9410,2750.0000) .. controls
      (387.7620,2652.0000) and (432.4880,2607.7100) .. (525.0000,2544.9700) ..
      controls (571.0000,2513.7700) and (640.2150,2459.8200) .. (678.0000,2425.7000)
      .. controls (767.0000,2345.3400) and (818.8550,2305.8600) ..
      (826.0000,2313.0000) .. controls (829.2730,2316.2700) and (824.6760,2359.0000)
      .. (815.8870,2407.0000) .. controls (796.7460,2511.5500) and
      (796.0230,2568.0000) .. (811.4800,2752.0000) .. controls (831.3910,2989.0000)
      and (800.6090,3235.4500) .. (735.6680,3359.0000) -- (722.0000,3385.0000) --
      (711.5780,3358.0000);

    % path3015
    \path[fill=black,nonzero rule] (5209.7900,3325.0000) .. controls
      (5152.3900,3190.5500) and (5129.4900,2974.0000) .. (5148.6700,2747.0000) ..
      controls (5164.3800,2561.0000) and (5163.7500,2512.4300) ..
      (5144.2700,2407.0000) .. controls (5135.3900,2359.0000) and
      (5130.7300,2316.2700) .. (5134.0000,2313.0000) .. controls
      (5141.1400,2305.8600) and (5193.0000,2345.3400) .. (5282.0000,2425.7000) ..
      controls (5319.7900,2459.8200) and (5389.0000,2513.7600) ..
      (5435.0000,2544.9400) .. controls (5608.8200,2662.7500) and
      (5704.7800,2806.0000) .. (5765.2800,3038.0000) .. controls
      (5787.7100,3124.0000) and (5809.2600,3290.0000) .. (5798.0000,3290.0000) ..
      controls (5795.2700,3290.0000) and (5762.3700,3236.0000) ..
      (5725.5000,3171.0000) .. controls (5670.0900,3073.3200) and
      (5633.1900,3024.5000) .. (5519.5000,2898.5000) .. controls
      (5418.4500,2786.5000) and (5366.8000,2720.1300) .. (5328.5000,2653.0000) ..
      controls (5299.4000,2602.0000) and (5274.6600,2562.3400) ..
      (5273.0000,2564.0000) .. controls (5271.3500,2565.6500) and
      (5280.0700,2607.0000) .. (5292.3900,2656.0000) .. controls
      (5321.2300,2770.6300) and (5323.4000,3006.0000) .. (5296.9000,3145.0000) ..
      controls (5271.7300,3277.0000) and (5246.9700,3370.0000) ..
      (5237.0000,3370.0000) .. controls (5232.5500,3370.0000) and
      (5220.4600,3350.0000) .. (5209.7900,3325.0000);

    % path3017
    \path[fill=black,nonzero rule] (874.5000,2745.0000) .. controls
      (878.0660,2712.0800) and (887.0270,2597.0000) .. (894.3550,2490.0000) ..
      controls (909.2890,2272.0000) and (920.7300,2229.0000) ..
      (1005.5900,2072.0000) .. controls (1030.4600,2026.0000) and
      (1045.1200,1991.6200) .. (1038.0000,1996.0000) .. controls
      (1030.7800,2000.4500) and (985.0000,2037.7800) .. (935.0000,2080.0000) ..
      controls (885.1520,2122.0900) and (787.0000,2199.9800) .. (715.0000,2254.5800)
      .. controls (537.0000,2389.5700) and (464.6680,2455.0000) ..
      (395.0630,2544.0000) .. controls (313.1410,2648.7500) and (306.6880,2646.0000)
      .. (341.1410,2521.0000) .. controls (367.0510,2427.0000) and
      (433.9450,2283.0500) .. (490.7730,2199.0000) .. controls (580.0630,2066.9400)
      and (697.0000,1967.9500) .. (835.0000,1907.5900) .. controls
      (897.0000,1880.4800) and (1204.4100,1800.0000) .. (1246.0000,1800.0000) ..
      controls (1275.0000,1800.0000) and (1275.0000,1800.0000) ..
      (1244.2400,1878.0000) .. controls (1230.3000,1913.3500) and
      (1203.7900,2019.0000) .. (1185.0300,2114.0000) .. controls
      (1146.7100,2308.0000) and (1129.1100,2363.7700) .. (1067.0000,2488.0000) ..
      controls (1013.0000,2596.0000) and (915.2270,2758.3600) ..
      (888.0000,2785.2500) -- (868.0000,2805.0000) -- (874.5000,2745.0000);

    % path3019
    \path[fill=black,nonzero rule] (5056.5800,2767.0000) .. controls
      (4981.1800,2665.1100) and (4856.7100,2428.0000) .. (4821.9300,2320.0000) ..
      controls (4810.4700,2284.4200) and (4789.3800,2193.0000) ..
      (4775.3100,2118.0000) .. controls (4745.5000,1959.0000) and
      (4725.9600,1887.3700) .. (4700.2900,1843.0000) .. controls
      (4668.0500,1787.2800) and (4685.0000,1786.9600) .. (4896.0000,1839.2500) ..
      controls (5077.0000,1884.1100) and (5156.2300,1914.7500) ..
      (5251.0000,1976.5500) .. controls (5409.4500,2079.8700) and
      (5558.2600,2300.0000) .. (5619.0400,2521.0000) .. controls
      (5653.9700,2648.0000) and (5648.9300,2648.9600) .. (5555.7000,2533.0000) ..
      controls (5491.6300,2453.3200) and (5367.0000,2343.6800) ..
      (5207.0000,2226.2500) .. controls (5164.3800,2194.9700) and
      (5085.0000,2131.5800) .. (5032.0000,2086.5000) .. controls
      (4979.0000,2041.4200) and (4928.8800,2000.3700) .. (4921.5000,1996.0000) ..
      controls (4914.0200,1991.5700) and (4926.1800,2021.0000) ..
      (4948.7600,2062.0000) .. controls (5037.7700,2223.6200) and
      (5050.9300,2272.0000) .. (5066.1800,2494.0000) .. controls
      (5073.8100,2605.0000) and (5082.6900,2718.5100) .. (5086.0000,2747.5000) ..
      controls (5089.3200,2776.5000) and (5089.5400,2800.0000) ..
      (5086.5000,2800.0000) .. controls (5083.5000,2800.0000) and
      (5069.9000,2785.0000) .. (5056.5800,2767.0000);

    % path3021
    \path[fill=black,nonzero rule] (1056.2700,2695.0000) .. controls
      (1330.4600,2344.3200) and (1825.0000,1991.1600) .. (2217.0000,1866.0900) ..
      controls (2339.8800,1826.8800) and (2522.0000,1788.0500) ..
      (2675.0000,1768.4500) .. controls (2822.1300,1749.5900) and
      (3207.0000,1752.1100) .. (3355.0000,1772.9000) .. controls
      (3867.0000,1844.8200) and (4378.1500,2126.2000) .. (4781.2300,2558.0000) ..
      controls (4906.3100,2692.0000) and (4912.0900,2713.4100) ..
      (4792.0000,2597.9300) .. controls (4596.7300,2410.1400) and
      (4395.0000,2264.9300) .. (4170.0000,2150.1900) .. controls
      (3807.0000,1965.0800) and (3520.9800,1907.5200) .. (3231.0000,1961.2200) ..
      controls (3131.0000,1979.7400) and (3057.4800,2030.3300) ..
      (3010.4500,2113.0000) -- (2982.0000,2163.0000) -- (2956.2100,2112.0000) ..
      controls (2910.5400,2021.6900) and (2830.0000,1976.4200) ..
      (2666.0000,1948.8800) .. controls (2423.5200,1908.1600) and
      (1997.0000,2021.9500) .. (1682.0000,2211.4000) .. controls
      (1505.0000,2317.8600) and (1305.7200,2471.2700) .. (1130.0000,2636.3600) ..
      controls (1072.0000,2690.8400) and (1039.0000,2717.0900) ..
      (1056.2700,2695.0000);

    % path3023
    \path[fill=black,nonzero rule] (1203.9800,2305.0000) .. controls
      (1214.1400,2278.6300) and (1275.2700,2055.0000) .. (1284.6100,2010.0000) ..
      controls (1301.6200,1928.0000) and (1360.5400,1828.7600) ..
      (1440.1400,1748.0000) .. controls (1495.3400,1692.0000) and
      (1512.4000,1669.5000) .. (1497.0000,1673.0000) .. controls
      (1485.0700,1675.7100) and (1448.0000,1685.3200) .. (1416.0000,1694.0000) ..
      controls (1383.4500,1702.8300) and (1305.0000,1716.9300) ..
      (1241.0000,1725.4600) .. controls (1050.0000,1750.9300) and
      (856.7110,1810.4700) .. (721.0000,1885.6300) .. controls (697.0000,1898.9200)
      and (675.1840,1910.0000) .. (673.0000,1910.0000) .. controls
      (670.7700,1910.0000) and (681.3670,1887.0000) .. (696.9610,1858.0000) ..
      controls (737.3050,1782.9700) and (870.0000,1654.7400) .. (968.0000,1596.0800)
      .. controls (1013.2100,1569.0200) and (1091.5000,1531.3000) ..
      (1142.5000,1512.0000) -- (1235.0000,1477.0000) -- (1410.0000,1483.0000) ..
      controls (1564.0000,1488.2800) and (1599.4000,1492.7700) ..
      (1705.0000,1520.4000) .. controls (1855.0000,1559.6400) and
      (1861.7300,1563.1800) .. (1824.0000,1582.8900) .. controls
      (1781.3700,1605.1500) and (1760.0600,1632.0000) .. (1679.4400,1765.0000) ..
      controls (1581.8500,1926.0000) and (1523.2800,2002.5200) ..
      (1390.8600,2142.0000) .. controls (1268.3900,2271.0000) and
      (1191.0900,2338.4200) .. (1203.9800,2305.0000);

    % path3025
    \path[fill=black,nonzero rule] (4604.6300,2177.0000) .. controls
      (4445.7500,2013.0000) and (4384.0200,1935.1600) .. (4289.8200,1780.0000) ..
      controls (4209.0700,1647.0000) and (4175.1100,1603.3100) ..
      (4137.0000,1583.4100) .. controls (4098.0600,1563.0800) and
      (4104.0000,1559.9100) .. (4255.0000,1520.4000) .. controls
      (4360.6000,1492.7700) and (4396.0000,1488.3400) .. (4550.0000,1483.5000) ..
      controls (4722.0000,1478.0900) and (4726.2900,1478.4700) ..
      (4800.0000,1505.3400) .. controls (4958.0000,1562.9200) and
      (5112.1800,1665.2600) .. (5200.2400,1771.0000) .. controls
      (5244.3800,1824.0000) and (5298.0600,1910.0000) .. (5287.0000,1910.0000) ..
      controls (5284.8200,1910.0000) and (5263.0000,1898.9200) ..
      (5239.0000,1885.6300) .. controls (5103.2900,1810.4700) and
      (4910.0000,1750.9300) .. (4719.0000,1725.4600) .. controls
      (4655.0000,1716.9300) and (4576.5500,1702.8300) .. (4544.0000,1694.0000) ..
      controls (4512.0000,1685.3200) and (4474.9300,1675.7100) ..
      (4463.0000,1673.0000) .. controls (4447.6800,1669.5200) and
      (4464.6400,1692.0000) .. (4518.8100,1747.0000) .. controls
      (4616.6400,1846.3300) and (4647.7800,1908.0000) .. (4699.5700,2105.0000) ..
      controls (4721.3900,2188.0000) and (4743.9100,2267.9500) ..
      (4750.0000,2284.0000) .. controls (4756.0700,2300.0000) and
      (4758.0900,2315.6900) .. (4754.5000,2319.0000) .. controls
      (4750.9400,2322.2900) and (4683.0900,2258.0000) .. (4604.6300,2177.0000);

    % path3027
    \path[fill=black,nonzero rule] (2040.0000,1523.5000) .. controls
      (2020.6800,1521.0200) and (1932.0000,1496.8700) .. (1842.0000,1469.5800) ..
      controls (1596.0000,1394.9800) and (1450.6800,1367.5100) ..
      (1295.0000,1366.1400) .. controls (1223.0000,1365.5100) and
      (1147.1500,1368.3500) .. (1125.0000,1372.5000) -- (1085.0000,1380.0000) --
      (1110.0000,1358.4200) .. controls (1152.3900,1321.8200) and
      (1312.0000,1251.5900) .. (1406.0000,1228.1800) .. controls
      (1477.8100,1210.2800) and (1523.0000,1206.0700) .. (1640.0000,1206.3800) ..
      controls (1814.0000,1206.8200) and (1932.5800,1226.4500) ..
      (2062.0000,1276.2300) .. controls (2357.0000,1389.6900) and
      (2455.5500,1415.0600) .. (2570.0000,1406.9900) .. controls
      (2617.0000,1403.6800) and (2681.8200,1392.6500) .. (2715.0000,1382.3200) ..
      controls (2778.0000,1362.7100) and (2910.3000,1300.5900) ..
      (2909.5000,1291.0000) .. controls (2909.2200,1287.6800) and
      (2877.5000,1262.6600) .. (2838.5000,1235.0000) .. controls
      (2799.5700,1207.3900) and (2731.5000,1150.7400) .. (2686.5000,1108.5000) --
      (2605.0000,1032.0000) -- (2654.5000,1009.5000) -- (2704.0000,987.0000) --
      (2733.5000,1021.0000) .. controls (2749.4500,1039.3800) and
      (2778.1600,1072.0000) .. (2796.0000,1092.0000) .. controls
      (2840.5900,1142.0000) and (2961.1100,1240.0000) .. (2978.0000,1240.0000) ..
      controls (3008.1900,1240.0000) and (3127.3000,1135.0000) ..
      (3226.4300,1021.0000) -- (3256.0000,987.0000) -- (3305.5000,1009.5000) --
      (3355.0000,1032.0000) -- (3273.5000,1108.5000) .. controls
      (3228.5000,1150.7400) and (3160.4300,1207.3900) .. (3121.5000,1235.0000) ..
      controls (3082.5000,1262.6600) and (3050.7900,1287.6800) ..
      (3050.5300,1291.0000) .. controls (3049.7600,1300.7400) and
      (3192.0000,1366.6800) .. (3255.0000,1385.8000) .. controls
      (3296.1400,1398.2800) and (3348.0000,1404.1400) .. (3420.0000,1404.4300) ..
      controls (3536.9800,1404.9100) and (3607.0000,1386.6900) ..
      (3862.0000,1289.4100) .. controls (4027.1300,1226.4100) and
      (4135.0000,1206.8500) .. (4320.0000,1206.3800) .. controls
      (4437.0000,1206.0700) and (4482.1900,1210.2800) .. (4554.0000,1228.1800) ..
      controls (4648.0000,1251.5900) and (4807.6100,1321.8200) ..
      (4850.0000,1358.4200) -- (4875.0000,1380.0000) -- (4835.0000,1372.5000) ..
      controls (4812.8500,1368.3500) and (4737.0000,1365.5000) ..
      (4665.0000,1366.1300) .. controls (4506.3000,1367.5000) and
      (4358.0000,1396.0900) .. (4113.0000,1472.5600) -- (3945.0000,1525.0000) --
      (3765.0000,1524.0400) .. controls (3490.0000,1522.5700) and
      (3294.5900,1480.4700) .. (3072.0000,1374.7100) -- (2980.0000,1331.0000) --
      (2887.0000,1375.0900) .. controls (2681.0200,1472.7400) and
      (2485.0000,1516.9400) .. (2227.0000,1523.9000) .. controls
      (2143.0000,1526.1600) and (2059.3400,1525.9900) .. (2040.0000,1523.5000);

  \end{scope}
\end{scope}

\end{tikzpicture}
\end{document}

我想重新表述一下;

TikZ 不是一个绘画程序;)

答案2

在这里我想描述另一个(不是更好,但与 @percusse 的工作流程不同)的工作流程,该工作流程仅适用于徽标/字形类型的绘图。此工作流程仅使用在线工具。

  1. 我在网上搜索该绘图的现有 SVG 版本。我谷歌搜索“刺客信条古罗马徽章”,但没有找到。
  2. 如果找不到,我会在线将位图图像转换为 svg,例如通过谷歌搜索“convert png svg”。有很多工具,其中一些(大多数)使用波特雷斯比如 InkScape。在这个例子中,我使用了online-convert.com获得这个 SVG
  3. 我使用在线版本SVGO在此处输入图片描述 对于这个特殊的例子,使用“precision:0”和“Prefer viewBox to width/height”来获得这个一半大小SVG
  4. 要从 SVG 转换为 TikZ,我使用SVGPathy 游乐场

在此处输入图片描述

  • 将整个 svg 复制/粘贴至上方文本区域;

  • 选择Remove ArcsTransformation : scale(1,-1)然后Output type : One TikZ path per line (新功能:您可以选择Full TikZ in standalone并更快地获得最终结果)

  • 从底部文本区域复制结果;

  • 将结果代码包装在

        \documentclass[tikz,border=7pt]{standalone}
        \usetikzlibrary{svg.path}
        \begin{document}
          \begin{tikzpicture}
    
          % the code generated with SVGPathy goes here
    
          \end{tikzpicture}
        \end{document}      
    

这是最终结果(有关附加选项,请参阅最后的注释)。

\documentclass[tikz,border=7pt]{standalone}
\usetikzlibrary{svg.path}
\begin{document}
  \begin{tikzpicture}

    % the code generated with SVGPathy goes here
    \fill svg{M50.1-.5l-1.5-3.8-2.7-6.4-2.2-5.2-1-2.4-1.1-2.8-4.8-11.8-1.3-3.3c-1.4-3.5-2-4.6-3.3-5.8s-3.1-2.5-4.3-2.9c-1.9-.6-4.9-.2-6.9 1l-1.2 .5 .3-.8 1.1-3.8c.2-1.6 .3-4.9 0-6.5l-.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3.9 1l-2.5-.2zm4.5-.8c1.1-.6 1.3-3.1 .2-3.7h-1.9c-.3 0-.3 .3-.3 2l.1 1.9c.3 .2 1.6 0 1.9-.2z};

  \end{tikzpicture}
\end{document}

在此处输入图片描述

注释和免责声明

  • 我是SVGPathy基于SVG路径
  • SVGPathy 仅设计用于 svg 路径,而不适用于一般 svg 图像,因此它仅适用于简单的徽标/字形图像。
  • 我已经在 SVGPathy 中检查了选项Remove arcs(将圆弧命令转换为三次曲线),因为其他地方svg.path都有抱怨! Dimension too large. <recently read> \pgfmath@x
  • 这里进行转换Transformation : scale(1,-1)是因为 SVG 和 TikZ 对于 y 轴向上/向下的约定不同。您无需在转换时进行更正,只需输入 tikz 即可[yscale=-1]
  • 对于最终图像,我使用View Box : 0 0 100 100将坐标缩小到[0,100]。我选择了precision:1Zip It来减少代码大小。
  • 即使您使用 @percusse 工作流程,我也强烈建议您在将 svg 转换为 tikz 之前对其进行优化。为此,您可以:
    • 通过多次“取消分组”(快捷方式是 )将所有变换应用于路径Ctrl+Shift+G,如果需要,可以取消分组所有路径(使用 选择它们Ctrl+A)。
    • 使用选项“保存类型:优化 SVG”将其保存在 InkScape 中。
    • 使用SVGOMG以进一步优化它。

相关内容