Create a svg animation of spinning car
- User
Create a svg animation of spinning car
Assistant
Here's an SVG animation of a spinning car. The animation rotates the car continuously to create a spinning effect:
<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <!-- Car body --> <rect x="50" y="100" width="100" height="40" rx="5" fill="#3498db" id="car"> <!-- Animation --> <animateTransform attributeName="transform" type="rotate" from="0 100 120" to="360 100 120" dur="3s" repeatCount="indefinite" /> </rect> <!-- Car windows --> <rect x="60" y="105" width="30" height="15" rx="2" fill="#ecf0f1" transform-origin="100 120"> <animateTransform attributeName="transform" type="rotate" from="0 100 120" to="360 100 120" dur="3s" repeatCount="indefinite" /> </rect> <rect x="110" y="105" width="30" height="15" rx="2" fill="#ecf0f1" transform-origin="100 120"> <animateTransform attributeName="transform" type="rotate" from="0 100 120" to="360 100 120" dur="3s" repeatCount="indefinite" /> </rect> <!-- Wheels --> <circle cx="70" cy="140" r="10" fill="#2c3e50" transform-origin="100 120"> <animateTransform attributeName="transform" type="rotate" from="0 100 120" to="360 100 120" dur="3s" repeatCount="indefinite" /> </circle> <circle cx="130" cy="140" r="10" fill="#2c3e50" transform-origin="100 120"> <animateTransform attributeName="transform" type="rotate" from="0 100 120" to="360 100 120" dur="3s" repeatCount="indefinite" /> </circle> <!-- Wheel details --> <circle cx="70" cy="140" r="5" fill="#7f8c8d" transform-origin="100 120"> <animateTransform attributeName="transform" type="rotate" from="0 100 120" to="360 100 120" dur="3s" repeatCount="indefinite" /> </circle> <circle cx="130" cy="140" r="5" fill="#7f8c8d" transform-origin="100 120"> <animateTransform attributeName="transform" type="rotate" from="0 100 120" to="360 100 120" dur="3s" repeatCount="indefinite" /> </circle> </svg>How it works:
- The car is centered at (100,120) which serves as the rotation point
- Each element has an
<animateTransform>that rotates it 360 degrees - All animations are synchronized with the same duration (3 seconds)
- The animation repeats indefinitely
You can adjust:
- The
durattribute to make it spin faster or slower - The colors by changing the fill values
- The car design by modifying the shapes
Would you like me to make any adjustments to the animation or car design?
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.