#X3D V3.3 utf8 PROFILE Immersive # [X3D] version=3.3 # [X3D] noNamespaceSchemaLocation=https://www.web3d.org/specifications/x3d-3.3.xsd # X3D-to-ClassicVRML XSL translation autogenerated by X3dToClassicVrmlEncoding.xslt and X3dToVrml97.xslt # https://www.web3d.org/x3d/content/X3dToClassicVrmlEncoding.xslt # https://www.web3d.org/x3d/content/X3dToVrml97.xslt # Transformation using XSLT processor: Saxonica # head META "title" "SideScanSonarExample.x3d" META "description" "Produce wireframe or transparent sidescan sonar beams." META "creator" "Don Brutzman" META "created" "15 March 2001" META "modified" "20 October 2019" META "reference" "https://savage.nps.edu/Savage/Robots/UnmannedUnderwaterVehicles/RemusSideScan.x3d" META "identifier" "https://savage.nps.edu/Savage/CommunicationsAndSensors/Sonar/SideScanSonarExample.x3d" META "generator" "X3D-Edit 3.3 https://savage.nps.edu/X3D-Edit" META "license" "../../license.html" # [Scene] ========== ========== ========== Background { skyColor [ 0.2 0.2 0.4 ] } WorldInfo { info [ "Produce wireframe or transparent beam cones" ] title "BeamConeExample" } Viewpoint { description "SideScanSonar example" orientation 0 1 0 -1.57 position -40 0 0 } EXTERNPROTO SideScanSonar [ # [appinfo] Produce wireframe or semi-transparent sonar sidescan beams inputOnly SFFloat altitude # [appinfo] vertical distance above bottom in meters along y axis initializeOnly SFFloat defaultAltitude # [appinfo] default vertical distance above bottom in meters along y axis initializeOnly SFFloat maxAltitude # [appinfo] maximum effective altitude of sidescan sonar above bottom initializeOnly SFFloat defaultCrossTrackHalfRange # [appinfo] distance in meters from nadir to rightmost/leftmost edge when operating at defaultAltitude above the bottom initializeOnly SFFloat defaultTrackWidthMeters # [appinfo] longitudinal width of a single return initializeOnly SFFloat vehicleWidthMeters # [appinfo] width (or diameter) of vehicle carrying port/starboard sidescan sonar transducers inputOnly SFBool contact # [appinfo] (communications) whether transmitted signal is in contact with receiver or (sensor) is a target return detected? initializeOnly SFBool wireframe # [appinfo] draw lines for tracking shape? initializeOnly SFBool solid # [appinfo] draw solid tracking shape? initializeOnly SFColor contactColor # [appinfo] rendering color when contact=true initializeOnly SFColor noContactColor # [appinfo] rendering color when contact=false inputOutput SFFloat transparency # [appinfo] 1 = fully transparent wireframe only ][ "../../../Savage/CommunicationsAndSensors/Sonar/SideScanSonarPrototype.x3d#SideScanSonar" "https://savage.nps.edu/Savage/CommunicationsAndSensors/Sonar/SideScanSonarPrototype.x3d#SideScanSonar" "../../../Savage/CommunicationsAndSensors/Sonar/SideScanSonarPrototype.wrl#SideScanSonar" "https://savage.nps.edu/Savage/CommunicationsAndSensors/Sonar/SideScanSonarPrototype.wrl#SideScanSonar" ] # Viewable geometry for this scene Group { children [ DEF SideScanSonarBeam SideScanSonar { defaultTrackWidthMeters 1 transparency 0.5 wireframe TRUE solid TRUE } Transform { translation 0 4 0 children [ Billboard { children [ Shape { appearance Appearance { material Material { diffuseColor .8 .8 0 } } geometry Text { string [ "touch text to activate contact-mode rendering" ] fontStyle FontStyle { justify [ "MIDDLE" "MIDDLE" ] size 2 } } } TouchSensor { description "Hover over text to activate contact mode" } Shape { # transparent Box as text-selection assist geometry Box { size 32 2 .001 } appearance Appearance { material Material { transparency 1 } } } ] } DEF TextTouch TouchSensor { description "touch text to toggle contact-mode rendering" } ] ROUTE TextTouch.isOver TO SideScanSonarBeam.contact } ] } DEF AnimationGroup Group { children [ DEF SonarClock TimeSensor { cycleInterval 10 loop TRUE } # note that this interpolator sets speed at (5m / 6sec) == 0.78 m/sec which is very very slow!! # this example is not physically realistic but it helps visualize the propagation of sound energy DEF RangeInterpolator ScalarInterpolator { key [ 0 .2 0.8 1 ] keyValue [ 0 0.01 5 5 ] } # ========== DEF TransparencyInterpolator ScalarInterpolator { key [ 0 .2 0.8 1 ] keyValue [ 0 0 1 1 ] } ] ROUTE SonarClock.fraction_changed TO RangeInterpolator.set_fraction ROUTE RangeInterpolator.value_changed TO SideScanSonarBeam.altitude ROUTE SonarClock.fraction_changed TO TransparencyInterpolator.set_fraction ROUTE TransparencyInterpolator.value_changed TO SideScanSonarBeam.transparency }