{"id":1372,"date":"2025-06-28T23:58:32","date_gmt":"2025-06-28T14:58:32","guid":{"rendered":"https:\/\/tatuiyo.xyz\/?p=1372"},"modified":"2025-06-28T23:58:34","modified_gmt":"2025-06-28T14:58:34","slug":"%e3%83%9d%e3%83%83%e3%83%97%e3%81%a7%e3%81%84%e3%81%84%e6%84%9f%e3%81%98%e3%81%ae%e8%83%8c%e6%99%af%e7%94%bb%e5%83%8fsvg%e3%82%92%e4%bd%9c%e3%82%8b%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%a0","status":"publish","type":"post","link":"https:\/\/tatuiyo.xyz\/?p=1372","title":{"rendered":"\u30dd\u30c3\u30d7\u3067\u3044\u3044\u611f\u3058\u306e\u80cc\u666f\u753b\u50cf(svg)\u3092\u4f5c\u308b\u30d7\u30ed\u30b0\u30e9\u30e0"},"content":{"rendered":"\n<p>Google\u306e\u6700\u65b0\u753b\u50cf\u751f\u6210AI\u3001ImageFX\u3067\u3044\u3044\u611f\u3058\u306e\u30dd\u30c3\u30d7\u306a\u80cc\u666f\u753b\u50cf(jpg)\u3092\u4f5c\u3089\u305b\u307e\u3057\u305f<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>pc wall paper background, 16:9, 2d, flatdesign, no shadow, background color: white, primary color: blue, secondary color: skyblue, stripe, pop, long circle, shapes<\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"800\" height=\"436\" src=\"https:\/\/tatuiyo.xyz\/wp-content\/uploads\/2025\/06\/Image_fx.jpg\" alt=\"\" class=\"wp-image-1373\" srcset=\"https:\/\/tatuiyo.xyz\/wp-content\/uploads\/2025\/06\/Image_fx.jpg 800w, https:\/\/tatuiyo.xyz\/wp-content\/uploads\/2025\/06\/Image_fx-300x164.jpg 300w, https:\/\/tatuiyo.xyz\/wp-content\/uploads\/2025\/06\/Image_fx-768x419.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>Web\u30b5\u30a4\u30c8\u306e\u80cc\u666f\u306b\u7528\u3044\u305f\u3044\u306e\u3067\u3001jpg\u3088\u308asvg\u3067\u6b32\u3057\u3044\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u753b\u50cf\u3092\u305d\u306e\u307e\u307eChatGPT\u306b\u6295\u3052\u3066\u3001\u3053\u3093\u306a\u611f\u3058\u306e\u9752\u3044\u68d2\u3068\u4e38\u3092\u63cf\u753b\u3057\u3066svg\u3067\u51fa\u529b\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u3044\u3066\u3082\u3089\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>import svgwrite\nimport random\nimport math\n\nWIDTH = 1024\nHEIGHT = 512\nNUM_LINES = 30\nNUM_CIRCLES = 10\nNUM_CROSSES = 6\nNUM_DOTTED = 4\n\n# \u30ab\u30e9\u30fc\u30d1\u30ec\u30c3\u30c8\uff08\u9752\u7cfb\uff09\ncolors = [&#39;#4fc3f7&#39;, &#39;#039be5&#39;, &#39;#81d4fa&#39;, &#39;#29b6f6&#39;, &#39;#0288d1&#39;]\n\ndef random_color():\n    return random.choice(colors)\n\ndef generate_line(dwg, angle_deg):\n    x1 = random.randint(-200, WIDTH)\n    y1 = random.randint(0, HEIGHT)\n\n    length = random.randint(80, 300)\n    rad = math.radians(angle_deg)\n\n    x2 = x1 + length * math.cos(rad)\n    y2 = y1 + length * math.sin(rad)\n\n    thickness = random.randint(6, 14)\n    color = random_color()\n\n    dwg.add(dwg.line(\n        start=(x1, y1),\n        end=(x2, y2),\n        stroke=color,\n        stroke_width=thickness,\n        stroke_linecap=&quot;round&quot;\n    ))\n\ndef add_circle(dwg):\n    r = random.randint(8, 25)\n    x = random.randint(r, WIDTH - r)\n    y = random.randint(r, HEIGHT - r)\n    color = random_color()\n    dwg.add(dwg.circle(center=(x, y), r=r, fill=color))\n\ndef add_cross(dwg):\n    x = random.randint(20, WIDTH - 20)\n    y = random.randint(20, HEIGHT - 20)\n    size = random.randint(8, 16)\n    color = random_color()\n    angle = random.uniform(0, 360)\n\n    g = dwg.g(transform=f&quot;rotate({angle},{x},{y})&quot;, stroke=color, stroke_width=2)\n    g.add(dwg.line((x - size, y), (x + size, y)))\n    g.add(dwg.line((x, y - size), (x, y + size)))\n    dwg.add(g)\n\ndef add_dotted_circle(dwg):\n    x = random.randint(50, WIDTH - 50)\n    y = random.randint(50, HEIGHT - 50)\n    r = random.randint(18, 30)\n    dot_r = 1.5\n    num_dots = 24\n    color = random_color()\n\n    for i in range(num_dots):\n        angle = 2 * math.pi * i \/ num_dots\n        dx = r * math.cos(angle)\n        dy = r * math.sin(angle)\n        dwg.add(dwg.circle(center=(x + dx, y + dy), r=dot_r, fill=color))\n\ndef generate_svg(filename=&quot;structured_background.svg&quot;):\n    dwg = svgwrite.Drawing(filename, size=(WIDTH, HEIGHT), profile=&#39;tiny&#39;)\n\n    # \u307b\u3068\u3093\u3069\u306e\u7dda\u306f 15\u5ea6\n    normal_lines = NUM_LINES - 3\n    for _ in range(normal_lines):\n        generate_line(dwg, angle_deg=345)\n\n    # \u4e00\u90e8\u3060\u3051\u30e9\u30f3\u30c0\u30e0\u306a\u89d2\u5ea6\n    for _ in range(3):\n        generate_line(dwg, angle_deg=random.uniform(0, 180))\n\n    # \u305d\u306e\u4ed6\u306e\u8981\u7d20\n    for _ in range(NUM_CIRCLES):\n        add_circle(dwg)\n\n    for _ in range(NUM_CROSSES):\n        add_cross(dwg)\n\n    for _ in range(NUM_DOTTED):\n        add_dotted_circle(dwg)\n\n    dwg.save()\n\ngenerate_svg()\n<\/code><\/pre><\/div>\n\n\n\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u751f\u6210\u3057\u305f\u753b\u50cf\u306f\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u3002\u7d50\u69cb\u3044\u3044\u611f\u3058\u3058\u3083\u306a\u3044\u3067\u3059\u304b\uff1f\uff1f<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"800\" height=\"400\" src=\"https:\/\/tatuiyo.xyz\/wp-content\/uploads\/2025\/06\/background.jpg\" alt=\"\" class=\"wp-image-1374\" srcset=\"https:\/\/tatuiyo.xyz\/wp-content\/uploads\/2025\/06\/background.jpg 800w, https:\/\/tatuiyo.xyz\/wp-content\/uploads\/2025\/06\/background-300x150.jpg 300w, https:\/\/tatuiyo.xyz\/wp-content\/uploads\/2025\/06\/background-768x384.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>WordPress\u3067svg\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u3068\u6012\u3089\u308c\u308b\u306e\u3067jpg\u306b\u5909\u63db\u3057\u3066\u3044\u307e\u3059\u3002svg\u3067\u306f11 kB\u3067\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google\u306e\u6700\u65b0\u753b\u50cf\u751f\u6210AI\u3001ImageFX\u3067\u3044\u3044\u611f\u3058\u306e\u30dd\u30c3\u30d7\u306a\u80cc\u666f\u753b\u50cf(jpg)\u3092\u4f5c\u3089\u305b\u307e\u3057\u305f Web\u30b5\u30a4\u30c8\u306e\u80cc\u666f\u306b\u7528\u3044\u305f\u3044\u306e\u3067\u3001jpg\u3088\u308asvg\u3067\u6b32\u3057\u3044\u3002 \u3053\u306e\u753b\u50cf\u3092\u305d\u306e\u307e\u307eChatGPT\u306b\u6295\u3052\u3066\u3001\u3053\u3093\u306a\u611f\u3058\u306e\u9752\u3044\u68d2\u3068\u4e38\u3092\u63cf\u753b\u3057\u3066svg\u3067\u51fa\u529b\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u3044\u3066\u3082\u3089\u3044\u307e\u3057&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":1375,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-1372","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-23"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/tatuiyo.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tatuiyo.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tatuiyo.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tatuiyo.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tatuiyo.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1372"}],"version-history":[{"count":1,"href":"https:\/\/tatuiyo.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1372\/revisions"}],"predecessor-version":[{"id":1376,"href":"https:\/\/tatuiyo.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1372\/revisions\/1376"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tatuiyo.xyz\/index.php?rest_route=\/wp\/v2\/media\/1375"}],"wp:attachment":[{"href":"https:\/\/tatuiyo.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tatuiyo.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1372"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tatuiyo.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}