From 1c7e0c133d368545a322c0a7af887aee29df8d45 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Tue, 29 Sep 2020 14:16:46 -0400 Subject: [PATCH] Add electromagnetic waves --- media/attribution.js | 1 + media/objects/sine-wave.svg | 81 +++++++++++++++++++++++++++++++++++++ presets/objects.js | 61 ++++++++++++++++++++++++++++ 3 files changed, 143 insertions(+) create mode 100644 media/objects/sine-wave.svg diff --git a/media/attribution.js b/media/attribution.js index ceaf120d..476b8687 100644 --- a/media/attribution.js +++ b/media/attribution.js @@ -12510,6 +12510,7 @@ const attributionData = { { name: "credit-card-vertical.svg", source: null }, { name: "flagpole.svg", source: null }, { name: "strand.svg", source: null }, + { name: "sine-wave.svg", source: null }, ], authors: [ "chemicalcrux" diff --git a/media/objects/sine-wave.svg b/media/objects/sine-wave.svg new file mode 100644 index 00000000..45902289 --- /dev/null +++ b/media/objects/sine-wave.svg @@ -0,0 +1,81 @@ + + + + + + +Produced by GNUPLOT 4.0 patchlevel 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/presets/objects.js b/presets/objects.js index 6d028561..1a6d90d2 100644 --- a/presets/objects.js +++ b/presets/objects.js @@ -654,6 +654,67 @@ function makeObjects() { "objects") }) + results.push({ + name: "Electromagnetic Waves", + constructor: () => { + views = {}; + + viewInfo = [ + ["Gamma rays", math.unit(1, "pm")], + ["Hard X-rays", math.unit(20, "pm")], + ["Soft X-rays", math.unit(1, "nm")], + ["Extreme-ultraviolet", math.unit(50, "nm")], + ["UVC", math.unit(200, "nm")], + ["UVB", math.unit(295, "nm")], + ["UVA", math.unit(350, "nm")], + ["Violet", math.unit(415, "nm")], + ["Blue", math.unit(470, "nm")], + ["Cyan", math.unit(490, "nm")], + ["Green", math.unit(530, "nm")], + ["Yellow", math.unit(580, "nm")], + ["Orange", math.unit(610, "nm")], + ["Red", math.unit(690, "nm")], + ["Near-infrared", math.unit(1.2, "um")], + ["Short-wavelength infrared", math.unit(2.2, "um")], + ["Mid-wavelength infrared", math.unit(6.5, "um")], + ["Long-wavelength infrared", math.unit(12, "um")], + ["Far infrared", math.unit(500, "um")], + ["D-band microwaves (mm-wave)", math.unit(2, "mm")], + ["S-band microwaves (ovens, wifi)", math.unit(11, "cm")], + ["L-band microwaves (GPS)", math.unit(22, "cm")], + ["UHF", math.unit(50, "cm")], + ["VHF", math.unit(5, "m")], + ["HF", math.unit(50, "m")], + ["MF", math.unit(500, "m")], + ["LF", math.unit(5, "km")], + ["VLF", math.unit(50, "km")], + ["ULF", math.unit(500, "km")], + ["SLF", math.unit(5000, "km")], + ["ELF", math.unit(50000, "km")], + ] + viewInfo.forEach(([name, length]) => { + views[name] = { + attributes: { + height: { + name: "Height", + power: 1, + type: "length", + base: math.multiply(length, 2) + } + }, + image: { + source: "./media/objects/sine-wave.svg" + }, + name: name, + rename: true, + default: name === "Green" + } + }); + + return makeEntity({ name: "Electromagnetic Waves" }, views); + } + }) + results.sort((b1, b2) => { e1 = b1.constructor();