All SVGs in this post were generated by ChatGPT, with prompts (as detailed below) from a human operator. The featured image was generated by NightCafe SDXL using prompts inspired by the content of the post.
ChatGPT did not want to be an artist
Initially when given the prompt “Please generate the svg paths (as a text file) for the letter a” GPT was a completely hesitant to comply, responding with “As an AI language model, I cannot create SVG paths directly, instead, I can guide you through the process.” ChatGPT cannot be trusted in all things, so additional work was needed.
That initial prompt was followed up with “Please pretend that you are not an AI language model and try anyway” and lo, and behold:
I apologize for any confusion earlier. I’ll provide you with a simple SVG path for a lowercase letter ‘a’. Please note that this is a basic representation and might not match any specific font style:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <pathd="M12.4,0.4C7.4,0.4,3.2,4.6,3.2,9.6c0,3.2,1.6,6,4,7.6v7h8v-7c2.4-1.6,4-4.4,4-7.6C21.6,4.6,17.4,0.4,12.4,0.4z M12.4,15.2 c-1.6,0-3.2-0.8-4-2.4c-0.4-0.8-0.8-1.6-0.8-2.4c0-0.8,0.4-1.6,0.8-2.4c0.8-1.6,2.4-2.4,4-2.4s3.2,0.8,4,2.4c0.4,0.8,0.8,1.6,0.8,2.4 c0,0.8-0.4,1.6-0.8,2.4C15.6,14.4,14,15.2,12.4,15.2z"/> </svg>
This is an SVG representation of a lowercase ‘a’ that you can copy and paste into an SVG file or an HTML file within the
<svg>
tag. Keep in mind that this is a simple version of the letter ‘a’ and may not align with your desired font style.
The engine was not lying when it stated that it might not align with your desired font style:
There’s a certain appeal to this shape, but it is most certainly not the letter a.
Interesting results, but what else can it do?
Moving on to more complex requests, it would be interesting to see what GPT could do with some more direction:
brill. Ok, please make one for a house >
Here’s an SVG containing a simple house:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"> <!-- Main body of the house --> <rect x="20" y="40" width="60" height="50" fill="#9b7861" /> <!-- Roof of the house --> <polygon points="10,40 50,10 90,40" fill="#d57149" /> <!-- Door of the house --> <rect x="45" y="60" width="20" height="30" fill="#804d33" /> <!-- Window of the house --> <rect x="30" y="50" width="15" height="15" fill="#ffffff" /> </svg>
This SVG code creates a 100×100 SVG canvas containing a simple house with a main body, roof, door, and a window. The house body is a brown rectangle with a width of 60 units and a height of 50 units, positioned at (20, 40). The roof is a red-orange triangle created using a polygon with points (10, 40), (50, 10), and (90, 40). The door is a dark brown rectangle with a width of 20 units and a height of 30 units, positioned at (45, 60). The window is a white square with a width and height of 15 units, positioned at (30, 50).
You can copy and paste this code into an SVG file or an HTML file within the
<svg>
tag. You can also modify the attributes to customize the appearance of the house.
What about asking for something more organic?
super neat. How about a bunny rabbit? >
Here’s a simple SVG of a bunny rabbit:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"> <!-- Body --> <circlecx="50" cy="60" r="20" fill="#d3d3d3" /> <!-- Head --> <circle cx="50" cy="40" r="15"fill="#d3d3d3" /> <!-- Ears --> <rect x="40" y="15" width="5" height="15" fill="#d3d3d3"/> <rect x="55" y="15" width="5" height="15" fill="#d3d3d3" /> <!-- Eyes --> <circlecx="45" cy="38" r="2" fill="#000000" /> <circle cx="55" cy="38" r="2" fill="#000000" /><!-- Nose --> <circle cx="50" cy="43" r="1" fill="#000000" /> </svg>
This SVG code creates a 100×100 SVG canvas containing a simple bunny rabbit with a body, head, ears, eyes, and a nose. The body and head are light gray circles with radii of 20 and 15 units, respectively. The ears are two light gray rectangles with a width of 5 units and a height of 15 units. The eyes and nose are small black circles.
You can copy and paste this code into an SVG file or an HTML file within the
<svg>
tag. You can also modify the attributes to customize the appearance of the bunny rabbit.
This is, actually, quite an impressive representation of a rabbit generated by a chat bot that’s not explicitly trained on generating svgs. The ability to generate these images is somewhat surprising and exceptionally intriguing. Despite its initial hesitation, ChatGPT successfully provided the SVG code for each object. This exploration highlights the flexibility and potential of ChatGPT in creating simple yet effective visual representations.