@prefix :        <https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/DeskLamp.ttl#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema:  <http://schema.org/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix x3d:     <https://www.web3d.org/specifications/x3d-4.0.xsd#> .
@prefix x3do:    <https://www.web3d.org/specifications/X3dOntology4.0#> .

:X3D a owl:NamedIndividual, x3do:X3D ;
  x3do:hasHead :head ;
  x3do:hasScene :Scene ;
  x3do:profile 'Immersive' ;
  x3do:version '3.0' ;
  x3do:noNamespaceSchemaLocation 'https://www.web3d.org/specifications/x3d-3.0.xsd' .
:head a owl:NamedIndividual, x3do:head ;
  x3do:hasParent :X3D ;
  x3do:hasMeta :meta_1_1, :meta_1_2, :meta_1_3, :meta_1_4, :meta_1_5, :meta_1_6, :meta_1_7, :meta_1_8 .
:meta_1_1 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'DeskLamp.x3d' ;
  x3do:name 'title' .
:meta_1_2 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'A file decribing a desk lamp' ;
  x3do:name 'description' .
:meta_1_3 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'Frederic Roussille' ;
  x3do:name 'creator' .
:meta_1_4 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '1 April 2001' ;
  x3do:name 'created' .
:meta_1_5 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '20 October 2019' ;
  x3do:name 'modified' .
:meta_1_6 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/DeskLamp.x3d' ;
  x3do:name 'identifier' .
:meta_1_7 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content 'X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit' ;
  x3do:name 'generator' .
:meta_1_8 a owl:NamedIndividual, x3do:meta ;
  x3do:hasParent :head ;
  x3do:content '../license.html' ;
  x3do:name 'license' .
:meta dcterms:title "DeskLamp.x3d" .
:meta dcterms:description "A file decribing a desk lamp" .
:meta dcterms:creator "Frederic Roussille" .
:meta dcterms:created "1 April 2001" .
:meta dcterms:modified "20 October 2019" .
:meta dcterms:identifier "https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/DeskLamp.x3d" .
:meta dcterms:generator "X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit" .
:meta dcterms:license "../license.html" .
:Scene a owl:NamedIndividual, x3do:Scene ;
  x3do:hasParent :X3D ;
  x3do:hasChildren :WorldInfo_2_1, :Viewpoint_2_2, :Group_2_3 ;
  x3do:hasROUTE :ROUTE_2_4, :ROUTE_2_5, :ROUTE_2_6, :ROUTE_2_7, :ROUTE_2_8, :ROUTE_2_9, :ROUTE_2_10, :ROUTE_2_11, :ROUTE_2_12, :ROUTE_2_13, :ROUTE_2_14, :ROUTE_2_15, :ROUTE_2_16, :ROUTE_2_17 .
:WorldInfo_2_1 a owl:NamedIndividual, x3do:WorldInfo ;
  x3do:hasParent :Scene ;
  x3do:title 'DeskLamp.x3d' .
:Viewpoint_2_2 a owl:NamedIndividual, x3do:Viewpoint ;
  x3do:hasParent :Scene ;
  x3do:description 'DeskLamp' ;
  x3do:position ( 0 0.1 1 ) .
:Group_2_3 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :Scene ;
  x3do:hasChildren :movelamp, :lamp .
:movelamp a owl:NamedIndividual, x3do:PlaneSensor ;
  x3do:hasParent :Group_2_3 ;
  x3do:DEF 'movelamp' ;
  x3do:description 'click and drag to move lamp' .
:lamp a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Group_2_3 ;
  x3do:hasChildren :Shape_2_3_2_1, :Group_2_3_2_2, :Group_2_3_2_3 ;
  x3do:DEF 'lamp' .
:Shape_2_3_2_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :lamp ;
  x3do:hasAppearance :Appearance_2_3_2_1_1 ;
  x3do:hasGeometry :Cylinder_2_3_2_1_2 .
:Appearance_2_3_2_1_1 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_3_2_1 ;
  x3do:hasMaterial :color .
:color a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_3_2_1_1 ;
  x3do:DEF 'color' ;
  x3do:diffuseColor ( 0.8 0 0.6 ) .
:Cylinder_2_3_2_1_2 a owl:NamedIndividual, x3do:Cylinder ;
  x3do:hasParent :Shape_2_3_2_1 ;
  x3do:height 0.01 ;
  x3do:radius 0.1 .
:Group_2_3_2_2 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :lamp ;
  x3do:hasChildren :movefirstarm, :firstarm .
:movefirstarm a owl:NamedIndividual, x3do:SphereSensor ;
  x3do:hasParent :Group_2_3_2_2 ;
  x3do:DEF 'movefirstarm' ;
  x3do:description 'click and drag to move arm' ;
  x3do:offset ( 1 0 0 -3.58 ) .
