#include <fstream>
#include <string>

void generateSVG() {
    std::ofstream svgFile("transformer_schematic.svg");
    
    svgFile << R"(<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="500" height="200" viewBox="0 0 500 200" xmlns="http://w...content-available-to-author-only...3.org/2000/svg">
    <!-- Основная линия -->
    <line x1="50" y1="100" x2="450" y2="100" stroke="black" stroke-width="2"/>
    
    <!-- Первичная обмотка (r1) -->
    <line x1="100" y1="100" x2="100" y2="70" stroke="black" stroke-width="2"/>
    <line x1="80" y1="70" x2="120" y2="70" stroke="black" stroke-width="2"/>
    <text x="85" y="50" font-family="Arial" font-size="12">r1=0.0235Ω</text>
    
    <!-- jx1 -->
    <line x1="150" y1="100" x2="150" y2="70" stroke="black" stroke-width="2"/>
    <ellipse cx="150" cy="60" rx="10" ry="10" stroke="black" stroke-width="2" fill="none"/>
    <text x="135" y="30" font-family="Arial" font-size="12">jx1=0.0765Ω</text>
    
    <!-- Параллельная ветвь (r0 и x0) -->
    <line x1="200" y1="100" x2="200" y2="20" stroke="black" stroke-width="2"/>
    <!-- r0 -->
    <line x1="180" y1="20" x2="220" y2="20" stroke="black" stroke-width="2"/>
    <text x="185" y="0" font-family="Arial" font-size="12">r0=8.8Ω</text>
    <!-- x0 -->
    <ellipse cx="200" cy="40" rx="20" ry="20" stroke="black" stroke-width="2" fill="none"/>
    <text x="175" y="70" font-family="Arial" font-size="12">jx0=7.34Ω</text>
    
    <!-- Вторичная обмотка -->
    <!-- r2' -->
    <line x1="250" y1="100" x2="250" y2="70" stroke="black" stroke-width="2"/>
    <line x1="230" y1="70" x2="270" y2="70" stroke="black" stroke-width="2"/>
    <text x="235" y="50" font-family="Arial" font-size="12">r2'=0.00079Ω</text>
    
    <!-- jx2' -->
    <line x1="300" y1="100" x2="300" y2="70" stroke="black" stroke-width="2"/>
    <ellipse cx="300" cy="60" rx="10" ry="10" stroke="black" stroke-width="2" fill="none"/>
    <text x="285" y="30" font-family="Arial" font-size="12">jx2'=0.0765Ω</text>
    
    <!-- Подписи -->
    <text x="30" y="80" font-family="Arial" font-size="14">V1</text>
    <text x="320" y="80" font-family="Arial" font-size="14">V2'</text>
</svg>)";
    
    svgFile.close();
}

int main() {
    generateSVG();
    return 0;
}