write detailed svg code for butterfly
- User
write detailed svg code for butterfly
- Assistant
Below is a detailed SVG code for a butterfly. I've designed it to be visually appealing and somewhat realistic, incorporating elements like the body, wings, antennae, legs, and intricate patterns on the wings. The butterfly is symmetrical for a natural look, and I've used various SVG elements such as
<path>,<ellipse>,<circle>, and<line>to create the shapes.Key Features of the SVG:
- Size: The SVG canvas is 400x400 pixels, making it easy to view and scale.
- Colors: I've used a palette inspired by real butterflies (e.g., orange, yellow, blue, and brown) to add vibrancy. You can easily modify these in the code.
- Details:
- The wings use
<path>elements with Bézier curves for smooth, organic shapes. - Patterns on the wings include spots (using
<circle>) and lines (using<path>) to mimic vein-like structures. - The body is an elongated ellipse for a tapered shape.
- Antennae and legs are simple lines for simplicity, but they can be extended for more complexity.
- Symmetry: The right side of the butterfly is a mirrored version of the left for balance.
- The wings use
- Strokes: Outlines are added with black strokes to give a defined edge.
- ViewBox: I've included a viewBox attribute for better scalability.
Here's the complete SVG code:
<svg width="400" height="400" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg"> <!-- Background (optional, for better visibility) --> <rect width="400" height="400" fill="#f0f8ff" /> <!-- Light blue background --> <!-- Body of the butterfly --> <ellipse cx="200" cy="200" rx="15" ry="80" fill="brown" stroke="black" stroke-width="2" /> <!-- Left Forewing (main upper wing) --> <path d="M 150 100 Q 100 150 50 100 Q 100 50 150 100 Z" fill="orange" stroke="black" stroke-width="1.5" /> <!-- Left Hindwing (lower wing) --> <path d="M 150 250 Q 100 200 50 250 Q 100 300 150 250 Z" fill="yellow" stroke="black" stroke-width="1.5" /> <!-- Right Forewing (mirrored) --> <path d="M 250 100 Q 300 150 350 100 Q 300 50 250 100 Z" fill="orange" stroke="black" stroke-width="1.5" /> <!-- Right Hindwing (mirrored) --> <path d="M 250 250 Q 300 200 350 250 Q 300 300 250 250 Z" fill="yellow" stroke="black" stroke-width="1.5" /> <!-- Antennae --> <line x1="200" y1="120" x2="180" y1="80" x2="80" stroke="black" stroke-width="2" stroke-linecap="round" /> <line x1="200" y1="120" x2="220" y1="80" x2="320" stroke="black" stroke-width="2" stroke-linecap="round" /> <!-- Legs (simple lines from the body) --> <line x1="200" y1="280" x2="180" y2="320" stroke="black" stroke-width="2" stroke-linecap="round" /> <line x1="200" y1="280" x2="220" y2="320" stroke="black" stroke-width="2" stroke-linecap="round" /> <line x1="200" y1="290" x2="190" y2="330" stroke="black" stroke-width="2" stroke-linecap="round" /> <line x1="200" y1="290" x2="210" y2="330" stroke="black" stroke-width="2" stroke-linecap="round" /> <!-- Wing Patterns (spots and veins for detail) --> <!-- Spots on left forewing --> <circle cx="100" cy="150" r="10" fill="blue" /> <circle cx="75" cy="125" r="5" fill="red" /> <!-- Veins on left forewing (simple paths for lines) --> <path d="M 100 100 L 80 120" stroke="black" stroke-width="1" fill="none" /> <path d="M 120 110 L 90 140" stroke="black" stroke-width="1" fill="none" /> <!-- Spots on left hindwing --> <circle cx="75" cy="225" r="8" fill="purple" /> <circle cx="100" cy="250" r="6" fill="green" /> <!-- Veins on left hindwing --> <path d="M 100 200 L 70 230" stroke="black" stroke-width="1" fill="none" /> <path d="M 120 220 L 80 260" stroke="black" stroke-width="1" fill="none" /> <!-- Spots on right forewing (mirrored) --> <circle cx="300" cy="150" r="10" fill="blue" /> <circle cx="325" cy="125" r="5" fill="red" /> <!-- Veins on right forewing --> <path d="M 300 100 L 320 120" stroke="black" stroke-width="1" fill="none" /> <path d="M 280 110 L 310 140" stroke="black" stroke-width="1" fill="none" /> <!-- Spots on right hindwing --> <circle cx="325" cy="225" r="8" fill="purple" /> <circle cx="300" cy="250" r="6" fill="green" /> <!-- Veins on right hindwing --> <path d="M 300 200 L 330 230" stroke="black" stroke-width="1" fill="none" /> <path d="M 280 220 L 320 260" stroke="black" stroke-width="1" fill="none" /> </svg>How to Use This SVG:
- Copy and Paste: Save the code in a file with a
.svgextension (e.g.,butterfly.svg) and open it in a web browser or an image viewer that supports SVG. - Customization:
- Colors: Change the
fillattributes (e.g.,fill="orange"tofill="red") to alter the butterfly's appearance. - Size: Adjust the
widthandheightattributes of the<svg>tag, or modify theviewBoxfor responsive scaling. - Paths: The
dattribute in<path>elements defines the shape using commands likeM(move to),Q(quadratic Bézier curve), andZ(close path). You can tweak these for more complexity. - Animation: For added interactivity, you could wrap elements in
<g>groups and use CSS animations or SVG's<animate>tag.
- Colors: Change the
- Tools: Edit this code in a text editor or use tools like Adobe Illustrator, Inkscape, or online SVG editors for further refinements.
This SVG is relatively simple but detailed enough to showcase a butterfly's key features. If you'd like more complexity (e.g., gradients, filters, or animations), let me know, and I can enhance it!
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 →
- grok-3-preview-02-24Compare side by side →
- o3-miniCompare side by side →
gemini-2.0-flash-001Compare side by side →
- grok-3-preview-02-24Compare side by side →