| @@ -0,0 +1,10 @@ | |||||
| <?xml version="1.0" encoding="utf-8"?> | |||||
| <!-- Generator: Adobe Illustrator 23.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> | |||||
| <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | |||||
| viewBox="0 0 195 195" style="enable-background:new 0 0 195 195;" xml:space="preserve"> | |||||
| <g> | |||||
| <circle cx="97.5" cy="97.5" r="97"/> | |||||
| <path d="M97.5,1C150.71,1,194,44.29,194,97.5S150.71,194,97.5,194S1,150.71,1,97.5S44.29,1,97.5,1 M97.5,0C43.65,0,0,43.65,0,97.5 | |||||
| S43.65,195,97.5,195S195,151.35,195,97.5S151.35,0,97.5,0L97.5,0z"/> | |||||
| </g> | |||||
| </svg> | |||||
| @@ -0,0 +1,40 @@ | |||||
| <?xml version="1.0" encoding="utf-8"?> | |||||
| <!-- Generator: Adobe Illustrator 23.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> | |||||
| <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | |||||
| viewBox="0 0 268.6 276.67" style="enable-background:new 0 0 268.6 276.67;" xml:space="preserve"> | |||||
| <style type="text/css"> | |||||
| .st0{enable-background:new ;} | |||||
| .st1{clip-path:url(#SVGID_2_);} | |||||
| </style> | |||||
| <g> | |||||
| <ellipse transform="matrix(0.9732 -0.2298 0.2298 0.9732 -28.1303 34.6673)" cx="134.81" cy="138.13" rx="97" ry="97"/> | |||||
| <path d="M134.81,41.63c53.21,0,96.5,43.29,96.5,96.5s-43.29,96.5-96.5,96.5s-96.5-43.29-96.5-96.5S81.6,41.63,134.81,41.63 | |||||
| M134.81,40.63c-53.85,0-97.5,43.65-97.5,97.5s43.65,97.5,97.5,97.5s97.5-43.65,97.5-97.5S188.65,40.63,134.81,40.63L134.81,40.63z | |||||
| "/> | |||||
| </g> | |||||
| <g> | |||||
| <g> | |||||
| <g class="st0"> | |||||
| <defs> | |||||
| <polygon id="SVGID_1_" class="st0" points="-49,314.67 91.33,58.47 318.6,-38 178.26,218.2 "/> | |||||
| </defs> | |||||
| <clipPath id="SVGID_2_"> | |||||
| <use xlink:href="#SVGID_1_" style="overflow:visible;"/> | |||||
| </clipPath> | |||||
| <g class="st1"> | |||||
| <g> | |||||
| <g> | |||||
| <g> | |||||
| <path d="M84.79,229.63c-21.63,9.18-36.77,8.32-42.62-2.43c-5.85-10.76-1.71-30.1,11.64-54.49 | |||||
| c13.36-24.38,34.34-50.89,59.08-74.62s50.28-41.87,71.91-51.05c21.63-9.18,36.77-8.32,42.62,2.43 | |||||
| c5.85,10.75,1.71,30.1-11.64,54.49c-13.36,24.39-34.34,50.89-59.08,74.63C131.96,202.32,106.42,220.45,84.79,229.63 | |||||
| M204.96,10.23C142.21,36.87,59.92,115.82,21.17,186.57c-38.75,70.75-19.3,106.51,43.46,79.87 | |||||
| c62.76-26.64,145.05-105.59,183.8-176.34C287.18,19.35,267.72-16.41,204.96,10.23"/> | |||||
| </g> | |||||
| </g> | |||||
| </g> | |||||
| </g> | |||||
| </g> | |||||
| </g> | |||||
| </g> | |||||
| </svg> | |||||
| @@ -31,6 +31,25 @@ function makeObject(name, viewInfo) { | |||||
| return makeEntity(name, "Object", views); | return makeEntity(name, "Object", views); | ||||
| } | } | ||||
| function makePlanet(name, diameter, mass, image) { | |||||
| return { | |||||
| name: name, | |||||
| constructor: () => makeObject( | |||||
| name, | |||||
| { | |||||
| body: { | |||||
| height: diameter, | |||||
| mass: mass, | |||||
| image: (image === undefined ? { | |||||
| source: "./media/objects/planet-generic.svg" | |||||
| } : image), | |||||
| name: "Body" | |||||
| } | |||||
| } | |||||
| ) | |||||
| }; | |||||
| } | |||||
| function makeObjects() { | function makeObjects() { | ||||
| const results = []; | const results = []; | ||||
| @@ -68,5 +87,16 @@ function makeObjects() { | |||||
| ) | ) | ||||
| }); | }); | ||||
| results.push(makePlanet("Mercury", math.unit(4879, "km"), math.unit(0.330e24, "kg"))); | |||||
| results.push(makePlanet("Venus", math.unit(12104, "km"), math.unit(4.87e24, "kg"))); | |||||
| results.push(makePlanet("Earth", math.unit(12756, "km"), math.unit(5.97e24, "kg"))); | |||||
| results.push(makePlanet("Moon", math.unit(3475, "km"), math.unit(0.073e24, "kg"))); | |||||
| results.push(makePlanet("Mars", math.unit(6792, "km"), math.unit(0.642e24, "kg"))); | |||||
| results.push(makePlanet("Jupiter", math.unit(142984, "km"), math.unit(1898e24, "kg"))); | |||||
| results.push(makePlanet("Saturn", math.unit(120536, "km"), math.unit(568e24, "kg"), {source: "./media/objects/saturn.svg"})); | |||||
| results.push(makePlanet("Uranus", math.unit(51118, "km"), math.unit(86.8e24, "kg"))); | |||||
| results.push(makePlanet("Neptune", math.unit(49528, "km"), math.unit(102e24, "kg"))); | |||||
| results.push(makePlanet("Pluto", math.unit(2370, "km"), math.unit(0.0146e24, "kg"))); | |||||
| return results; | return results; | ||||
| } | } | ||||