:firstarm a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Group_2_3_2_2 ;
  x3do:hasChildren :lamparm, :Group_2_3_2_2_2_2 ;
  x3do:DEF 'firstarm' ;
  x3do:center ( 0 -0.15 0 ) ;
  x3do:rotation ( 1 0 0 -0.7 ) ;
  x3do:translation ( 0 0.15 0 ) .
:lamparm a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :firstarm ;
  x3do:hasAppearance :Appearance_2_3_2_2_2_1_1 ;
  x3do:hasGeometry :Cylinder_2_3_2_2_2_1_2 ;
  x3do:DEF 'lamparm' .
:Appearance_2_3_2_2_2_1_1 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :lamparm ;
  x3do:hasMaterial :color-USE-1 .
:color-USE-1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_3_2_2_2_1_1 ;
  owl:sameAs :color . # DEF matching this USE
:Cylinder_2_3_2_2_2_1_2 a owl:NamedIndividual, x3do:Cylinder ;
  x3do:hasParent :lamparm ;
  x3do:height 0.3 ;
  x3do:radius 0.01 .
:Group_2_3_2_2_2_2 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :firstarm ;
  x3do:hasChildren :movesecondarm, :secondarm .
:movesecondarm a owl:NamedIndividual, x3do:SphereSensor ;
  x3do:hasParent :Group_2_3_2_2_2_2 ;
  x3do:DEF 'movesecondarm' ;
  x3do:description 'click and drag to move arm' ;
  x3do:offset ( 1 0 0 -1.25 ) .
:secondarm a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Group_2_3_2_2_2_2 ;
  x3do:hasChildren :lamparm-USE-1, :Group_2_3_2_2_2_2_2_2 ;
  x3do:DEF 'secondarm' ;
  x3do:center ( 0 -0.15 0 ) ;
  x3do:rotation ( 1 0 0 1.9 ) ;
  x3do:translation ( 0 0.3 0 ) .
:lamparm-USE-1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :secondarm ;
  owl:sameAs :lamparm . # DEF matching this USE
:Group_2_3_2_2_2_2_2_2 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :secondarm ;
  x3do:hasChildren :movelampshade, :lampshade .
:movelampshade a owl:NamedIndividual, x3do:SphereSensor ;
  x3do:hasParent :Group_2_3_2_2_2_2_2_2 ;
  x3do:DEF 'movelampshade' ;
  x3do:description 'click and drag to move shade' ;
  x3do:offset ( 1 0 0 -1.25 ) .
:lampshade a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Group_2_3_2_2_2_2_2_2 ;
  x3do:hasChildren :Shape_2_3_2_2_2_2_2_2_2_1, :Transform_2_3_2_2_2_2_2_2_2_2 ;
  x3do:DEF 'lampshade' ;
  x3do:center ( 0 0.075 0 ) ;
  x3do:rotation ( 1 0 0 -1.25 ) ;
  x3do:translation ( 0 0.075 0 ) .
:Shape_2_3_2_2_2_2_2_2_2_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :lampshade ;
  x3do:hasAppearance :Appearance_2_3_2_2_2_2_2_2_2_1_1 ;
  x3do:hasGeometry :Cone_2_3_2_2_2_2_2_2_2_1_2 .
:Appearance_2_3_2_2_2_2_2_2_2_1_1 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_3_2_2_2_2_2_2_2_1 ;
  x3do:hasMaterial :color-USE-2 .
:color-USE-2 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_3_2_2_2_2_2_2_2_1_1 ;
  owl:sameAs :color . # DEF matching this USE
:Cone_2_3_2_2_2_2_2_2_2_1_2 a owl:NamedIndividual, x3do:Cone ;
  x3do:hasParent :Shape_2_3_2_2_2_2_2_2_2_1 ;
  x3do:bottom false ;
  x3do:bottomRadius 0.12 ;
  x3do:height 0.15 .
:Transform_2_3_2_2_2_2_2_2_2_2 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :lampshade ;
  x3do:hasChildren :Shape_2_3_2_2_2_2_2_2_2_2_1, :clock1, :colorpath1, :colorpath2, :clock2, :light ;
  x3do:translation ( 0 -0.05 0 ) .
:Shape_2_3_2_2_2_2_2_2_2_2_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :Transform_2_3_2_2_2_2_2_2_2_2 ;
  x3do:hasAppearance :Appearance_2_3_2_2_2_2_2_2_2_2_1_1 ;
  x3do:hasGeometry :Sphere_2_3_2_2_2_2_2_2_2_2_1_2 .
