{ "X3D": {
    "encoding":"UTF-8",
    "@profile":"Immersive",
    "@version":"3.3",
    "@xsd:noNamespaceSchemaLocation":"https://www.web3d.org/specifications/x3d-3.3.xsd",
    "JSON schema":"https://www.web3d.org/specifications/x3d-4.0-JSONSchema.autogenerated.json",
    "head": {
        "meta": [
          {
            "@name":"title",
            "@content":"SpotLightVisualization.x3d"
          },
          {
            "@name":"description",
            "@content":"Create outline geometry to show SpotLight coverage. Author TODO: use the X3D-Edit SpotLight editor to modify and re-visualize the first SpotLight."
          },
          {
            "@name":"creator",
            "@content":"Don Brutzman"
          },
          {
            "@name":"created",
            "@content":"14 November 2009"
          },
          {
            "@name":"generated",
            "@content":"14 November 2009"
          },
          {
            "@name":"modified",
            "@content":"2 March 2026"
          },
          {
            "@name":"reference",
            "@content":"SpotLightVisualization.png"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter11LightingEnvironmentalEffects/SpotLightVisualization.x3d"
          },
          {
            "@name":"generator",
            "@content":"../Chapter09EventUtilitiesScripting/CircleLines.java"
          },
          {
            "@name":"license",
            "@content":"../license.html"
          },
          {
            "@name":"translated",
            "@content":"17 April 2026"
          },
          {
            "@name":"generator",
            "@content":"X3dToJson.xslt, https://www.web3d.org/x3d/stylesheets/X3dToJson.html"
          },
          {
            "@name":"reference",
            "@content":"X3D JSON encoding: https://www.web3d.org/wiki/index.php/X3D_JSON_Encoding"
          }
        ]
    },
    "Scene": {
        "-children":[
          { "WorldInfo":
            {
              "@title":"SpotLightVisualization.x3d"
            }
          },
          { "NavigationInfo":
            {
              "@headlight":false
            }
          },
          { "Background":
            {
              "@skyColor":[0.05,0.1,0.2]
            }
          },
          { "Viewpoint":
            {
              "@centerOfRotation":[0,0,-5],
              "@description":"Two examples of a single SpotLight",
              "@position":[0,0,15]
            }
          },
          { "Viewpoint":
            {
              "@centerOfRotation":[0,0,-5],
              "@description":"View from above",
              "@orientation":[1,0,0,-0.588],
              "@position":[0,10,10]
            }
          },
          { "Transform":
            {
              "@DEF":"RightSide",
              "@translation":[6,0,0],
              "-children":[
                {
                  "#comment":"Author TODO: use the X3D-Edit SpotLight editor to modify and re-visualize the first SpotLight"
                },
                { "SpotLight":
                  {
                    "@beamWidth":0.1745,
                    "@color":[0.8,0.8,0.2],
                    "@cutOffAngle":0.7837,
                    "@radius":10
                  }
                },
                { "Viewpoint":
                  {
                    "@description":"View from behind DirectionalLight",
                    "@orientation":[-0.8932,0.4488,0.0279,0.1389],
                    "@position":[0.5,1,8]
                  }
                },
                { "Inline":
                  {
                    "@DEF":"CoordinateAxes",
                    "@url":["../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d","https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d","https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.x3d","../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl","https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl","https://www.web3d.org/x3d/content/examples/Savage/Tools/Authoring/CoordinateAxes.wrl"]
                  }
                },
                { "Transform":
                  {
                    "@DEF":"PolygonalWall",
                    "@rotation":[1,0,0,1.57079],
                    "@translation":[-5,5,-5],
                    "-children":[
                      { "Shape":
                        {
                          "-geometry":
                            { "ElevationGrid":
                              {
                                "@height":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
                                "@solid":false,
                                "@xDimension":11,
                                "@zDimension":11
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@diffuseColor":[1,1,1]
                                    }
                                  }
                              }
                            }
                        }
                      }
                    ]
                  }
                }
              ]
            }
          },
          { "Transform":
            {
              "@DEF":"LeftSide",
              "@translation":[-6,0,0],
              "-children":[
                {
                  "#comment":"Watch out for global scope bugs if you copy a light by DEF/USE"
                },
                { "SpotLight":
                  {
                    "@beamWidth":0.1745,
                    "@color":[0.8,0.8,0.2],
                    "@cutOffAngle":0.7837,
                    "@radius":10
                  }
                },
                { "Viewpoint":
                  {
                    "@description":"View from behind SpotLight",
                    "@orientation":[-0.8932,0.4488,0.0279,0.1389],
                    "@position":[0.5,1,8]
                  }
                },
                { "Viewpoint":
                  {
                    "@description":"Side view of SpotLight outline",
                    "@orientation":[0,1,0,1.57079],
                    "@position":[12,0,-2.5]
                  }
                },
                { "Transform":
                  {
                    "@DEF":"BeamLines",
                    "@scale":[1,1,5],
                    "-children":[
                      {
                        "#comment":"CircleLines made out of 24 line segments, turned into a cone with 8 side lines"
                      },
                      { "Shape":
                        {
                          "-geometry":
                            { "IndexedLineSet":
                              {
                                "@coordIndex":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,-1,25,0,-1,25,3,-1,25,6,-1,25,9,-1,25,12,-1,25,15,-1,25,18,-1,25,21,-1],
                                "-coord":
                                  { "Coordinate":
                                    {
                                      "@point":[0,1,-1,0.259,0.966,-1,0.5,0.866,-1,0.707,0.707,-1,0.866,0.5,-1,0.966,0.259,-1,1,0,-1,0.966,-0.259,-1,0.866,-0.5,-1,0.707,-0.707,-1,0.5,-0.866,-1,0.259,-0.966,-1,0,-1,-1,-0.259,-0.966,-1,-0.5,-0.866,-1,-0.707,-0.707,-1,-0.866,-0.5,-1,-0.966,-0.259,-1,-1,-0,-1,-0.966,0.259,-1,-0.866,0.5,-1,-0.707,0.707,-1,-0.5,0.866,-1,-0.259,0.966,-1,0,1,-1,0,0,0,0,0,-1]
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                      "@emissiveColor":[0.8,0.8,0.2]
                                    }
                                  }
                              }
                            }
                        }
                      },
                      { "Shape":
                        {
                          "-geometry":
                            { "IndexedLineSet":
                              {
                                "@coordIndex":[0,1,-1],
                                "-coord":
                                  { "Coordinate":
                                    {
                                      "@point":[0,0,0,0,0,-1]
                                    }
                                  }
                              }
                            },
                          "-appearance":
                            { "Appearance":
                              {
                                "-material":
                                  { "Material":
                                    {
                                    }
                                  }
                              }
                            }
                        }
                      }
                    ]
                  }
                },
                { "Transform":
                  {
                    "@DEF":"CutOffCone",
                    "@scale":[5,5,5],
                    "-children":[
                      { "Transform":
                        {
                          "@rotation":[1,0,0,1.57079],
                          "@translation":[0,0,-0.5],
                          "-children":[
                            { "Shape":
                              {
                                "-geometry":
                                  { "Cone":
                                    {
                                      "@bottom":false,
                                      "@height":1
                                    }
                                  },
                                "-appearance":
                                  { "Appearance":
                                    {
                                      "-material":
                                        { "Material":
                                          {
                                            "@diffuseColor":[0,0,0],
                                            "@emissiveColor":[0.4,0.4,0.1],
                                            "@transparency":0.75
                                          }
                                        }
                                    }
                                  }
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                },
                { "Inline":
                  {
                    "@USE":"CoordinateAxes"
                  }
                },
                { "Transform":
                  {
                    "@USE":"PolygonalWall"
                  }
                }
              ]
            }
          }
        ]
    }
  }
}