Home > Blockchain >  How to draw rectangular cloud with SVG path?
How to draw rectangular cloud with SVG path?

Time:10-18

I've been trying to draw a rectangular cloud (image below) with SVG path with with no success so far, any help with this would be much appreciated.

enter image description here

CodePudding user response:

One way to do this is in a vector drawing program like inkscape, illustrator or animate. I used animate here to quickly trace a corner of the bubble and duplicate it a few times. I then used SVGO to optimize it a bit.

(note you'll probably want to run the code snippet as a full page to see everything)

<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" width="228" height="198"><path stroke="red" stroke-width="2" stroke-linejoin="round" stroke-linecap="round" fill="none" d="M7.1 106.4q-.7-.55-1.45-1.4-2-2.4-2-5.75.05-3.45 2.15-5.85.75-.75 1.5-1.2-.75-.6-1.45-1.45-2-2.45-1.95-5.85 0-3.45 2.1-5.85.75-.8 1.55-1.25-.8-.6-1.5-1.4-2-2.45-1.95-5.85.05-3.5 2.1-5.9.75-.85 1.6-1.25-.8-.6-1.55-1.5-2-2.45-1.95-5.85.05-3.45 2.1-5.85.8-.85 1.6-1.3-.8-.55-1.55-1.45-2-2.4-1.95-5.85.05-3.45 2.1-5.85.8-.9 1.65-1.4-.85-.5-1.6-1.3-2-2.1-1.95-5.1 0-3.05 2.1-5.1.75-.8 1.7-1.35-2.05-2.6-2.05-6 0-4 2.85-6.85 2.85-2.85 6.85-2.85 4 0 6.85 2.85.3.3.55.6l.45-.4q.45-.5.9-.9 2.3-2.05 5.55-2.05 3.3 0 5.6 2.05.75.7 1.3 1.55.55-.85 1.3-1.55 2.3-2.05 5.55-2.05 3.3 0 5.6 2.05.8.75 1.35 1.6.6-.85 1.4-1.6Q54.9 5.9 58.2 5.9q3.35 0 5.7 2.05.8.75 1.35 1.6.6-.85 1.4-1.6Q69 5.9 72.3 5.9q3.35 0 5.7 2.05.8.75 1.2 1.5.55-.75 1.4-1.5 2.3-2.05 5.6-2.05 3.35 0 5.7 2.05.8.75 1.2 1.5.6-.8 1.4-1.5 2.3-2.05 5.6-2.05 3.35 0 5.7 2.05.523.49.875.975.352-.484.875-.975 2.35-2.05 5.7-2.05h.3q3.105.094 5.3 2.05.8.7 1.4 1.5.4-.75 1.2-1.5 2.35-2.05 5.7-2.05 3.3 0 5.6 2.05.8.7 1.4 1.5.4-.75 1.2-1.5 2.35-2.05 5.7-2.05 3.3 0 5.6 2.05.85.75 1.4 1.5.4-.75 1.2-1.5 2.35-2.05 5.7-2.05 3.3 0 5.65 2.05.8.75 1.4 1.6.55-.85 1.35-1.6 2.35-2.05 5.7-2.05 3.3 0 5.65 2.05.8.75 1.4 1.6.55-.85 1.35-1.6 2.3-2.05 5.6-2.05 3.25 0 5.55 2.05.75.7 1.3 1.55.55-.85 1.3-1.55 2.3-2.05 5.6-2.05 3.25 0 5.55 2.05.45.4.9.9l.45.4q.25-.3.55-.6 2.85-2.85 6.85-2.85 4 0 6.85 2.85 2.85 2.85 2.85 6.85 0 3.4-2.05 6 .95.55 1.7 1.35 2.1 2.05 2.1 5.1.05 3-1.95 5.1-.75.8-1.6 1.3.85.5 1.65 1.4 2.05 2.4 2.1 5.85.05 3.45-1.95 5.85-.75.9-1.55 1.45.8.45 1.6 1.3 2.05 2.4 2.1 5.85.05 3.4-1.95 5.85-.75.9-1.55 1.5.85.4 1.6 1.25 2.05 2.4 2.1 5.9.05 3.4-1.95 5.85-.7.8-1.5 1.4.8.45 1.55 1.25 2.1 2.4 2.1 5.85.05 3.4-1.95 5.85-.7.85-1.45 1.45.75.45 1.5 1.2 2.1 2.4 2.15 5.85 0 3.35-2 5.75-.75.85-1.45 1.4m-16.9-97.55q.2.2.4.45l.05-.05M7 106.8q-.75.6-1.45 1.45-2 2.45-1.95 5.85 0 3.45 2.1 5.85.75.8 1.55 1.25-.8.6-1.5 1.4-2 2.45-1.95 5.85.05 3.5 2.1 5.9.75.85 1.6 1.25-.8.6-1.55 1.5-2 2.45-1.95 5.85.05 3.45 2.1 5.85.8.85 1.6 1.3-.8.55-1.55 1.45-.569.683-.975 1.45-1.01 1.931-.975 4.4.05 3.45 2.1 5.85.8.9 1.65 1.4-.408.24-.8.55-.41.334-.8.75-2 2.1-1.95 5.1 0 3.05 2.1 5.1.75.8 1.7 1.35-2.05 2.6-2.05 6 0 4 2.85 6.85 2.85 2.85 6.85 2.85 4 0 6.85-2.85.3-.3.55-.6l.05-.05q.2.25.4.45.45.5.9.9 2.3 2.05 5.55 2.05 3.3 0 5.6-2.05.75-.7 1.3-1.55.55.85 1.3 1.55 2.3 2.05 5.55 2.05 3.3 0 5.6-2.05.8-.75 1.35-1.6.6.85 1.4 1.6 2.35 2.05 5.65 2.05 3.35 0 5.7-2.05.8-.75 1.35-1.6.6.85 1.4 1.6 2.35 2.05 5.65 2.05 3.35 0 5.7-2.05.8-.75 1.2-1.5.55.75 1.4 1.5 2.3 2.05 5.6 2.05 3.35 0 5.7-2.05.8-.75 1.2-1.5.6.8 1.4 1.5 2.3 2.05 5.6 2.05 3.35 0 5.7-2.05.776-.727 1.175-1.45.4.723 1.175 1.45 2.35 2.05 5.7 2.05h.3q3.1-.1 5.3-2.05.8-.7 1.4-1.5.4.75 1.2 1.5 2.35 2.05 5.7 2.05 3.3 0 5.6-2.05.8-.7 1.4-1.5.4.75 1.2 1.5 2.35 2.05 5.7 2.05 3.3 0 5.6-2.05.85-.75 1.4-1.5.4.75 1.2 1.5 2.35 2.05 5.7 2.05 3.3 0 5.65-2.05.8-.75 1.4-1.6.55.85 1.35 1.6 2.35 2.05 5.7 2.05 3.3 0 5.65-2.05.8-.75 1.4-1.6.55.85 1.35 1.6 2.3 2.05 5.6 2.05 3.25 0 5.55-2.05.75-.7 1.3-1.55.55.85 1.3 1.55 2.3 2.05 5.6 2.05 3.25 0 5.55-2.05.45-.4.9-.9.2-.2.4-.45l.05.05q.25.3.55.6 2.85 2.85 6.85 2.85 4 0 6.85-2.85 2.85-2.85 2.85-6.85 0-3.4-2.05-6 .95-.55 1.7-1.35 2.1-2.05 2.1-5.1.05-3-1.95-5.1-.39-.416-.8-.75-.392-.31-.8-.55.85-.5 1.65-1.4 2.05-2.4 2.1-5.85.036-2.469-.975-4.4-.406-.767-.975-1.45-.75-.9-1.55-1.45.8-.45 1.6-1.3 2.05-2.4 2.1-5.85.05-3.4-1.95-5.85-.75-.9-1.55-1.5.85-.4 1.6-1.25 2.05-2.4 2.1-5.9.05-3.4-1.95-5.85-.7-.8-1.5-1.4.8-.45 1.55-1.25 2.1-2.4 2.1-5.85.05-3.4-1.95-5.85-.7-.85-1.45-1.45m-16.7 83.35.45-.4M24 8.85q-.2.2-.4.45l-.05-.05m.15 180.9-.45-.4"/></svg>

  • Related