:Appearance_2_3_2_2_2_2_2_2_2_2_1_1 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_3_2_2_2_2_2_2_2_2_1 ;
  x3do:hasMaterial :color2 .
:color2 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_3_2_2_2_2_2_2_2_2_1_1 ;
  x3do:DEF 'color2' ;
  x3do:diffuseColor ( 0.4 0.4 0.4 ) .
:Sphere_2_3_2_2_2_2_2_2_2_2_1_2 a owl:NamedIndividual, x3do:Sphere ;
  x3do:hasParent :Shape_2_3_2_2_2_2_2_2_2_2_1 ;
  x3do:radius 0.05 .
:clock1 a owl:NamedIndividual, x3do:TimeSensor ;
  x3do:hasParent :Transform_2_3_2_2_2_2_2_2_2_2 ;
  x3do:DEF 'clock1' ;
  x3do:cycleInterval '0.5' .
:colorpath1 a owl:NamedIndividual, x3do:ColorInterpolator ;
  x3do:hasParent :Transform_2_3_2_2_2_2_2_2_2_2 ;
  x3do:DEF 'colorpath1' ;
  x3do:key ( 0 1 ) ;
  x3do:keyValue ( 0.4 0.4 0.4 1 1 0 ) .
:colorpath2 a owl:NamedIndividual, x3do:ColorInterpolator ;
  x3do:hasParent :Transform_2_3_2_2_2_2_2_2_2_2 ;
  x3do:DEF 'colorpath2' ;
  x3do:key ( 0 1 ) ;
  x3do:keyValue ( 1 1 0 0.4 0.4 0.4 ) .
:clock2 a owl:NamedIndividual, x3do:TimeSensor ;
  x3do:hasParent :Transform_2_3_2_2_2_2_2_2_2_2 ;
  x3do:DEF 'clock2' ;
  x3do:cycleInterval '0.5' .
:light a owl:NamedIndividual, x3do:SpotLight ;
  x3do:hasParent :Transform_2_3_2_2_2_2_2_2_2_2 ;
  x3do:DEF 'light' ;
  x3do:ambientIntensity .8 ;
  x3do:color ( 1 1 0 ) ;
  x3do:cutOffAngle .785398 ;
  x3do:direction ( 0 -1 0.7 ) ;
  x3do:on false ;
  x3do:radius 20 .
:Group_2_3_2_3 a owl:NamedIndividual, x3do:Group ;
  x3do:hasParent :lamp ;
  x3do:hasChildren :button1, :button2 .
:button1 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Group_2_3_2_3 ;
  x3do:hasChildren :Shape_2_3_2_3_1_1, :touch1, :code1 ;
  x3do:DEF 'button1' ;
  x3do:translation ( -0.02 0.015 0.05 ) .
:Shape_2_3_2_3_1_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :button1 ;
  x3do:hasAppearance :Appearance_2_3_2_3_1_1_1 ;
  x3do:hasGeometry :Cylinder_2_3_2_3_1_1_2 .
:Appearance_2_3_2_3_1_1_1 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_3_2_3_1_1 ;
  x3do:hasMaterial :Material_2_3_2_3_1_1_1_1 .
:Material_2_3_2_3_1_1_1_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_3_2_3_1_1_1 ;
  x3do:diffuseColor ( 1 0 0 ) .
:Cylinder_2_3_2_3_1_1_2 a owl:NamedIndividual, x3do:Cylinder ;
  x3do:hasParent :Shape_2_3_2_3_1_1 ;
  x3do:height 0.03 ;
  x3do:radius 0.01 .
:touch1 a owl:NamedIndividual, x3do:TouchSensor ;
  x3do:hasParent :button1 ;
  x3do:DEF 'touch1' ;
  x3do:description 'click to turn on' .
:code1 a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :button1 ;
  x3do:hasField :field_2_3_2_3_1_3_1, :field_2_3_2_3_1_3_2 ;
  x3do:DEF 'code1' ;
  x3do:sourceCode """
ecmascript:
function set_light() {
 value = true;
}
""" .
:field_2_3_2_3_1_3_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :code1 ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'value' ;
  x3do:type 'SFBool' .
:field_2_3_2_3_1_3_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :code1 ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_light' ;
  x3do:type 'SFTime' .
:button2 a owl:NamedIndividual, x3do:Transform ;
  x3do:hasParent :Group_2_3_2_3 ;
  x3do:hasChildren :Shape_2_3_2_3_2_1, :touch2, :code2 ;
  x3do:DEF 'button2' ;
  x3do:translation ( 0.02 0.015 0.05 ) .
