Skip to content
TheChatArchiveThe Chat Archive
grok-3-preview-02-24· xAIHugging Face LMArena Human Preference 140K

write detailed svg code for butterfly

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Geminigemini-2.5-flash-preview-04-17’s answer.
  1. User

    write detailed svg code for butterfly

  2. Assistant

    Below is a detailed SVG code for a butterfly illustration. This design includes symmetrical wings with gradient colors, patterns, and a simple body. The butterfly is stylized but detailed enough to look visually appealing. You can copy this code into an HTML file or an SVG editor to view and customize it further.

    <svg width="400" height="400" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg">
      <!-- Background (optional, for visibility) -->
      <rect width="400" height="400" fill="#f0f8ff"/>
    
      <!-- Butterfly Body -->
      <g transform="translate(200, 200)">
        <!-- Body -->
        <rect x="-10" y="-100" width="20" height="200" rx="10" fill="#4a2c2a"/>
        <!-- Head -->
        <circle cx="0" cy="-110" r="15" fill="#4a2c2a"/>
        <!-- Antennae -->
        <path d="M0 -110 Q 30 -150 50 -130" fill="none" stroke="#4a2c2a" stroke-width="4"/>
        <path d="M0 -110 Q -30 -150 -50 -130" fill="none" stroke="#4a2c2a" stroke-width="4"/>
        <!-- Antennae tips -->
        <circle cx="50" cy="-130" r="5" fill="#4a2c2a"/>
        <circle cx="-50" cy="-130" r="5" fill="#4a2c2a"/>
    
        <!-- Left Upper Wing -->
        <g>
          <defs>
            <linearGradient id="wingGradientLeft" x1="0%" y1="0%" x2="100%" y2="100%">
              <stop offset="0%" style="stop-color:#ff6f61;stop-opacity:1"/>
              <stop offset="100%" style="stop-color:#ffcc5c;stop-opacity:1"/>
            </linearGradient>
          </defs>
          <path d="M0 -20 C -50 -100, -150 -100, -120 0 S -80 100, 0 80" fill="url(#wingGradientLeft)"/>
          <!-- Wing Patterns -->
          <circle cx="-100" cy="-50" r="20" fill="rgba(255, 255, 255, 0.5)"/>
          <circle cx="-80" cy="20" r="15" fill="rgba(255, 255, 255, 0.5)"/>
          <path d="M-10 -10 C -40 -60, -90 -60, -90 -20" fill="none" stroke="#ffffff" stroke-width="3" stroke-opacity="0.7"/>
        </g>
    
        <!-- Right Upper Wing -->
        <g>
          <defs>
            <linearGradient id="wingGradientRight" x1="0%" y1="0%" x2="100%" y2="100%">
              <stop offset="0%" style="stop-color:#ff6f61;stop-opacity:1"/>
              <stop offset="100%" style="stop-color:#ffcc5c;stop-opacity:1"/>
            </linearGradient>
          </defs>
          <path d="M0 -20 C 50 -100, 150 -100, 120 0 S 80 100, 0 80" fill="url(#wingGradientRight)"/>
          <!-- Wing Patterns -->
          <circle cx="100" cy="-50" r="20" fill="rgba(255, 255, 255, 0.5)"/>
          <circle cx="80" cy="20" r="15" fill="rgba(255, 255, 255, 0.5)"/>
          <path d="M10 -10 C 40 -60, 90 -60, 90 -20" fill="none" stroke="#ffffff" stroke-width="3" stroke-opacity="0.7"/>
        </g>
    
        <!-- Left Lower Wing -->
        <g>
          <path d="M0 80 C -30 120, -100 150, -80 80 S -50 40, 0 40" fill="url(#wingGradientLeft)"/>
          <!-- Wing Patterns -->
          <circle cx="-60" cy="100" r="10" fill="rgba(255, 255, 255, 0.5)"/>
        </g>
    
        <!-- Right Lower Wing -->
        <g>
          <path d="M0 80 C 30 120, 100 150, 80 80 S 50 40, 0 40" fill="url(#wingGradientRight)"/>
          <!-- Wing Patterns -->
          <circle cx="60" cy="100" r="10" fill="rgba(255, 255, 255, 0.5)"/>
        </g>
      </g>
    </svg>
    

    Explanation of the Code:

    1. SVG Container: The <svg> element defines the canvas size (400x400) and the viewBox for scaling.
    2. Background: A light blue rectangle (<rect>) is added as a background for better visibility.
    3. Transform: The butterfly is centered using transform="translate(200, 200)" to place the origin at the center of the canvas.
    4. Body: The body is a rounded rectangle, and the head is a circle. Antennae are drawn using quadratic Bézier curves (Q) with small circles at the tips.
    5. Wings:
      • The wings are drawn using <path> elements with cubic Bézier curves (C and S) to create smooth, symmetrical shapes.
      • A gradient (<linearGradient>) is applied to the wings for a colorful effect, transitioning from coral (#ff6f61) to yellow (#ffcc5c).
      • Patterns on the wings include semi-transparent white circles and curved lines for decoration.
    6. Symmetry: The left and right wings are mirrored by adjusting the control points in the Bézier curves.

    How to Use:

    • Save this code in a .svg file (e.g., butterfly.svg) and open it in a browser or vector graphics editor (like Inkscape or Adobe Illustrator).
    • Alternatively, embed it in an HTML file inside a <body> tag to display it on a webpage.
    • You can customize the colors, sizes, gradients, and patterns by modifying the respective attributes in the SVG code.

    This butterfly design is stylized but can be made more realistic by adding more intricate patterns, textures, or additional details to the wings.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.