<?xml version="1.0"?>
<track name="Monza">

  <racing-line>
    <distance-factor>0.98</distance-factor>
    <stiffness>2.0</stiffness>
  </racing-line>

  <!-- Sky Box -->

  <sky>
    <sides>textures/sky_sides.png</sides>
	<top>textures/sky_top.png</top>
	<bottom>textures/sky_bottom.png</bottom>
	<smooth/>
  </sky>

  <material name="track" type="asphalt">
	<friction>1.0</friction>
	<restitution>0.1</restitution>
	<rolling>1.0</rolling>
	<drag>0.0</drag>
	<bump-amplitude>0.01</bump-amplitude>
	<bump-wavelength>100.0</bump-wavelength>
	<texture>
	  <file>textures/track2.png</file>
	  <length>200.0</length>
	  <smooth/>
	  <mipmap/>
	</texture>
  </material>

  <material name="grass" type="grass">
	<friction>0.7</friction>
	<restitution>0.1</restitution>
	<rolling>5.0</rolling>
	<drag>20.0</drag>	
	<bump-amplitude>0.1</bump-amplitude>
	<bump-wavelength>10.0</bump-wavelength>
	<texture>
	  <file>textures/grass.png</file>
	  <width>10.0</width>
	  <length>12.0</length>
	  <smooth/>
	  <mipmap/>
	</texture>
  </material>

  <material name="gravel" type="gravel">
	<friction>0.8</friction>
	<restitution>0.0</restitution>
	<rolling>40.0</rolling>
	<drag>200.0</drag>	
	<bump-amplitude>0.05</bump-amplitude>
	<bump-wavelength>2.0</bump-wavelength>
	<texture>
	  <file>textures/gravel3.png</file>
	  <width>10.0</width>
	  <length>10.0</length>
	  <smooth/>
	  <mipmap/>
	</texture>
  </material>

  <material name="tires" type="rubber">
	<friction>1.0</friction>
	<restitution>0.8</restitution>
	<rolling>1.0</rolling>
	<drag>5.0</drag>
	<bump-amplitude>0.0</bump-amplitude>
	<bump-wavelength>1.0</bump-wavelength>
    <texture>
	  <file>textures/red-tires.png</file>
	  <width>0.33</width>
	  <length>3.0</length>
	  <smooth/>
	  <mipmap/>
	</texture>
  </material>

  <material name="rail" type="metal">
	<friction>1.0</friction>
	<restitution>0.1</restitution>
	<rolling>1.0</rolling>
	<drag>0.0</drag>	
	<bump-amplitude>0.0</bump-amplitude>
	<bump-wavelength>1.0</bump-wavelength>
    <texture>
	  <file>textures/rail.png</file>
	  <width>0.34</width>
	  <length>10.0</length>
	  <smooth/>
	  <mipmap/>
	</texture>
  </material>

  <material name="wall" type="concrete">
	<friction>1.0</friction>
	<restitution>0.1</restitution>
	<rolling>1.0</rolling>
	<drag>0.0</drag>
	<bump-amplitude>0.0</bump-amplitude>
	<bump-wavelength>1.0</bump-wavelength>
	<texture>
	  <file>textures/wall.png</file>
	  <width>1.0</width>
	  <length>10.0</length>
	  <smooth/>
	  <mipmap/>
	</texture>
  </material>

  <material name="kerb" type="concrete">
	<friction>1.0</friction>
	<restitution>0.1</restitution>
	<rolling>1.0</rolling>
	<drag>0.0</drag>
	<bump-amplitude>0.06</bump-amplitude>
	<bump-wavelength>2.0</bump-wavelength>
	<texture>
	  <file>textures/red-kerb.png</file>
	  <width>2.0</width>
	  <length>4.0</length>
	  <smooth/>
	  <mipmap/>
	</texture>
  </material>

  <!-- Segment Properties -->

  <segment name="straight">
    [ wall grass kerb track kerb grass rail ]
  </segment>
  <segment name="straight pit">
    [ wall track kerb track kerb grass rail ]
  </segment>
  <segment name="left turn">
    [ wall grass kerb track kerb gravel tires ]
  </segment>
  <segment name="left turn pit">
    [ wall track kerb track kerb gravel tires ]
  </segment>
  <segment name="right turn">
    [ tires gravel kerb track kerb grass rail ]
  </segment>

  <!-- The track -->
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>494.2</length>
    <left-width>[ 0.0, 25.0 ]</left-width>
    <right-width>[ 0.0, 25.0 ]</right-width>
    <left-road-width>[ 0.0, 7.0 ]</left-road-width>
    <right-road-width>[ 0.0, 16.0 ]</right-road-width>
    <right-road-width>[ 331.9, 16.0 ]</right-road-width>
    <right-road-width>[ 414.9, 7.0 ]</right-road-width>
    <left-wall-height>1.0</left-wall-height>
    <right-wall-height>1.0</right-wall-height>
	<braking-marker>
	  <file>textures/50.png</file>
	  <distance>50.0</distance>
	  <size>[ 1.4, 0.7 ]</size>
	  <offset>[ 2.0, 0.0 ]</offset>
	  <side>left</side>
	</braking-marker>
	<braking-marker>
	  <file>textures/100.png</file>
	  <distance>100.0</distance>
	</braking-marker>
	<braking-marker>
	  <file>textures/150.png</file>
	  <distance>150.0</distance>
	</braking-marker>
	<elevation>[ 251.8, 1.56 ]</elevation>
	<elevation>[ 504.3, 3.30 ]</elevation>
  </road>

  <!-- Variante Del Rettifilo -->
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>23.2</length>
    <radius>-16.6</radius>
    <skew>0.5</skew>
	<right-kerb>
	  <start>
	    <transition>
		  <length>4.0</length>
		  <width>1.0</width>
		</transition>
	  </start>
	  <end>
	    <transition>
		  <length>4.0</length>
		  <width>1.0</width>
		</transition>
	  </end>
	  <profile>[ 1.2, 0.09 ][ 1.5, 0.09 ][ 1.6, 0.0 ]</profile>
	</right-kerb>
  </road>

  <road segment="straight">
    <resolution>10.0</resolution>
    <length>12.4</length>
  </road>

  <road segment="straight">
    <resolution>2.0</resolution>
    <length>31.5</length>
    <radius>16.6</radius>
    <skew>-0.5</skew>
	<left-kerb>
	  <start>
	    <transition>
		  <length>4.0</length>
		  <width>1.0</width>
		</transition>
	  </start>
	  <end>
	    <transition>
		  <distance>10.0</distance>
		  <length>4.0</length>
		  <width>1.0</width>
		</transition>
	  </end>
	  <profile>[ 1.2, 0.09 ][ 1.5, 0.09 ][ 1.6, 0.0 ]</profile>
	</left-kerb>
  </road>

  <road segment="straight">
    <resolution>10.0</resolution>
    <length>33.2</length>
	<right-kerb>
	  <start><transition/></start>
	</right-kerb>
  </road>

  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>99.0</length>
    <radius>-200.0</radius>
    <racing-line-adjustment>-1.0</racing-line-adjustment>
	<right-kerb>
	  <end>
	    <distance>80.0</distance>
	    <transition/>
	  </end>
	</right-kerb>
  </road>

  <road segment="straight">
    <resolution>10.0</resolution>
    <length>124.5</length>
	<braking-marker>
	  <file>textures/100.png</file>
	  <distance>100.0</distance>
	  <side>left</side>
	</braking-marker>
	<elevation>[ 0.0, 4.7 ]</elevation>
  </road>

  <!-- Curva Biassono -->
  <road segment="right turn">
    <resolution>2.0</resolution>
    <length>398.3</length>
    <radius>-290.4</radius>
	<right-kerb>
	  <start>
	    <distance>80.0</distance>
	    <transition/>
	  </start>
	  <end>
	    <distance>220.0</distance>
	    <transition/>
	  </end>
	</right-kerb>
  </road>

  <road segment="straight">
    <resolution>10.0</resolution>
    <length>439.8</length>
	<braking-marker>
	  <file>textures/50.png</file>
	  <distance>50.0</distance>
	  <side>right</side>
	</braking-marker>
	<braking-marker>
	  <file>textures/100.png</file>
	  <distance>100.0</distance>
	</braking-marker>
	<braking-marker>
	  <file>textures/150.png</file>
	  <distance>150.0</distance>
	</braking-marker>
	<elevation>[ 0.0, 6.2 ]</elevation>
	<elevation>[ 226.0, 8.3 ]</elevation>
  </road>

  <!-- Variante Della Roggia -->
  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>16.6</length>
    <radius>16.6</radius>
    <skew>-0.5</skew>
	<left-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</left-kerb>
	<elevation>[ 0.0, 8.2 ]</elevation>
  </road>

  <road segment="left turn">
    <resolution>10.0</resolution>
    <length>24.9</length>
	<right-kerb>
	  <start><transition/></start>
	</right-kerb>
  </road>

  <road segment="right turn">
    <resolution>2.0</resolution>
    <length>17.8</length>
    <radius>-16.6</radius>
    <skew>0.5</skew>
	<right-kerb>
	  <end><transition/></end>
	</right-kerb>
  </road>

  <road segment="right turn">
    <resolution>2.0</resolution>
    <length>83.0</length>
    <radius>331.9</radius>
    <skew>-0.5</skew>
  </road>

  <road segment="straight">
    <resolution>10.0</resolution>
    <length>207.4</length>
	<braking-marker>
	  <file>textures/100.png</file>
	  <distance>100.0</distance>
	  <side>left</side>
	</braking-marker>
	<elevation>[ 0.0, 7.6 ]</elevation>
  </road>

  <!-- Prima Curva Di Lesmo -->
  <road segment="right turn">
    <resolution>2.0</resolution>
    <length>120.3</length>
    <radius>-66.4</radius>
	<right-kerb>
	  <start><transition/></start>
	  <end>
	    <distance>100.0</distance>
        <transition/>
	  </end>
	</right-kerb>
	<left-kerb>
	  <start>
	    <distance>100.0</distance>
        <transition/>
	  </start>
	</left-kerb>
	<elevation>[ 0.0, 6.5 ]</elevation>
  </road>

  <road segment="straight">
    <resolution>10.0</resolution>
    <length>232.3</length>
	<braking-marker>
	  <file>textures/100.png</file>
	  <distance>100.0</distance>
	  <side>left</side>
	</braking-marker>
	<left-kerb>
	  <end>
	    <distance>40.0</distance>
        <transition/>
	  </end>
	</left-kerb>
	<right-kerb>
	  <start>
	    <distance>220.0</distance>
        <transition/>
	  </start>
	</right-kerb>
	<elevation>[ 0.0, 5.6 ]</elevation>
  </road>

  <!-- Seconda Curva Di Lesmo -->
  <road segment="right turn">
    <resolution>2.0</resolution>
    <length>27.4</length>
    <radius>-24.9</radius>
    <racing-line-adjustment>-0.5</racing-line-adjustment>
    <skew>0.5</skew>
	<right-kerb/>
	<elevation>[ 0.0, 4.8 ]</elevation>
  </road>

  <road segment="straight">
    <resolution>10.0</resolution>
    <length>406.6</length>
    <racing-line-adjustment>1.0</racing-line-adjustment>
	<braking-marker>
	  <file>textures/100.png</file>
	  <distance>100.0</distance>
	  <side>right</side>
	</braking-marker>
	<right-kerb>
	  <end>
	    <distance>20.0</distance>
        <transition/>
	  </end>
	</right-kerb>
	<left-kerb>
	  <start><transition/></start>
	  <end>
	    <distance>150.0</distance>
        <transition/>
	  </end>
	</left-kerb>
  </road>

  <!-- Curva Del Serraglio -->
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>33.2</length>
    <radius>166.0</radius>
	<left-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</left-kerb>
	<elevation>[ 0.0, 4.1 ]</elevation>
  </road>

  <road segment="straight">
    <resolution>10.0</resolution>
    <length>589.1</length>
	<braking-marker>
	  <file>textures/50.png</file>
	  <distance>50.0</distance>
	  <side>right</side>
	</braking-marker>
	<braking-marker>
	  <file>textures/100.png</file>
	  <distance>100.0</distance>
	</braking-marker>
	<braking-marker>
	  <file>textures/150.png</file>
	  <distance>150.0</distance>
	</braking-marker>
	<right-kerb>
	  <start>
	    <distance>560.0</distance>
        <transition/>
	  </start>
	  <end><transition/></end>
	</right-kerb>
	<left-kerb>
	  <start>
	    <distance>560.0</distance>
        <transition/>
	  </start>
	</left-kerb>
	<elevation>[ 0.0, 4.4 ]</elevation>
	<elevation>[ 214.1, -0.3 ]</elevation>
	<elevation>[ 377.6, 0.9 ]</elevation>
  </road>

  <!-- Variante Ascari -->
  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>19.1</length>
    <radius>16.6</radius>
    <skew>-0.5</skew>
	<left-kerb>
	  <end><transition/></end>
	</left-kerb>
	<right-kerb>
	  <start>
	    <distance>10.0</distance>
        <transition/>
	  </start>
	</right-kerb>
	<elevation>[ 0.0, 2.4 ]</elevation>
  </road>

  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>124.5</length>
    <radius>-124.5</radius>
    <racing-line-adjustment>0.3</racing-line-adjustment>
    <skew>0.5</skew>
	<right-kerb/>
  </road>

  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>16.6</length>
    <radius>-41.5</radius>
    <skew>-0.5</skew>
	<right-kerb>
	  <end><transition/></end>
	</right-kerb>
  </road>

  <road segment="left turn">
    <resolution>10.0</resolution>
    <length>24.9</length>
	<left-kerb>
	  <start><transition/></start>
	</left-kerb>
  </road>

  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>17.2</length>
    <radius>17.0</radius>
    <skew>-0.5</skew>
	<left-kerb/>
  </road>

  <road segment="straight">
    <resolution>10.0</resolution>
    <length>1012.3</length>
    <racing-line-adjustment>-1.5</racing-line-adjustment>
	<braking-marker>
	  <file>textures/50.png</file>
	  <distance>50.0</distance>
	  <side>left</side>
	</braking-marker>
	<braking-marker>
	  <file>textures/100.png</file>
	  <distance>100.0</distance>
	</braking-marker>
	<braking-marker>
	  <file>textures/150.png</file>
	  <distance>150.0</distance>
	</braking-marker>
	<right-kerb>
	  <start><transition/></start>
	  <end>
	    <distance>150.0</distance>
	  </end>
	</right-kerb>
	<left-kerb>
	  <end>
	    <distance>100.0</distance>
	  </end>
	</left-kerb>
	<elevation>[ 0.0, 1.7 ]</elevation>
	<elevation>[ 103.3, 1.2 ]</elevation>
  </road>

  <!-- Curva Parabolica -->
  <road segment="right turn">
    <resolution>2.0</resolution>
    <length>41.5</length>
    <radius>-124.5</radius>
    <racing-line-adjustment>0.7</racing-line-adjustment>
	<right-kerb>
	  <start><transition/></start>
	</right-kerb>
	<elevation>[ 0.0, -3.5 ]</elevation>
  </road>

  <road segment="right turn">
    <resolution>2.0</resolution>
    <length>146.0</length>
    <radius>-83.0</radius>
    <racing-line-adjustment>0.7</racing-line-adjustment>
	<elevation>[ 0.0, -4.0 ]</elevation>
	<right-kerb>
	  <end><transition/></end>
	</right-kerb>
  </road>

  <road segment="right turn">
    <resolution>2.0</resolution>
    <length>290.4</length>
    <radius>-290.4</radius>
    <right-road-width>[ 248.9, 16.0 ]</right-road-width>
  </road>

  <road segment="straight">
    <resolution>10.0</resolution>
    <length>456.4</length>
	<elevation>[ 0.0, -3.3 ]</elevation>
  </road>


  <!-- Force the track to close -->
  <circuit segments="2"/>

  <track-length>5792</track-length>

  <!-- Define the timing sectors -->
  <timing-line>10.0</timing-line>
  <timing-line>2000.0</timing-line>
  <timing-line>4000.0</timing-line>
</track>
