grok-3-preview-02-24· xAI
LMArena Human Preference 140K
write detailed svg code for butterfly
- User
write detailed svg code for butterfly
- 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:
- SVG Container: The
<svg>element defines the canvas size (400x400) and the viewBox for scaling. - Background: A light blue rectangle (
<rect>) is added as a background for better visibility. - Transform: The butterfly is centered using
transform="translate(200, 200)"to place the origin at the center of the canvas. - 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. - Wings:
- The wings are drawn using
<path>elements with cubic Bézier curves (CandS) 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.
- The wings are drawn using
- 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
.svgfile (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.
- SVG Container: The
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- o4-mini-2025-04-16Compare side by side →
qwq-32bCompare side by side →
- o3-miniCompare side by side →
llama-4-maverick-03-26-experimentalCompare side by side →
gemini-2.0-flash-001Compare side by side →
gemini-2.5-pro-preview-03-25Compare side by side →
gemini-2.5-flash-preview-04-17Compare side by side →
- o3-miniCompare side by side →
gemini-2.0-flash-001Compare side by side →
- grok-3-preview-02-24Compare side by side →
- grok-3-mini-betaCompare side by side →