:Shape_2_3_2_3_2_1 a owl:NamedIndividual, x3do:Shape ;
  x3do:hasParent :button2 ;
  x3do:hasAppearance :Appearance_2_3_2_3_2_1_1 ;
  x3do:hasGeometry :Cylinder_2_3_2_3_2_1_2 .
:Appearance_2_3_2_3_2_1_1 a owl:NamedIndividual, x3do:Appearance ;
  x3do:hasParent :Shape_2_3_2_3_2_1 ;
  x3do:hasMaterial :Material_2_3_2_3_2_1_1_1 .
:Material_2_3_2_3_2_1_1_1 a owl:NamedIndividual, x3do:Material ;
  x3do:hasParent :Appearance_2_3_2_3_2_1_1 ;
  x3do:diffuseColor ( 0 0 1 ) .
:Cylinder_2_3_2_3_2_1_2 a owl:NamedIndividual, x3do:Cylinder ;
  x3do:hasParent :Shape_2_3_2_3_2_1 ;
  x3do:height 0.03 ;
  x3do:radius 0.01 .
:touch2 a owl:NamedIndividual, x3do:TouchSensor ;
  x3do:hasParent :button2 ;
  x3do:DEF 'touch2' ;
  x3do:description 'click to turn off' .
:code2 a owl:NamedIndividual, x3do:Script ;
  x3do:hasParent :button2 ;
  x3do:hasField :field_2_3_2_3_2_3_1, :field_2_3_2_3_2_3_2 ;
  x3do:DEF 'code2' ;
  x3do:sourceCode """
ecmascript:
function set_light() {
 value = false;
}
""" .
:field_2_3_2_3_2_3_1 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :code2 ;
  x3do:accessType 'outputOnly' ;
  x3do:name 'value' ;
  x3do:type 'SFBool' .
:field_2_3_2_3_2_3_2 a owl:NamedIndividual, x3do:field ;
  x3do:hasParent :code2 ;
  x3do:accessType 'inputOnly' ;
  x3do:name 'set_light' ;
  x3do:type 'SFTime' .
:ROUTE_2_4 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'translation_changed' ;
  x3do:fromNode 'movelamp' ;
  x3do:toField 'set_translation' ;
  x3do:toNode 'lamp' .
:ROUTE_2_5 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'rotation_changed' ;
  x3do:fromNode 'movefirstarm' ;
  x3do:toField 'set_rotation' ;
  x3do:toNode 'firstarm' .
:ROUTE_2_6 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'rotation_changed' ;
  x3do:fromNode 'movesecondarm' ;
  x3do:toField 'set_rotation' ;
  x3do:toNode 'secondarm' .
:ROUTE_2_7 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'rotation_changed' ;
  x3do:fromNode 'movelampshade' ;
  x3do:toField 'set_rotation' ;
  x3do:toNode 'lampshade' .
:ROUTE_2_8 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'touchTime' ;
  x3do:fromNode 'touch1' ;
  x3do:toField 'set_startTime' ;
  x3do:toNode 'clock1' .
:ROUTE_2_9 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'fraction_changed' ;
  x3do:fromNode 'clock1' ;
  x3do:toField 'set_fraction' ;
  x3do:toNode 'colorpath1' .
:ROUTE_2_10 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'value_changed' ;
  x3do:fromNode 'colorpath1' ;
  x3do:toField 'set_emissiveColor' ;
  x3do:toNode 'color2' .
:ROUTE_2_11 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'touchTime' ;
  x3do:fromNode 'touch2' ;
  x3do:toField 'set_startTime' ;
  x3do:toNode 'clock2' .
:ROUTE_2_12 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'fraction_changed' ;
  x3do:fromNode 'clock2' ;
  x3do:toField 'set_fraction' ;
  x3do:toNode 'colorpath2' .
:ROUTE_2_13 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'value_changed' ;
  x3do:fromNode 'colorpath2' ;
  x3do:toField 'set_emissiveColor' ;
  x3do:toNode 'color2' .
:ROUTE_2_14 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'touchTime' ;
  x3do:fromNode 'touch1' ;
  x3do:toField 'set_light' ;
  x3do:toNode 'code1' .
:ROUTE_2_15 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'value' ;
  x3do:fromNode 'code1' ;
  x3do:toField 'set_on' ;
  x3do:toNode 'light' .
:ROUTE_2_16 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'touchTime' ;
  x3do:fromNode 'touch2' ;
  x3do:toField 'set_light' ;
  x3do:toNode 'code2' .
:ROUTE_2_17 a owl:NamedIndividual, x3do:ROUTE ;
  x3do:hasParent :Scene ;
  x3do:fromField 'value' ;
  x3do:fromNode 'code2' ;
  x3do:toField 'set_on' ;
  x3do:toNode 'light' .
