Skip to content

Instantly share code, notes, and snippets.

@simonw
Created May 7, 2025 14:51
Show Gist options
  • Save simonw/fcd6a51d08a16912417a8f123951930d to your computer and use it in GitHub Desktop.
Save simonw/fcd6a51d08a16912417a8f123951930d to your computer and use it in GitHub Desktop.

2025-05-07T14:46:41 conversation: 01jtnkf57zkyffxzkyz0s3sf0s id: 01jtnkf583c6aggvfpj1gpdfcb

Model: gemini-2.5-pro-preview-05-06

Prompt

Generate an SVG of a pelican riding a bicycle

Response

Okay, here's an SVG of a cartoonish pelican riding a bicycle. I've tried to keep it relatively simple but recognizable.

<svg width="400" height="350" viewBox="0 0 400 350" xmlns="http://www.w3.org/2000/svg">
  <style>
    .pelican-body { fill: #F0F0F0; stroke: #333; stroke-width: 2; }
    .pelican-beak { fill: #FFA500; stroke: #333; stroke-width: 2; }
    .pelican-pouch { fill: #FFC04D; stroke: #333; stroke-width: 2; }
    .pelican-eye { fill: #000; }
    .pelican-leg { fill: #FFC04D; stroke: #333; stroke-width: 2; }
    .pelican-wing { fill: #E0E0E0; stroke: #333; stroke-width: 2; }

    .bike-frame { fill: none; stroke: #4682B4; stroke-width: 8; stroke-linecap: round; }
    .bike-wheel { fill: #FFF; stroke: #333; stroke-width: 4; }
    .bike-tire { fill: #555; stroke: #333; stroke-width: 2; }
    .bike-spoke { stroke: #888; stroke-width: 1; }
    .bike-hub { fill: #AAA; stroke: #333; stroke-width: 1; }
    .bike-seat { fill: #654321; stroke: #333; stroke-width: 2; }
    .bike-pedal { fill: #777; stroke: #333; stroke-width: 1; }
    .bike-handlebar { fill: none; stroke: #777; stroke-width: 6; stroke-linecap: round; }
    .bike-grip { fill: #333; }
  </style>

  <!-- Bicycle -->
  <g id="bicycle">
    <!-- Back Wheel -->
    <circle cx="100" cy="250" r="45" class="bike-tire" />
    <circle cx="100" cy="250" r="35" class="bike-wheel" />
    <circle cx="100" cy="250" r="5" class="bike-hub" />
    <!-- Spokes for back wheel -->
    <line x1="100" y1="250" x2="100" y2="215" class="bike-spoke" />
    <line x1="100" y1="250" x2="100" y2="285" class="bike-spoke" />
    <line x1="100" y1="250" x2="135" y2="250" class="bike-spoke" />
    <line x1="100" y1="250" x2="65" y2="250" class="bike-spoke" />
    <line x1="100" y1="250" x2="124.7" y2="224.7" class="bike-spoke" />
    <line x1="100" y1="250" x2="75.3" y2="275.3" class="bike-spoke" />
    <line x1="100" y1="250" x2="124.7" y2="275.3" class="bike-spoke" />
    <line x1="100" y1="250" x2="75.3" y2="224.7" class="bike-spoke" />

    <!-- Front Wheel -->
    <circle cx="300" cy="250" r="45" class="bike-tire" />
    <circle cx="300" cy="250" r="35" class="bike-wheel" />
    <circle cx="300" cy="250" r="5" class="bike-hub" />
    <!-- Spokes for front wheel -->
    <line x1="300" y1="250" x2="300" y2="215" class="bike-spoke" />
    <line x1="300" y1="250" x2="300" y2="285" class="bike-spoke" />
    <line x1="300" y1="250" x2="335" y2="250" class="bike-spoke" />
    <line x1="300" y1="250" x2="265" y2="250" class="bike-spoke" />
    <line x1="300" y1="250" x2="324.7" y2="224.7" class="bike-spoke" />
    <line x1="300" y1="250" x2="275.3" y2="275.3" class="bike-spoke" />
    <line x1="300" y1="250" x2="324.7" y2="275.3" class="bike-spoke" />
    <line x1="300" y1="250" x2="275.3" y2="224.7" class="bike-spoke" />

    <!-- Frame -->
    <path class="bike-frame" d="M100 250 L200 250 L300 150 L220 150 Z" /> <!-- Main triangle lower part and chainstay -->
    <line x1="200" y1="250" x2="150" y2="160" class="bike-frame" /> <!-- Seat tube -->
    <line x1="100" y1="250" x2="150" y2="160" class="bike-frame" /> <!-- Seat stay -->
    <line x1="300" y1="250" x2="220" y2="150" class="bike-frame" /> <!-- Fork -->

    <!-- Pedals and Cranks -->
    <circle cx="200" cy="250" r="10" class="bike-hub" /> <!-- Crank hub -->
    <line x1="200" y1="250" x2="230" y2="270" class="bike-frame" stroke-width="6"/> <!-- Crank arm 1 -->
    <rect x="225" y="265" width="20" height="10" rx="2" class="bike-pedal" /> <!-- Pedal 1 -->
    <line x1="200" y1="250" x2="170" y2="230" class="bike-frame" stroke-width="6"/> <!-- Crank arm 2 -->
    <rect x="155" y="225" width="20" height="10" rx="2" class="bike-pedal" /> <!-- Pedal 2 (behind) -->

    <!-- Seat -->
    <line x1="150" y1="160" x2="150" y2="145" class="bike-frame" stroke-width="6"/> <!-- Seat post -->
    <ellipse cx="150" cy="135" rx="30" ry="12" class="bike-seat" />

    <!-- Handlebars -->
    <line x1="220" y1="150" x2="220" y2="130" class="bike-frame" stroke-width="6"/> <!-- Handlebar stem -->
    <path d="M190 130 Q220 120 250 130" class="bike-handlebar" />
    <circle cx="190" cy="130" r="5" class="bike-grip"/>
    <circle cx="250" cy="130" r="5" class="bike-grip"/>
  </g>

  <!-- Pelican -->
  <g id="pelican" transform="translate(30, 0)">
    <!-- Legs -->
    <path d="M150 200 Q160 230 170 228" class="pelican-leg" /> <!-- Back leg on hidden pedal -->
    <path d="M155 200 Q180 240 227 268" class="pelican-leg" /> <!-- Front leg on visible pedal -->
    <path d="M165 225 L170 232 L175 225 Z" class="pelican-leg" /> <!-- Back foot -->
    <path d="M222 265 L230 272 L237 265 Z" class="pelican-leg" /> <!-- Front foot -->

    <!-- Body -->
    <ellipse cx="160" cy="165" rx="45" ry="55" class="pelican-body" />

    <!-- Wing (simplified, as if holding handlebar) -->
    <path d="M160 150 Q190 130 190 130 L195 125 L185 125 Z" class="pelican-wing" />
    <path d="M165 155 Q220 135 240 130 L245 125 L235 125 Z" class="pelican-wing" />


    <!-- Neck -->
    <path d="M160 110 Q170 130 180 110 Q170 90 160 110" class="pelican-body" fill="#E8E8E8" />

    <!-- Head -->
    <circle cx="180" cy="80" r="25" class="pelican-body" />

    <!-- Beak -->
    <path d="M195 70 C250 60, 260 100, 195 90 Z" class="pelican-beak" />
    <path d="M198 88 C240 95, 250 110, 198 100 Z" class="pelican-pouch" />
    <line x1="195" y1="80" x2="240" y2="75" stroke="#A0522D" stroke-width="1.5"/> <!-- Beak split line -->


    <!-- Eye -->
    <circle cx="185" cy="70" r="5" class="pelican-eye" />
    <circle cx="186" cy="69" r="1.5" fill="#FFF" /> <!-- Eye highlight -->

  </g>

</svg>

How to use it:

  1. Copy the entire code block above.
  2. Paste it into a plain text file.
  3. Save the file with an .svg extension (e.g., pelican_bike.svg).
  4. Open the file in a modern web browser (Chrome, Firefox, Edge, Safari) or an SVG editor (like Inkscape or Adobe Illustrator).

Breakdown of the SVG:

  • <svg> tag: Defines the SVG canvas size and viewport.
  • <style> block: Contains CSS rules to style different parts of the pelican and bicycle. This makes it easier to change colors later.
  • <!-- Bicycle --> group (<g id="bicycle">):
    • Wheels: Made of a larger circle for the tire and a smaller one for the rim, plus a hub and lines for spokes.
    • Frame: Constructed using path and line elements to create the classic diamond frame shape, fork, and stays.
    • Pedals and Cranks: lines for crank arms and rects for pedals.
    • Seat: An ellipse on a small line post.
    • Handlebars: A path for the curved bar and circles for grips.
  • <!-- Pelican --> group (<g id="pelican">):
    • The transform="translate(30, 0)" on this group shifts the whole pelican a bit to the right to position it better on the bike.
    • Legs & Feet: Simple paths with quadratic Bezier curves (Q) to make them look like they're pedaling.
    • Body: An ellipse.
    • Wings: Simplified paths, positioned as if gripping the handlebars.
    • Neck: A curved path.
    • Head: A circle.
    • Beak & Pouch: Two paths using cubic Bezier curves (C) to create the characteristic pelican beak and pouch shape. A line adds a detail for the beak split.
    • Eye: A circle with a smaller white circle for a highlight.

This is a somewhat complex drawing for pure hand-coded SVG, but it should give you a good starting point. You can modify coordinates, colors, and shapes to customize it further!

Token usage:

11 input, 3,281 output, {"promptTokensDetails": [{"modality": "TEXT", "tokenCount": 11}], "thoughtsTokenCount": 1558}

Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment