{"id":6502,"date":"2023-07-21T20:31:49","date_gmt":"2023-07-21T20:31:49","guid":{"rendered":"https:\/\/dgen.net\/0\/?p=6502"},"modified":"2023-07-22T10:19:13","modified_gmt":"2023-07-22T10:19:13","slug":"ai-code-example-animated-planetary-orbit","status":"publish","type":"post","link":"https:\/\/dgen.net\/0\/2023\/07\/21\/ai-code-example-animated-planetary-orbit\/","title":{"rendered":"ai code example: animated planetary orbit"},"content":{"rendered":"\n<p class=\"has-cyan-bluish-gray-background-color has-background\" style=\"font-size:22px\">Today&#8217;s example of how easy AI can make it to write code. The <a href=\"\/w\/ai-orbit\/shadow.html\">interactive animation<\/a> below is the final output from various experiments below.<br>[My words have this colour background. My instructions to the AI are in bold. <br>The rest of the content on this page is the AI. All of it, including words, code and highlighting.] <\/p>\n\n\n\n<iframe loading=\"lazy\" src=\"https:\/\/dgen.net\/w\/ai-orbit\/shadow.html\" title=\"ai example\" width=\"100%\" height=\"600px\" border=\"0\"><\/iframe>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background\" style=\"font-size:22px\">To begin with I just asked it the following:<br><strong>write html, css and javascript to demonstrate a planet orbiting the sun<\/strong><br>It replied&#8230;<\/p>\n\n\n\n<p>Creating a realistic 3D planet orbiting the sun requires more advanced graphics and libraries, but I can show you a basic demonstration using HTML, CSS, and JavaScript that simulates a simple planet orbiting the sun<\/p>\n\n\n\n<p><strong>example.html<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n  &lt;meta charset=\"UTF-8\"&gt;\n  &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n  &lt;title&gt;Orbiting Planet&lt;\/title&gt;\n  &lt;link rel=\"stylesheet\" href=\"styles.css\"&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n  &lt;div class=\"sun\"&gt;&lt;\/div&gt;\n  &lt;div class=\"planet\"&gt;&lt;\/div&gt;\n  &lt;script src=\"script.js\"&gt;&lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/pre>\n\n\n\n<p><strong>CSS (styles.css):<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">body {\n  margin: 0;\n  padding: 0;\n  overflow: hidden;\n}\n\n.sun {\n  width: 100px;\n  height: 100px;\n  background-color: orange;\n  border-radius: 50%;\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n}\n\n.planet {\n  width: 30px;\n  height: 30px;\n  background-color: blue;\n  border-radius: 50%;\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n}<\/pre>\n\n\n\n<p><strong>JavaScript (script.js):<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">let angle = 0;\nconst orbitRadius = 150;\nconst orbitSpeed = 0.005;\n\nfunction animatePlanet() {\n  const planet = document.querySelector('.planet');\n  const sun = document.querySelector('.sun');\n  const sunRect = sun.getBoundingClientRect();\n  const centerX = sunRect.left + sunRect.width \/ 2;\n  const centerY = sunRect.top + sunRect.height \/ 2;\n\n  const x = centerX + orbitRadius * Math.cos(angle);\n  const y = centerY + orbitRadius * Math.sin(angle);\n\n  planet.style.left = x + 'px';\n  planet.style.top = y + 'px';\n\n  angle += orbitSpeed;\n  requestAnimationFrame(animatePlanet);\n}\n\nanimatePlanet();\n<\/pre>\n\n\n\n<p>This code creates a basic representation of a planet (blue circle) orbiting the sun (orange circle). It uses CSS to position and style the sun and the planet, and JavaScript to calculate the position of the planet as it orbits the sun.<\/p>\n\n\n\n<p>Please note that this is a simplified demonstration and does not include realistic physics or 3D graphics. For more advanced and realistic animations, you would need to use libraries like Three.js or other WebGL frameworks.&#8221;<\/p>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background\" style=\"font-size:22px\">This is pretty astonishing [<a href=\"https:\/\/dgen.net\/w\/ai-orbit\">output<\/a>]<\/p>\n\n\n\n<iframe loading=\"lazy\" src=\"https:\/\/dgen.net\/w\/ai-orbit\" title=\"ai example\" width=\"100%\" height=\"400px\" border=\"0\"><\/iframe>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background\" style=\"font-size:22px\">but I wasn&#8217;t happy with it being a circular orbit, so I asked it to: <br><strong>redo with an elliptical orbit<\/strong><\/p>\n\n\n\n<p>Creating an elliptical orbit requires more complex mathematical calculations and is beyond the scope of basic HTML, CSS, and JavaScript. However, I can show you an example using the p5.js library, which is a JavaScript library for creative coding and visualization. The p5.js library simplifies handling graphics and animation, making it easier to demonstrate an elliptical orbit.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>First, include the p5.js library in your HTML file:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n  &lt;meta charset=\"UTF-8\"&gt;\n  &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n  &lt;title&gt;Elliptical Orbit&lt;\/title&gt;\n  &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/p5.js\/1.4.0\/p5.js\"&gt;&lt;\/script&gt;\n  &lt;style&gt;\n    body {\n      margin: 0;\n      padding: 0;\n    }\n  &lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n  &lt;script src=\"sketch.js\"&gt;&lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>Next, create a JavaScript file (e.g., &#8220;sketch.js&#8221;) that will handle the animation and display of the elliptical orbit:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">let sun;\nlet planet;\nlet orbitRadiusX = 150;\nlet orbitRadiusY = 100;\nlet angle = 0;\nlet orbitSpeed = 0.01;\n\nfunction setup() {\n  createCanvas(windowWidth, windowHeight);\n  sun = createVector(width \/ 2, height \/ 2);\n  planet = createVector(sun.x + orbitRadiusX, sun.y);\n}\n\nfunction draw() {\n  background(240);\n\n  \/\/ Draw the sun\n  fill('orange');\n  ellipse(sun.x, sun.y, 40, 40);\n\n  \/\/ Calculate the position of the planet in the elliptical orbit\n  let x = sun.x + orbitRadiusX * cos(angle);\n  let y = sun.y + orbitRadiusY * sin(angle);\n\n  \/\/ Draw the planet\n  fill('blue');\n  ellipse(x, y, 20, 20);\n\n  \/\/ Update the angle for the next frame\n  angle += orbitSpeed;\n}<\/pre>\n\n\n\n<p>The above code sets up a canvas, defines the sun and planet as vectors, and uses trigonometry to calculate the position of the planet as it moves along an elliptical orbit around the sun. The <code>orbitRadiusX<\/code> and <code>orbitRadiusY<\/code> variables determine the shape and size of the elliptical orbit, while the <code>orbitSpeed<\/code> variable controls the speed of the orbit.<\/p>\n\n\n\n<p>Save these HTML and JavaScript files in the same folder and open the HTML file in a web browser. You should see an animation of a blue planet orbiting an orange sun in an elliptical path. Feel free to adjust the values of <code>orbitRadiusX<\/code>, <code>orbitRadiusY<\/code>, and <code>orbitSpeed<\/code> to experiment with different elliptical orbits.<\/p>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background\" style=\"font-size:22px\">This is a great example of how game-changing AI is becoming. To see the two bits of code (copy &amp; pasted) in action, click <a href=\"https:\/\/dgen.net\/w\/ai-orbit\">Circular<\/a> or <a href=\"https:\/\/dgen.net\/w\/ai-orbit\/ellipse.html\">Elliptical<\/a>. Remarkable.<\/p>\n\n\n\n<iframe loading=\"lazy\" src=\"https:\/\/dgen.net\/w\/ai-orbit\/ellipse.html\" title=\"ai example\" width=\"100%\" height=\"300px\"><\/iframe>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background has-medium-font-size\">And then my friend Andy noticed it wasn&#8217;t doing a Keplerian orbit, so <br><strong>redo with a keplerian orbit<\/strong><br>led to this<\/p>\n\n\n\n<p>Creating a Keplerian orbit involves implementing more complex mathematical formulas to simulate the motion of celestial bodies following Kepler&#8217;s laws of planetary motion. To do this, we&#8217;ll use the <code>p5.js<\/code> library to handle graphics and animation.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>First, include the p5.js library in your HTML file:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n  &lt;meta charset=\"UTF-8\"&gt;\n  &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n  &lt;title&gt;Keplerian Orbit&lt;\/title&gt;\n  &lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/p5.js\/1.4.0\/p5.js\"&gt;&lt;\/script&gt;\n  &lt;style&gt;\n    body {\n      margin: 0;\n      padding: 0;\n    }\n  &lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n  &lt;script src=\"sketch.js\"&gt;&lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>Next, create a JavaScript file (e.g., &#8220;sketch.js&#8221;) that will handle the animation and display of the Keplerian orbit:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">let sun;\nlet planet;\nlet a; \/\/ Semi-major axis\nlet b; \/\/ Semi-minor axis\nlet angle = 0;\nlet orbitSpeed = 0.01;\n\nfunction setup() {\n  createCanvas(windowWidth, windowHeight);\n  sun = createVector(width \/ 2, height \/ 2);\n  a = 150; \/\/ Set the semi-major axis\n  b = 100; \/\/ Set the semi-minor axis\n  planet = createVector(sun.x + a, sun.y);\n}\n\nfunction draw() {\n  background(240);\n\n  \/\/ Draw the sun\n  fill('orange');\n  ellipse(sun.x, sun.y, 40, 40);\n\n  \/\/ Calculate the position of the planet in the Keplerian orbit\n  let x = sun.x + a * cos(angle);\n  let y = sun.y + b * sin(angle);\n\n  \/\/ Draw the planet\n  fill('blue');\n  ellipse(x, y, 20, 20);\n\n  \/\/ Update the angle for the next frame\n  angle += orbitSpeed;\n}\n<\/pre>\n\n\n\n<p>The above code sets up a canvas, defines the sun and planet as vectors, and uses trigonometry to calculate the position of the planet following Kepler&#8217;s laws of planetary motion. The <code>a<\/code> and <code>b<\/code> variables determine the size and shape of the Keplerian orbit, while the <code>orbitSpeed<\/code> variable controls the speed of the orbit.<\/p>\n\n\n\n<p>Save these HTML and JavaScript files in the same folder and open the HTML file in a web browser. You should see an animation of a blue planet following a Keplerian orbit around an orange sun. Feel free to adjust the values of <code>a<\/code>, <code>b<\/code>, and <code>orbitSpeed<\/code> to experiment with different Keplerian orbits.<\/p>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background has-medium-font-size\"><a href=\"https:\/\/dgen.net\/w\/ai-orbit\/kepler.html\">Interesting<\/a> but still not quite there<\/p>\n\n\n\n<iframe loading=\"lazy\" src=\"https:\/\/dgen.net\/w\/ai-orbit\/kepler.html\" title=\"ai example\" width=\"100%\" height=\"300px\"><\/iframe>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background has-medium-font-size\">So let&#8217;s <br><strong>place the sun at a focus point and add gravity<\/strong><\/p>\n\n\n\n<p>To add gravity to the Keplerian orbit simulation, we can use Newton&#8217;s law of universal gravitation to calculate the gravitational force between the sun and the planet. The force will affect the acceleration of the planet, causing it to move in a curved path around the sun.<\/p>\n\n\n\n<p>Here&#8217;s the updated code that includes gravity:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">let sun;\nlet planet;\nlet a; \/\/ Semi-major axis\nlet b; \/\/ Semi-minor axis\nlet c; \/\/ Distance from the center to focus (c = sqrt(a^2 - b^2))\nlet angle = 0;\nlet orbitSpeed = 0.01;\nlet G = 0.5; \/\/ Gravitational constant\n\nfunction setup() {\n  createCanvas(windowWidth, windowHeight);\n  sun = createVector(width \/ 2, height \/ 2);\n  a = 150; \/\/ Set the semi-major axis\n  b = 100; \/\/ Set the semi-minor axis\n  c = sqrt(a * a - b * b);\n  planet = createVector(sun.x + c + a, sun.y);\n}\n\nfunction draw() {\n  background(240);\n\n  \/\/ Draw the sun at the focus point\n  fill('orange');\n  ellipse(sun.x, sun.y, 40, 40);\n\n  \/\/ Calculate the position of the planet in the Keplerian orbit\n  let x = sun.x + c + a * cos(angle);\n  let y = sun.y + b * sin(angle);\n\n  \/\/ Draw the planet\n  fill('blue');\n  ellipse(x, y, 20, 20);\n\n  \/\/ Calculate the distance between the planet and the sun\n  let distance = dist(x, y, sun.x, sun.y);\n\n  \/\/ Calculate the gravitational force between the planet and the sun\n  let force = G * (1 \/ (distance * distance));\n\n  \/\/ Calculate the angle of the force vector\n  let forceAngle = atan2(sun.y - y, sun.x - x);\n\n  \/\/ Calculate the acceleration of the planet due to gravity\n  let acceleration = force \/ 1; \/\/ We can simplify the mass of the planet as 1\n\n  \/\/ Update the planet's velocity based on the acceleration\n  orbitSpeed += acceleration;\n\n  \/\/ Update the angle for the next frame\n  angle += orbitSpeed;\n}\n\n<\/pre>\n\n\n\n<p>In this updated code, we introduce the gravitational constant <code>G<\/code> (you can adjust its value to control the strength of gravity) and calculate the gravitational force between the sun and the planet using Newton&#8217;s law of universal gravitation. The planet&#8217;s acceleration is then updated based on the gravitational force, and its velocity is adjusted accordingly. The result is a more realistic simulation of a Keplerian orbit with gravity affecting the motion of the planet around the sun.<\/p>\n\n\n\n<p>Save these HTML and JavaScript files in the same folder and open the HTML file in a web browser. You should now see an animation of a blue planet following a Keplerian orbit around an orange sun, with gravity affecting its movement. Feel free to experiment with different values of <code>G<\/code> and other parameters to observe different orbital behaviors.<\/p>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background has-medium-font-size\"><a href=\"https:\/\/dgen.net\/w\/ai-orbit\/kepler-gravity.html\">Very interesting<\/a>. It get&#8217;s it much more right, but there&#8217;s an acceleration that shouldn&#8217;t be there. The planet spins faster and faster&#8230; <\/p>\n\n\n\n<iframe loading=\"lazy\" src=\"https:\/\/dgen.net\/w\/ai-orbit\/kepler-gravity.html\" title=\"ai example\" width=\"100%\" height=\"320px\"><\/iframe>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background has-medium-font-size\">so, rather than try and troubleshoot it, let&#8217;s just ask it<br><strong>why does the speed of the planet accelerate?<\/strong><\/p>\n\n\n\n<p>Apologies for the confusion in the code. The speed of the planet should not accelerate as a result of gravitational force. In reality, the speed of a planet in a stable orbit around the sun remains constant.<\/p>\n\n\n\n<p>To accurately simulate a stable orbit, we need to use the principles of circular motion and centripetal force. The centripetal force acts perpendicular to the velocity vector, causing the planet to follow a circular path around the sun. In this scenario, the speed of the planet remains constant while its direction continuously changes.<\/p>\n\n\n\n<p>Let&#8217;s correct the code to achieve a stable circular orbit:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">let sun;\nlet planet;\nlet a; \/\/ Semi-major axis\nlet b; \/\/ Semi-minor axis\nlet c; \/\/ Distance from the center to focus (c = sqrt(a^2 - b^2))\nlet angle = 0;\nlet orbitSpeed = 0.01;\nlet G = 0.5; \/\/ Gravitational constant\n\nfunction setup() {\n  createCanvas(windowWidth, windowHeight);\n  sun = createVector(width \/ 2, height \/ 2);\n  a = 150; \/\/ Set the semi-major axis\n  b = 100; \/\/ Set the semi-minor axis\n  c = sqrt(a * a - b * b);\n  planet = createVector(sun.x + c + a, sun.y);\n}\n\nfunction draw() {\n  background(240);\n\n  \/\/ Draw the sun at the focus point\n  fill('orange');\n  ellipse(sun.x, sun.y, 40, 40);\n\n  \/\/ Calculate the position of the planet in the Keplerian orbit\n  let x = sun.x + c + a * cos(angle);\n  let y = sun.y + b * sin(angle);\n\n  \/\/ Draw the planet\n  fill('blue');\n  ellipse(x, y, 20, 20);\n\n  \/\/ Update the angle for the next frame\n  angle += orbitSpeed;\n}\n<\/pre>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background\">And, there we have it. We didn&#8217;t even need to understand why the planet was accelerating, or if there was a bug in the code, just ask a question and it corrected itself.<\/p>\n\n\n\n<iframe loading=\"lazy\" src=\"https:\/\/dgen.net\/w\/ai-orbit\/kepler-gravity2.html\" title=\"ai example\" width=\"100%\" height=\"300px\"><\/iframe>\n\n\n\n<p class=\"has-cyan-bluish-gray-background-color has-background has-medium-font-size\">I wanted to change the colours and layout a bit, so I asked it to do that too<br><strong>left-align the scene, make the sun yellow, the background black and the planet blue<\/strong><br>and then I thought it&#8217;d be fun if we made it interactive, so I asked <br><strong>add a slider so I can change the value of G and ensure that the animation updates automatically if the value is changed. put the slider at the top in the middle<br><\/strong>which it didn&#8217;t get right the first time (the slider moved but the planet speed didn&#8217;t change) so,<br><strong>that isn&#8217;t updating the value of G in the animation<br><\/strong>which fixed it, and then a final bit of fiddling<br><strong>print the value of G on the screen as well. align the slider so it&#8217;s just above the animation<\/strong><br><strong>move it 200px left. Keep the value of G next to the slider<br><\/strong>and so on, which resulted in the <a href=\"\/w\/ai-orbit\/example.html\">interactive example<\/a> at the top of this page<br><br>And, lastly, for fans of <a href=\"https:\/\/processing.org\/\">Processing<\/a>, simply asking it to <br><strong>rewrite this in Processing<br><\/strong>gave this working code<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">int sunX, sunY;\nfloat a; \/\/ Semi-major axis\nfloat b; \/\/ Semi-minor axis\nfloat c; \/\/ Distance from the center to focus (c = sqrt(a^2 - b^2))\nfloat angle = 0;\nfloat orbitSpeed = 0.01;\nfloat G = 0.5; \/\/ Gravitational constant\n\nvoid setup() {\n  size(800, 600);\n  sunX = width \/ 4;\n  sunY = height \/ 2;\n  a = 150; \/\/ Set the semi-major axis\n  b = 100; \/\/ Set the semi-minor axis\n  c = sqrt(a * a - b * b);\n}\n\nvoid draw() {\n  background(0); \/\/ Set background color to black\n\n  \/\/ Draw the sun at the focus point\n  fill(255, 255, 0); \/\/ Change sun color to yellow\n  ellipse(sunX, sunY, 40, 40);\n\n  \/\/ Calculate the position of the planet in the Keplerian orbit\n  float x = sunX + c + a * cos(angle);\n  float y = sunY + b * sin(angle);\n\n  \/\/ Draw the planet\n  fill(0, 0, 255); \/\/ Change planet color to blue\n  ellipse(x, y, 20, 20);\n\n  \/\/ Update the angle for the next frame based on the slider value\n  angle += G * orbitSpeed; \/\/ Use G to modify orbit speed\n\n  \/\/ Display the value of G next to the slider\n  fill(255);\n  textSize(20);\n  text(\"Gravitational Constant (G): \" + G, 20, 20);\n}\n\n\/\/ Event handler for the slider\nvoid mouseReleased() {\n  if (mouseX &gt;= 20 &amp;&amp; mouseX &lt;= 320 &amp;&amp; mouseY &gt;= 40 &amp;&amp; mouseY &lt;= 60) {\n    \/\/ Map the x-coordinate of the mouse to a value between 0 and 2 for G\n    G = map(mouseX, 20, 320, 0, 2);\n  }\n}\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Today&#8217;s example of how easy AI can make it to write code. The interactive animation below is the final output from various experiments below.[My words [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6509,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4,45,8,20,3],"tags":[],"class_list":["post-6502","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-astronomy","category-research","category-science","category-social-change","category-stuff"],"jetpack_featured_media_url":"https:\/\/dgen.net\/0\/wp-content\/uploads\/2023\/07\/Screenshot-2023-07-21-at-21.30.17.png","jetpack_shortlink":"https:\/\/wp.me\/pfJFK3-1GS","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/posts\/6502","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/comments?post=6502"}],"version-history":[{"count":39,"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/posts\/6502\/revisions"}],"predecessor-version":[{"id":6561,"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/posts\/6502\/revisions\/6561"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/media\/6509"}],"wp:attachment":[{"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/media?parent=6502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/categories?post=6502"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dgen.net\/0\/wp-json\/wp\/v2\/tags?post=6502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}