<?xml version="1.0"?>
<track name="Laguna Seca">

  <!-- Sky Box -->

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

  <!-- map-background>
    <image>../../Reference/Laguna Seca/Laguna_Seca-small.png</image>
    <offset>[ -94, -418 ]</offset>
    <size>[ 1200, 1200 ]</size>
  </map-background -->

  <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.03</bump-amplitude>
	<bump-wavelength>2.0</bump-wavelength>
	<texture>
	  <file>textures/grass2.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.375</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="paved">
    [ wall track kerb track kerb track rail ]
  </segment>
  <segment name="gravel">
    [ wall gravel kerb track kerb gravel rail ]
  </segment>
  <segment name="left turn">
    [ wall grass kerb track kerb gravel wall ]
  </segment>
  <segment name="right turn">
    [ wall gravel kerb track kerb grass rail ]
  </segment>

  <!-- The track -->
  <start-direction>-126.0</start-direction>

  <road segment="paved">
    <resolution>10.0</resolution>
    <length>10.0</length>
    <left-width>[ 0.0, 12.0 ]</left-width>
    <right-width>[ 0.0, 12.0 ]</right-width>
    <left-road-width>[ 0.0, 6.0 ]</left-road-width>
    <right-road-width>[ 0.0, 6.0 ]</right-road-width>
    <!-- left-width>[ 0.0, 2.0 ]</left-width>
    <right-width>[ 0.0, 2.0 ]</right-width>
    <left-road-width>[ 0.0, 1.0 ]</left-road-width>
    <right-road-width>[ 0.0, 1.0 ]</right-road-width -->
    <left-wall-height>1.1</left-wall-height>
    <right-wall-height>1.1</right-wall-height>
	<elevation>[ 5.0, 0.0 ]</elevation>
  </road>

  <road segment="paved">
    <resolution>2.0</resolution>
    <length>20.0</length>
	<radius>100.0</radius>
	<elevation>[ 0.0, 0.0 ]</elevation>
  </road>
  <road segment="paved">
    <resolution>2.0</resolution>
    <length>110.0</length>
	<elevation>[ 50.0, 3.0 ]</elevation>
  </road>

  <!-- 1 -->
  <road segment="paved">
    <resolution>2.0</resolution>
    <length>80.0</length>
	<radius>180.0</radius>
  </road>

  <road segment="paved">
    <resolution>10.0</resolution>
    <length>150.0</length>
	<braking-marker>
	  <file>textures/50.png</file>
	  <distance>50.0</distance>
	  <size>[ 1.4, 0.7 ]</size>
	  <offset>[ 2.0, 0.0 ]</offset>
	  <side>right</side>
	</braking-marker>
	<braking-marker>
	  <file>textures/100.png</file>
	  <distance>100.0</distance>
	</braking-marker>
	<elevation>[ 0.0, 2.0 ]</elevation>
  </road>

  <!-- Andretti Hairpin -->
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>132.0</length>
    <radius>39.0</radius>
	<left-kerb>
	  <start>
	    <transition>
		  <length>4.0</length>
		  <width>1.5</width>
		</transition>
	  </start>
	  <end>
	    <transition>
		  <length>4.0</length>
		  <width>1.5</width>
		</transition>
	  </end>
	  <profile>[ 0.5, 0.05 ][ 1.0, 0.05 ][ 1.5, 0.0 ]</profile>
	</left-kerb>
	<elevation>[ 0.0, -1.0 ]</elevation>
  </road>

  <road segment="straight">
    <resolution>10.0</resolution>
    <length>70.0</length>
	<elevation>[ 0.0, -4.0 ]</elevation>
  </road>
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>65.0</length>
	<radius>-145.0</radius>
	<right-kerb>
	  <start>
	    <transition>
		  <length>4.0</length>
		  <width>1.5</width>
		</transition>
	  </start>
	  <end>
	    <transition>
		  <length>4.0</length>
		  <width>1.5</width>
		</transition>
	  </end>
	  <profile>[ 0.5, 0.05 ][ 1.0, 0.05 ][ 1.5, 0.0 ]</profile>
	</right-kerb>
  </road>
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>50.0</length>
  </road>

  <!-- 3 -->
  <road segment="right turn">
    <resolution>2.0</resolution>
    <length>73.0</length>
    <radius>-45.0</radius>
	<elevation>[ 0.0, 0.0 ]</elevation>
	<right-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</right-kerb>
  </road>

  <road segment="right turn">
    <resolution>10.0</resolution>
    <length>178.0</length>
	<left-kerb>
	  <start><transition/></start>
	  <end>
	    <distance>80.0</distance>
	    <transition/>
	  </end>
	</left-kerb>
	<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>
  </road>

  <!-- 4 -->
  <road segment="right turn">
    <resolution>2.0</resolution>
    <length>74.</length>
    <radius>-60.0</radius>
	<right-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</right-kerb>
	<elevation>[ 0.0, 0.0 ]</elevation>
  </road>
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>115.0</length>
	<left-kerb>
	  <start><transition/></start>
	  <end>
	    <distance>80.0</distance>
	    <transition/>
	  </end>
	</left-kerb>
  </road>
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>74.0</length>
	<radius>-200.0</radius>
  </road>
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>200.0</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>
  </road>

  <!-- 5 -->
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>72.0</length>
    <radius>50.0</radius>
	<left-kerb>
	  <start><transition/></start>
	</left-kerb>
	<elevation>[ 0.0, -2.0 ]</elevation>
  </road>
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>58.0</length>
    <radius>100.0</radius>
	<left-kerb>
	  <end><transition/></end>
	</left-kerb>
  </road>
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>290.0</length>
	<right-kerb>
	  <start><transition/></start>
	  <end>
	    <distance>80.0</distance>
	    <transition/>
	  </end>
	</right-kerb>
	<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>
  </road>

  <!-- 6 -->
  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>28.0</length>
    <radius>30.0</radius>
	<left-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</left-kerb>
	<elevation>[ 0.0, 30.0 ]</elevation>
  </road>
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>55.0</length>
  </road>
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>90.0</length>
    <radius>200.0</radius>
  </road>
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>220.0</length>
	<elevation>[ 0.0, 30.0 ]</elevation>
	<right-kerb>
	  <start><transition/></start>
	  <end>
	    <distance>80.0</distance>
	    <transition/>
	  </end>
	</right-kerb>
	<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>
  </road>

  <!-- 7 -->
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>50.0</length>
	<radius>-180.0</radius>
	<elevation>[ 0.0, 40.0 ]</elevation>
  </road>
  <road segment="gravel">
    <resolution>2.0</resolution>
    <length>49.0</length>
  </road>

  <!-- Corkscrew - 8, 8a -->
  <road segment="gravel">
      <resolution>2.0</resolution>
    <length>35.0</length>
    <radius>19.0</radius>
	<left-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</left-kerb>
	<elevation>[ 0.0, 40.0 ]</elevation>
  </road>
  <road segment="gravel">
    <resolution>2.0</resolution>
    <length>5.0</length>
  </road>
  <road segment="gravel">
    <resolution>2.0</resolution>
    <length>38.0</length>
    <radius>-28.0</radius>
	<right-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</right-kerb>
	<elevation>[ 0.0, 35.0 ]</elevation>
  </road>
  <road segment="straight">
    <resolution>2.0</resolution>
    <length>50.0</length>
    <radius>-200.0</radius>
  </road>
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>40.0</length>
	<left-kerb>
	  <start><transition/></start>
	  <end>
	    <distance>80.0</distance>
	    <transition/>
	  </end>
	</left-kerb>
	<braking-marker>
	  <file>textures/50.png</file>
	  <distance>50.0</distance>
	  <side>right</side>
	</braking-marker>
  </road>

  <!-- Rainey -->
  <road segment="left turn">
	<elevation>[ 0.0, 30.0 ]</elevation>
    <resolution>2.0</resolution>
    <length>65.0</length>
    <radius>120.0</radius>
	<left-kerb>
	  <start><transition/></start>
	</left-kerb>
  </road>
  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>98.0</length>
    <radius>70.0</radius>
	<left-kerb>
	  <end><transition/></end>
	</left-kerb>
  </road>
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>160.0</length>
	<right-kerb>
	  <start><transition/></start>
	  <end>
	    <distance>80.0</distance>
	    <transition/>
	  </end>
	</right-kerb>
	<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>
  </road>

  <!-- 10 -->
  <road segment="right turn">
    <resolution>2.0</resolution>
    <length>64.0</length>
    <radius>-45.0</radius>
	<right-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</right-kerb>
  </road>
  <road segment="straight">
    <resolution>10.0</resolution>
    <length>225.0</length>
	<left-kerb>
	  <start><transition/></start>
	  <end>
	    <distance>80.0</distance>
	    <transition/>
	  </end>
	</left-kerb>
	<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>
  </road>

  <!-- 11 -->
  <road segment="left turn">
    <resolution>2.0</resolution>
    <length>37.0</length>
    <radius>18.0</radius>
	<left-kerb>
	  <start><transition/></start>
	  <end><transition/></end>
	</left-kerb>
  </road>
  <road segment="paved">
    <resolution>10.0</resolution>
    <length>300.0</length>
  </road>

  <!-- Force the track to close -->
  <circuit/>

  <!-- Define the timing sectors -->
  <timing-line>10.0</timing-line>
  <timing-line>1350.0</timing-line>
  <timing-line>3200.0</timing-line>

  <!-- Adjust the total length if necessary. -->
  <track-length>3600.0</track-length>
</track>
