Write an SVG of 4 hearts card
- User
Write an SVG of 4 hearts card
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Write an SVG of 4 hearts card
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Here is the SVG code for a 4 of Hearts playing card:
<svg width="200" height="300" viewBox="0 0 200 300" xmlns="http://www.w3.org/2000/svg">
<!-- Card background -->
<rect x="0" y="0" width="200" height="300" fill="white" stroke="black"/>
<!-- Define the heart symbol -->
<defs>
<symbol id="heart" viewBox="0 0 100 100">
<!-- Heart shape -->
<path d="M50,15
C35,0 0,25 25,62.5
C50,100 75,100 100,62.5
C100,25 65,0 50,15
Z" fill="red"/>
</symbol>
</defs>
<!-- Top-left corner: number and suit -->
<text x="15" y="35" font-size="24" font-family="Arial" fill="red">4</text>
<use href="#heart" x="15" y="40" width="20" height="20"/>
<!-- Bottom-right corner: number and suit (rotated) -->
<g transform="rotate(180, 185, 265)">
<text x="170" y="265" font-size="24" font-family="Arial" fill="red">4</text>
<use href="#heart" x="165" y="270" width="20" height="20"/>
</g>
<!-- Central hearts -->
<!-- Top hearts -->
<use href="#heart" x="50" y="80" width="100" height="100"/>
<use href="#heart" x="50" y="160" width="100" height="100"/>
<!-- Bottom hearts (inverted) -->
<use href="#heart" x="50" y="80" width="100" height="100" transform="rotate(180, 100, 130)"/>
<use href="#heart" x="50" y="160" width="100" height="100" transform="rotate(180, 100, 210)"/>
</svg>
You can copy this code into a text file and save it with the .svg extension (e.g., 4_of_hearts.svg). Then, you can open it with a web browser or an SVG-compatible image viewer to see the rendered playing card.
SVG Canvas: The canvas is set to 200 pixels wide and 300 pixels tall to represent a standard playing card size.
Card Background:
<rect x="0" y="0" width="200" height="300" fill="white" stroke="black"/>
Heart Symbol Definition:
<defs>
<symbol id="heart" viewBox="0 0 100 100">
<!-- Heart shape path -->
</symbol>
</defs>
<symbol> element defines a reusable heart shape.viewBox is set to 0 0 100 100 for scaling purposes.Heart Shape Path:
<path d="M50,15
C35,0 0,25 25,62.5
C50,100 75,100 100,62.5
C100,25 65,0 50,15
Z" fill="red"/>
Corner Symbols:
<text x="15" y="35" font-size="24" font-family="Arial" fill="red">4</text>
<use href="#heart" x="15" y="40" width="20" height="20"/>
<g transform="rotate(180, 185, 265)">
<text x="170" y="265" font-size="24" font-family="Arial" fill="red">4</text>
<use href="#heart" x="165" y="270" width="20" height="20"/>
</g>
<g> is rotated 180 degrees to mirror the symbols on the bottom-right corner.Central Hearts:
<use href="#heart" x="50" y="80" width="100" height="100"/>
<use href="#heart" x="50" y="160" width="100" height="100"/>
<use href="#heart" x="50" y="80" width="100" height="100" transform="rotate(180, 100, 130)"/>
<use href="#heart" x="50" y="160" width="100" height="100" transform="rotate(180, 100, 210)"/>
Note: The positions and sizes might need slight adjustments depending on how precise you want the layout to be. SVG coordinates can be fine-tuned to perfect the alignment and spacing.
Not yet included in a published release.