<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel rdf:about="https://community.wolfram.com">
    <title>Community RSS Feed</title>
    <link>https://community.wolfram.com</link>
    <description>RSS Feed for Wolfram Community showing any discussions tagged with Astronomy sorted by most replies.</description>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/293403" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/763123" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/498246" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2222977" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3672762" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/463610" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2017849" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/440994" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1500089" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2040012" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/574455" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/3545275" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2740397" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/533151" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/462064" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1306910" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/251690" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2299843" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1207400" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1732567" />
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/293403">
    <title>Issues with AstronomicalData and SunPosition</title>
    <link>https://community.wolfram.com/groups/-/m/t/293403</link>
    <description>TL;DR
---
I have three issues with getting sun positions in Mathematica V10:

 - It is extremely slow compared to V9
 - It doesn&amp;#039;t *seem* to yield correct results
 - a) It needs an Internet connection, which b) is not assured to always return results and c) if not used optimally can easily consume your monthly allowance of W|A calls

Long story
===
With the advent of V10 `AstronomicalData` has been deprecated, as shown on its documentation page:
![enter image description here][1].

I&amp;#039;m not an astronomer, so my main use of this function has been restricted to its capability to get the sun position using functions calls like this:

    {
      AstronomicalData[&amp;#034;Sun&amp;#034;, {&amp;#034;Azimuth&amp;#034;, {2013, 3, 1, #, 0, 0}, {52.37`, 4.89`}}, TimeZone -&amp;gt; 1], 
      AstronomicalData[&amp;#034;Sun&amp;#034;, {&amp;#034;Altitude&amp;#034;, {2013, 3, 1, #, 0, 0}, {52.37`, 4.89`}},  TimeZone -&amp;gt; 1]
    } &amp;amp; /@ Range[0, 23]

&amp;gt; {{341.47732, -43.93930}, {2.33417, -45.21747}, {22.94232, -43.19133},
&amp;gt; {41.52167, -38.28400}, {57.55208, -31.30276}, {71.47253, -23.03159},
&amp;gt; {84.02194, -14.08294}, {95.91940, -4.92723}, {107.80166, 4.03418}, {120.23770, 12.40167}, {133.72303, 19.72563}, {148.59433, 
&amp;gt;   25.48377}, {164.84179, 29.12209}, {181.93103, 30.19428}, {198.91284,
&amp;gt;    28.55117}, {214.89602, 24.41962}, {229.46400, 
&amp;gt;   18.28613}, {242.70064, 10.70703}, {254.98998, 
&amp;gt;   2.19073}, {266.84760, -6.82566}, {278.85594, -15.94505},  {291.66723, -24.75464}, {306.00911, -32.75641}, {322.57956, 
&amp;gt; -39.29877}}

So, this gets me the sun positions in steps of an hour during a particular day in Amsterdam (TZ 1).

The same call still works in V10, though it now returns numbers with units; degrees in this case. On its first call, it reads some paclet information from a Wolfram server, but on any successive call no Internet connection is needed. I will be going into detail about timing further on, but I&amp;#039;ll say here that the V10 function takes about three times longer than its V9 namesake. I blame the addition of units for that.

With `AstronomicalData` apparently deprecated we are supposed to use its successors. In this case I need `SunPosition`. A direct translation of the above would be:

    SunPosition[GeoPosition[{52.37`, 4.89`}], DateObject[{2013, 3, 1, #, 0, 0}, TimeZone -&amp;gt; 1]] &amp;amp; /@ Range[0, 23]

&amp;gt; {{95.7, -5.1}, {107.6, 3.9}, {120.0, 12.3}, {133.5, 19.6}, {148.3, 25.4}, {164.5, 29.1}, {181.6, 30.2}, {198.6, 28.6}, {214.6, 24.5}, {229.2, 18.4}, {242.5, 10.9}, {254.8, 2.4}, {266.6, -6.7}, {278.6, -15.8}, {291.4, -24.6}, {305.7, 
-32.6}, {322.2, -39.2}, {341.3, -43.5}, {2.0, -44.8}, {22.5, -42.9}, 
{41.1, -38.0}, {57.1, -31.1}, {71.0, -22.9}, {83.6, -13.9}}

As with the new `AstronomicalData` the output is actually in degrees which I have removed in the above output for the sake of clarity. There are a few things to note:

 - `SunPosition` uses position and date objects, the latter being new in V10
 - `SunPosition` does not have a `TimeZone` option, but you can set it in `DateObject`
 - `SunPosition` can use the old lat/long list position indication. It also can use a date list to enter the date instead of a `DateObject`. In the latter case you are out of options with respect to time zones and you have to add the appropriate amount of time offset
 - It is extremely slow, and it may even time-out: 

![enter image description here][2]

 - Last but not least: the results seem to be plain wrong. It suggests that sunrise is somewhat before 1 am, which is -of course- incorrect. I assume that this has something to do with a `$GeoLocation` setting for the observer of the sun positions, but I haven&amp;#039;t managed to sort out what I am supposed to enter to get the correct sun positions for the location provided in the same call.

As to timing: I noticed very inconsistent timings for `SunPosition` compared to `AstronomicalData`, so I used the following code to collect a somewhat more statistical  sound sample:

    SetAttributes[timingTest, HoldFirst];
    timingTest[code_, repeats_Integer] :=
       Table[
          ClearSystemCache[];
          code // AbsoluteTiming // First,
          {repeats}
        ]

Using this, I collected timing of 20 calls to the following code snippets:

 - `AstronomicalData` V9 and V10: As above
 - `SunPosition`: As above
 - `SunPosition` without `GeoPosition`, just the lat/long list.
 - `SunPosition`  without `GeoPosition`, and also without the `DateObject` date, just a classical date list (with the hour set to +1 to accommodate TZ 1)
 - `SunPosition` V10 without `GeoPosition` and with the `Map` (`/@`) gone and replaced by a `DateRange` inside the call.

In the last case, the returned value is a `TimeSeries` object from which I extract the positions using the `&amp;#034;Paths&amp;#034;` method:

     SunPosition[{52.37`, 4.89`}, DateRange[{2013, 3, 1, 1, 0, 0}, {2013, 3, 1, 24, 0, 0}, &amp;#034;Hour&amp;#034;]][&amp;#034;Paths&amp;#034;][[1, All, 2]]

The results were as follows:

![enter image description here][3]

Clearly, the `SunPosition` results are very disappointing. Getting the sun positions with `SunPosition` is almost 40 times slower than using the old V9 method (which, I should add, wasn&amp;#039;t particularly quick either. I have an implementation in Mathematica code which is faster). The V10 implementation of `AstronomicalData` is also more than three times slower than the V9 version. The `DateRange` version of the call saves a lot of communication overhead. Still, it is almost *five times slower* than in V9.

The cause of all this slowness is that `SunPosition` simply does a call to Wolfram|Alpha. Sniffing the communication one sees the following string passed to the server:

    &amp;#034;1:eJxTTMoPSuNgYGAoZgESPpnFJcHcQEZwaV5AfnFmSWZ+XhoTsmxR/6GvGjH9wg4Qhr6XQxobsnzmXXYGhkxmIC+TEUSIgwggZihigIJgoAIGj/yizKr8PJigA5yBZtubwB1yrdxeDkXVIuvcH1aJOBRzAqUcS0vycxNLMpMBSAArww==&amp;#034;

which can be turned into readable form using `Uncompress`:

    {&amp;#034;SunPosition&amp;#034;, {4.89, 52.37}, {2013, 3, 1, 23, 0, 0.}, &amp;#034;Horizon&amp;#034;, 2., 2., {52.09, 5.12}, Automatic}

Here, we can recognize the lat/long of the position I used (but with lat/long reversed - Is this somehow significant?). At the end is my own `$GeoLocation`, but I don&amp;#039;t believe it is used at all (and it shouldn&amp;#039;t: I&amp;#039;m asking for the sun position over Amsterdam, not where I live). Changing it with `Block` I get the same results:

    Block[{$GeoLocation = GeoPosition[{52.37`, 40.89`}]}, SunPosition[{52.37`, 4.89`}, {2013, 3, 1, 1, 0, 0}]]

Apart from the slowness, there&amp;#039;s the issue of the necessary Internet connectivity (Want to give a demonstration and you don&amp;#039;t have Internet? Sorry, you&amp;#039;re out of luck). 

And what of the use of W|A calls? Each of the `SunPosition` tests (except the last one) took me 20 * 24 = 480 calls. So this part of my testing only already took 1440 calls, and one should be reminded that a typical Home Use license allows for only 3,000 calls per month. Things like this can go pretty fast. In fact, I once wrote an application that calculates the impact of building changes on shadows around your house throughout the year. It does in the order of 17,000 `AstronomicalData` calls. I couldn&amp;#039;t implement that naively using `SunPosition` and have it actually work. Clearly, one should now use the `DateRange` version of the call as much as possible.

----------

To wrap up: I have one real question, i.e., how to get `SunPosition` to return the same values as `AstronomicalData`, and a request to the WRI team: please put `SunPosition` in the kernel and don&amp;#039;t use W|A calls, because the situation as it is now is rather annoying and IMHO a real step backwards.

  [1]: /c/portal/getImageAttachment?filename=AstronomicalData.png&amp;amp;userId=43903
  [2]: /c/portal/getImageAttachment?filename=timeout.png&amp;amp;userId=43903
  [3]: /c/portal/getImageAttachment?filename=results.png&amp;amp;userId=43903</description>
    <dc:creator>Sjoerd de Vries</dc:creator>
    <dc:date>2014-07-13T16:39:48Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/763123">
    <title>How to build a loop for a convergence (centroid calculation)</title>
    <link>https://community.wolfram.com/groups/-/m/t/763123</link>
    <description>I would ask for some help to implement a code to be able to find the center of mass of an annular image of light projection from a fiber optics. The center of mass should be the point where it originates the average radius. On the other hand, the average radius ends at the point, inside the annulus, where the light intensity is maximum. &#xD;
Basically, an initial center is chosen (may be the center of the frame), then 18 sectors are built from that center to the larger circle of the annulus, which is contained in the frame. The fix for the assumed center is calculated as the sum of the average radius times the cosine (in x) and sine (for y) sectors around the circle. The center is shifted to there and the process repeated. In another words, the new coordinates obtained, original center plus delta x and delta y, must to shift the original center closer to the correct center of mass.  However the operation should be performed some times until convergence is complete or that the residual value is less than or equal to 1 pixel. This should probably happen after two or three interactions, depending of course the amount initially chosen for the original center. &#xD;
So far, the current code is able to find the value delta x and delta y to be added to the center originally preset. My difficulty is define a loop to redo the operation as many times as necessary. I would really appreciate some help to finish this code to obtain the final value of the center of mass coordinates.&#xD;
Thanks for any help...</description>
    <dc:creator>Antonio de Oliveira</dc:creator>
    <dc:date>2015-12-23T18:26:51Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/498246">
    <title>Dzhanibekov effect or tennis racket theorem</title>
    <link>https://community.wolfram.com/groups/-/m/t/498246</link>
    <description>![Animation showing movement of a rigid body according to Dzhanibekov effect or tennis racket theorem][1]&#xD;
&amp;amp;[Wolfram Notebook][2]&#xD;
&#xD;
&#xD;
  [1]: /c/portal/getImageAttachment?filename=fg546ukuhjfgvg5.gif&amp;amp;userId=11733&#xD;
  [2]: https://www.wolframcloud.com/obj/61fabce7-3d2f-4042-8e61-9fe54c4c353e</description>
    <dc:creator>Mariusz Iwaniuk</dc:creator>
    <dc:date>2015-05-18T11:39:33Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2222977">
    <title>Deep fields: pixel sorting Hubble images of deep space</title>
    <link>https://community.wolfram.com/groups/-/m/t/2222977</link>
    <description>&amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [Original]: https://www.wolframcloud.com/obj/8a8fbd01-b0d8-4798-beec-166e0898b2b1&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/5d2efdc4-f66c-486b-9f5a-298d70381d5d</description>
    <dc:creator>Jack Madden</dc:creator>
    <dc:date>2021-03-18T17:28:29Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3672762">
    <title>Artemis II trajectory: crewed lunar flyby to launch on April 1, 2026</title>
    <link>https://community.wolfram.com/groups/-/m/t/3672762</link>
    <description>![Artemis II trajectory: crewed lunar flyby to launch on April 1, 2026][1]&#xD;
&#xD;
&amp;amp;[Wolfram Notebook][2]&#xD;
&#xD;
  [ORIGINAL GIF]: https://community.wolfram.com//c/portal/getImageAttachment?filename=10956ArtemisIItrajectorycrewedlunarflybytolaunchonApril1,2026.gif&amp;amp;userId=20103&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=4398testing2-optimize.gif&amp;amp;userId=20103&#xD;
  [2]: https://www.wolframcloud.com/obj/1f4c613a-e72e-487b-9b5a-c75613d8a099</description>
    <dc:creator>Jeffrey Bryant</dc:creator>
    <dc:date>2026-03-31T21:27:57Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/463610">
    <title>From Ukraine: photo and map of the solar eclipse Mar 20, 2015</title>
    <link>https://community.wolfram.com/groups/-/m/t/463610</link>
    <description>&amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/2fb30490-e074-40c2-99f3-80634810ef4d</description>
    <dc:creator>Vitaliy Kaurov</dc:creator>
    <dc:date>2015-03-20T17:02:11Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2017849">
    <title>How black holes and accretion disks around them actually look</title>
    <link>https://community.wolfram.com/groups/-/m/t/2017849</link>
    <description>#Introduction&#xD;
&#xD;
One of the most thrilling parts in Nolan&amp;#039;s movie &amp;#034;Interstellar&amp;#034; is the black hole Gargantua and its accretion disk. Its weird shape has surely attracted lots of attention. But do black holes and their accretion disks actually look like that? Not exactly.&#xD;
&#xD;
![BH and accretion disk in Interstellar][1]&#xD;
&#xD;
In the paper &amp;#034;Gravitational lensing by spinning black holes in astrophysics, and in the movie Interstellar&amp;#034;, the authors say that in the movie, redshift and blueshift, as well as the intensity difference is ignored to prevent confusion to the audience. So, although the outline of the accretion disk in &amp;#034;Interstellar&amp;#034; is accurate, the color and the intensity are not. Furthermore, even in the paper, effects brought by the time delay in the propagation of light are ignored, and the influence of gravity lensing on light intensity is simplified.&#xD;
&#xD;
Though I cannot easily render a spinning black hole (Kerr black hole), what I can do is try to render an accretion disk around a Schwarzschild black hole, and as physically correct as possible. The result would be something like this (observer static at 6 times the Schwarzschild radius):&#xD;
&#xD;
![my rendering result, static observer][2]&#xD;
&#xD;
I strongly recommend you to see the videos at [Bilibili](https://www.bilibili.com/video/BV1Fp4y1S7EF) or [Youtube](https://www.youtube.com/watch?v=Dux1NkTaqwo) (Both have English subtitles) first to have a first impression, and it would be the best if you can click the vote up button XD. After that, If you would like to know more about the Mathematica realization and physical principles behind the scene, please continue.&#xD;
&#xD;
**A disclaimer first:** I know nothing about accretion disk physics, so the property of accretion disks are set arbitrarily. Furthermore, actual accretion disks are actually blazingly bright, and you would be blind instantly if you are looking at it from a short distance, so I have to make some modifications.&#xD;
&#xD;
#Analytics&#xD;
&#xD;
###Physics Perspective&#xD;
&#xD;
First, we need to analyze this problem from the physics perspective, get to know about the problems we should consider. **For observers**, the intensity of light is determined by how much photons reached their eye in a certain angle range, and the color is determined by the spectrum of the light. However, the orientation, spectrum, and intensity of light beams can be influenced by the observer&amp;#039;s movement, so we have to consider that. Naturally, the next question should be, where the light comes? Well, all the light must have come from some **light-emitting materials**, so we have to consider the light-emitting materials&amp;#039; property and movement. But the **light should travel** for some time and distance before reaching the observer&amp;#039;s eye. This process involves tracing the light from the emitter to the observer to determine the direction of light the observer perceived, as well as how much portion of light can reach the observer&amp;#039;s eyes. Till now, we have already listed out all effects, from the emission to the perception, which could influence our view, so I believe this rendering is &amp;#034;physically accurate&amp;#034;.&#xD;
&#xD;
&#xD;
### Programming Perspective&#xD;
&#xD;
But view from the programming perspective, the zeroth problem should be how lights travel around a black hole: we need the light path to calculate all other effects. Then, based on the light path, we can directly compute the equivalent of &amp;#034;brighter when closer&amp;#034; rule, as well as the time delay between light emission and observation. If combined with the movement of the light-emitting materials and the observer, we can compute the redshift and the blueshift. &#xD;
&#xD;
#Details, Theory, Coding and Results&#xD;
&#xD;
Now let&amp;#039;s assume that we are stationary observers viewing from 6 times the Schwarzchild radius.&#xD;
&#xD;
##Ray Tracing&#xD;
The first problem to solve is tracing the light beam. Light bends around black holes following the geodesics, and the most apparent consequence of this would be that the accretion disk we see would not be on a plane, but rather curved and bent. Fortunately for us, because Schwartzchild black holes are spherically symmetric, we can reduce the problem to 2D. The parametric equation of geodesics around a Schwarzschild black hole can be derived as follows:&#xD;
&#xD;
$$&#xD;
	\left\{&#xD;
	\begin{aligned}&#xD;
		t&amp;#039;&amp;#039;(\lambda)&amp;amp;=\frac{R_s r&amp;#039; t&amp;#039;}{R_s r-r^2}\\&#xD;
		r&amp;#039;&amp;#039;(\lambda)&amp;amp;=\frac{-R_s r^2 r&amp;#039;^2-2r^3\theta&amp;#039;^2(R_s-r)^2+R_s(R_s-r)^2t&amp;#039;^2}{2r^3(R_s-r)}\\&#xD;
		\theta&amp;#039;&amp;#039;(\lambda)&amp;amp;=-\frac{2r&amp;#039;\theta&amp;#039;}{r}&#xD;
	\end{aligned}&#xD;
	\right.&#xD;
$$&#xD;
&#xD;
&#xD;
Where $\lambda$ is the ray parameter.&#xD;
&#xD;
Now we construct a set of light which originates from the observer, and trace them backward:&#xD;
&#xD;
![Possible light paths][3]&#xD;
&#xD;
![Definition of variables][4]&#xD;
&#xD;
![How interpolation works][5]&#xD;
&#xD;
On each ray, we take some sample points and record the corresponding angle $\theta_0$, $\theta_1$, and time $\Delta T$. By interpolating them, we know about how a random object will look like in our eyes.&#xD;
&#xD;
    (*Initial definitions*)&#xD;
    Rs = 1;&#xD;
    R0 = 6 Rs;&#xD;
    Rmax = 6 Rs + 1.*^-6;&#xD;
    (*Tracking the light*)&#xD;
    parfunc = &#xD;
      ParametricNDSolveValue[{{tt&amp;#039;&amp;#039;[\[Tau]], &#xD;
          rr&amp;#039;&amp;#039;[\[Tau]], \[Theta]\[Theta]&amp;#039;&amp;#039;[\[Tau]]} == {(&#xD;
          Derivative[1][rr][\[Tau]] Derivative[1][tt][\[Tau]])/(&#xD;
          rr[\[Tau]] - rr[\[Tau]]^2), (&#xD;
           rr[\[Tau]]^2 Derivative[1][&#xD;
              rr][\[Tau]]^2 - (-1 + rr[\[Tau]])^2 Derivative[1][&#xD;
              tt][\[Tau]]^2)/(&#xD;
           2 (-1 + rr[\[Tau]]) rr[\[Tau]]^3) + (-1 + &#xD;
              rr[\[Tau]]) Derivative[1][\[Theta]\[Theta]][\[Tau]]^2, -((&#xD;
           2 Derivative[1][rr][\[Tau]] Derivative[&#xD;
             1][\[Theta]\[Theta]][\[Tau]])/rr[\[Tau]])}, {tt&amp;#039;[0], &#xD;
          rr&amp;#039;[0], \[Theta]\[Theta]&amp;#039;[&#xD;
           0]} == {1/(1 - Rs/R0), -Cos[\[Theta]0], &#xD;
          Sqrt[1/(1 - Rs/R0)]/R0 Sin[\[Theta]0]}, {tt[0], &#xD;
          rr[0], \[Theta]\[Theta][0]} == {0, R0, 0}, &#xD;
        WhenEvent[&#xD;
         1.01 Rs &amp;gt;= rr[\[Tau]] || &#xD;
          rr[\[Tau]] &amp;gt;= Rmax || \[Theta]\[Theta][\[Tau]] &amp;gt;= 3.1 Pi, &#xD;
         &amp;#034;StopIntegration&amp;#034;]}, {tt[\[Tau]], &#xD;
        rr[\[Tau]], \[Theta]\[Theta][\[Tau]]}, {\[Tau], 0, &#xD;
        1000}, {\[Theta]0}];&#xD;
    (*data used in interpolation*)&#xD;
    datp = Catenate@&#xD;
       Table[With[{pf = parfunc[\[Theta]]}, &#xD;
         With[{\[Tau]max = pf[[1, 0, 1, 1, 2]], df = D[Rest@pf, \[Tau]], &#xD;
           f = Rest@pf}, &#xD;
          Block[{\[Tau] = &#xD;
             Range[RandomReal[{0, \[Tau]max/500}], \[Tau]max, \[Tau]max/&#xD;
               500]}, Select[&#xD;
            Thread[(Thread@f -&amp;gt; &#xD;
               Thread@{\[Theta], &#xD;
                 ArcTan[-df[[1]], df[[2]] f[[1]] Sqrt[1 - Rs/f[[1]]]], &#xD;
                 pf[[1]]})], &#xD;
            2.4 Rs &amp;lt; #[[1, 1]] &amp;lt; 5.6 Rs &amp;amp;&amp;amp; -0.05 Pi &amp;lt; #[[1, 1]] &amp;lt; &#xD;
               3.08 Pi &amp;amp;]]]], {\[Theta], &#xD;
         Range[-2.5 Degree, 80 Degree, 1 Degree]~Join~&#xD;
          Range[20.2 Degree, 28.2 Degree, 0.5 Degree]~Join~&#xD;
          Range[23.025 Degree, 24.05 Degree, 0.05 Degree]~Join~&#xD;
          Range[23.2825 Degree, 23.4 Degree, 0.005 Degree]~Join~&#xD;
          Range[23.28525 Degree, 23.30025 Degree, 0.001 Degree]}];&#xD;
    datp = First /@ GatherBy[datp, Floor[#[[1]]/{0.01 Rs, 1 Degree}] &amp;amp;];&#xD;
    &#xD;
    (*Construct InterpolatingFunctions*)&#xD;
    ReceiveAngleFunction = &#xD;
      Interpolation[Thread[{datp[[;; , 1]], datp[[;; , 2, 1]]}], &#xD;
       InterpolationOrder -&amp;gt; 1];&#xD;
    EmitAngleFunction = &#xD;
     Interpolation[Thread[{datp[[;; , 1]], datp[[;; , 2, 2]]}], &#xD;
      InterpolationOrder -&amp;gt; 1];&#xD;
    DelayFunction = &#xD;
     Interpolation[Thread[{datp[[;; , 1]], datp[[;; , 2, 3]]}], &#xD;
      InterpolationOrder -&amp;gt; 1];&#xD;
    (*Angle vs time of observation*)&#xD;
    GenerateAngleFunctions[R1_, \[Theta]1_] := Block[{\[Phi]1},&#xD;
      With[{interpol = &#xD;
           Interpolation@&#xD;
            Table[{DelayFunction[R1, #] + &#xD;
               Sqrt[2 R1^3] \[Phi]1, \[Phi]1}, {\[Phi]1, 0., 2 Pi, &#xD;
              10. Degree}]},&#xD;
         With[{ts = interpol[[1, 1, 1]], tperiod = 2. Pi Sqrt[2 R1^3]}, &#xD;
          Function[t, interpol[t - Floor[t - ts, tperiod]]]]] &amp;amp; /@ ({#, &#xD;
           2 Pi - #, 2 Pi + #} &amp;amp;@ArcCos[Sin[\[Phi]1] Sin[\[Theta]1]])]&#xD;
&#xD;
If we only consider this effect, then we will have something like this:&#xD;
&#xD;
![Light bending included][6]&#xD;
&#xD;
The inner two rings correspond to the light that rotates around the black hole for more than half a round.&#xD;
&#xD;
And if we consider the propagation time of light, the right side will be a bit brighter.&#xD;
&#xD;
![Time correction included][7]&#xD;
&#xD;
This is because on the right, objects are moving away from you. So from your point of view, these particles will stay for a longer time on the right. (The reason is explained in the figure)&#xD;
&#xD;
![Illustration of how velocity influence timing][8]&#xD;
&#xD;
##&amp;#034;Brighter when Closer&amp;#034;&#xD;
The next question is about the &amp;#034;brighter when closer&amp;#034; rule. We all know that the further a bulb is, the dimmer it would appear to be. This is because the light from the bulb is approximately evenly distributed across solid angles, but as we move further, the solid angle corresponding to our eyes will be smaller. Mathematically, this is saying $I\propto S_0 \frac{d\Omega}{dS}$ where $S_0$ is the surface area of our eyes, $S$ is area, and $\Omega$ is the solid angle.&#xD;
&#xD;
![&amp;#034;Brighter when closer&amp;#034; rule in flat space][9]&#xD;
&#xD;
The same rules apply here in curved spacetime, except the light beams are weirder.&#xD;
&#xD;
![&amp;#034;Brighter when closer&amp;#034; rule in curved space][10]&#xD;
&#xD;
We know that $\frac{d\Omega}{dS}=(\frac{dx}{d\theta_x}\frac{dy}{d\theta_y})^{-1}$. While $\frac{dy}{d\theta_y}=\frac{R_0 \sin \alpha}{\sin \theta_1}$ can be derived using basic solid geometry, $\frac{dx}{d\theta_x}$ must be calculated numerically by tracing the light from the object to the observer. Similarly, we use interpolating function to generalize the result from a set of sample points to the whole space.&#xD;
&#xD;
    (*Reverse ray tracing*)&#xD;
    parfuncrev = &#xD;
      ParametricNDSolveValue[{{tt&amp;#039;&amp;#039;[\[Tau]], &#xD;
          rr&amp;#039;&amp;#039;[\[Tau]], \[Theta]\[Theta]&amp;#039;&amp;#039;[\[Tau]]} == {(&#xD;
          Derivative[1][rr][\[Tau]] Derivative[1][tt][\[Tau]])/(&#xD;
          rr[\[Tau]] - rr[\[Tau]]^2), (&#xD;
           rr[\[Tau]]^2 Derivative[1][&#xD;
              rr][\[Tau]]^2 - (-1 + rr[\[Tau]])^2 Derivative[1][&#xD;
              tt][\[Tau]]^2)/(&#xD;
           2 (-1 + rr[\[Tau]]) rr[\[Tau]]^3) + (-1 + &#xD;
              rr[\[Tau]]) Derivative[1][\[Theta]\[Theta]][\[Tau]]^2, -((&#xD;
           2 Derivative[1][rr][\[Tau]] Derivative[&#xD;
             1][\[Theta]\[Theta]][\[Tau]])/rr[\[Tau]])}, {tt&amp;#039;[0], &#xD;
          rr&amp;#039;[0], \[Theta]\[Theta]&amp;#039;[0]} == {1/(1 - Rs/R1), &#xD;
          Cos[\[Theta]0], -Sqrt[1/(1 - Rs/R1)]/R1 Sin[\[Theta]0]}, {tt[0],&#xD;
           rr[0], \[Theta]\[Theta][0]} == {0, R1, \[Theta]1}, &#xD;
        WhenEvent[\[Theta]\[Theta][\[Tau]] == 0, &#xD;
         &amp;#034;StopIntegration&amp;#034;]}, {tt[\[Tau]], &#xD;
        rr[\[Tau]], \[Theta]\[Theta][\[Tau]]}, {\[Tau], 0, &#xD;
        100}, {\[Theta]0, R1, \[Theta]1}];&#xD;
    (*data used in interpolation*)&#xD;
    \[CapitalDelta]\[Phi] = 1.*^-5;&#xD;
    intensity = &#xD;
      Catenate@Table[{{R, \[Theta]}, &#xD;
         R0^2 With[{\[Theta] = Abs[\[Theta]]}, &#xD;
           Abs[Sin[EmitAngleFunction[&#xD;
                R, \[Theta]]]/(R0 \&#xD;
    Sin[\[Theta]])]*(\[CapitalDelta]\[Phi]/(Sin[&#xD;
                 ReceiveAngleFunction[R, \[Theta]]]* &#xD;
                Subtract @@ (With[{f = &#xD;
                       parfuncrev[&#xD;
                        EmitAngleFunction[&#xD;
                        R, \[Theta]] + # \[CapitalDelta]\[Phi], &#xD;
                        R, \[Theta]][[2, 0]]}, f@f[[1, 1, -1]]] &amp;amp; /@ {-1, &#xD;
                    1})))]}, {R, 2.45 Rs, 5.55 Rs, &#xD;
         0.02 Rs}, {\[Theta], -3 Degree, 543 Degree, 2 Degree}];&#xD;
    &#xD;
    (*Construct InterpolatingFunction*)&#xD;
    IntensityFunction1 = Interpolation[intensity];&#xD;
&#xD;
![With intensity correction 1][11]&#xD;
&#xD;
The figure will be much more realistic in the aspect of intensity after we added this effect. The inner two rings are much dimmer because light bent dramatically is rare after all.&#xD;
&#xD;
##Doppler Effect and Headlight Effect&#xD;
Now its time for Doppler effect and headlight effect. These two effects are related to the movement of light-emitting objects and observers. Though the names of these effects can be forbidding, these effects are quite common in everyday life. Blueshift refers to the phenomenon that when a car is approaching you, the noise made by the car would be more acute and loud, and redshift means when the car is leaving you, the noise would quieter and be of lower frequency. &#xD;
&#xD;
![Doppler effect][12]&#xD;
&#xD;
The equation for the relativistic Doppler effect is:&#xD;
&#xD;
$$&#xD;
    f&amp;#039;=f\frac{\sqrt{1-\beta^2}}{1-\beta \cos \theta}&#xD;
$$&#xD;
&#xD;
where $\beta=\frac{v}{c}$ and $\theta$ is the angle between the velocity direction of the light-emitting object and the light emitted, as observed by an external observer. In this case, we should further add a coefficient of &#xD;
&#xD;
$$&#xD;
 f&amp;#039;&amp;#039;=f&amp;#039;\sqrt{\frac{1 - R_s/R_1}{1 - R_s/R_0}}&#xD;
$$&#xD;
&#xD;
due to general relativistic effects.&#xD;
&#xD;
Headlight effect means when you are driving a car on rainy days, no matter how the wind blows, the raindrops will always run towards the windshield. But if you stop your vehicle, you can see how the wind influences the dropping direction of rain.  &#xD;
&#xD;
![Headlight effect][13]&#xD;
&#xD;
The equation for angle transformation is:&#xD;
&#xD;
$$&#xD;
    \cos \theta&amp;#039;= \frac{\cos \theta +\beta}{1+\beta \cos \theta}&#xD;
$$&#xD;
&#xD;
and such, the intensity difference introduced by this can be written as:&#xD;
&#xD;
$$&#xD;
    \frac{dP&amp;#039;}{d\Omega}= \frac{dP}{d\Omega}\frac{\sin \theta}{\sin \theta&amp;#039;}\frac{d \theta}{d \theta&amp;#039;}=\frac{dP}{d\Omega}\frac{1 - \beta^2}{(1 -\beta \cos \theta)^2}&#xD;
$$&#xD;
&#xD;
Except for the difference in timing brought by the curved spacetime, these two effects are purely in the special relativity regime. The only thing involved in coding is tedious coordinate transformation. &#xD;
&#xD;
    (*Calculate moving speed*)&#xD;
    Calc\[Beta][{R1_, \[Theta]_, \[Phi]_}, {vr_, v\[Theta]_, v\[Phi]_}] :=&#xD;
      Sqrt[vr^2/(1 - &#xD;
           Rs/R1) + (R1 v\[Theta])^2 + (R1 Sin[\[Theta]] v\[Phi])^2]/&#xD;
      Sqrt[1 - Rs/R1]&#xD;
    (*Calculate inner product between moving direction and light direction*)&#xD;
    CalcCosAngle[{R1_, \[Theta]_, \[Phi]_}, {vr_, v\[Theta]_, v\[Phi]_}] :=&#xD;
      With[{v = {vr/Sqrt[1 - Rs/R1], R1 v\[Theta], &#xD;
         R1 Sin[\[Theta]] v\[Phi]}}, &#xD;
      MapThread[With[{\[Theta]0 = EmitAngleFunction[R1, #1]},&#xD;
         With[{vnormed = MapThread[Normalize@*List, v]}, &#xD;
          MapThread[&#xD;
           Dot, {vnormed, Thread@{Cos[\[Theta]0], #2 Sin[\[Theta]0], 0}}, &#xD;
           1]]] &amp;amp;, {{\[Theta], 2 Pi - \[Theta], 2 Pi + \[Theta]}, {-1, &#xD;
         1, -1}}]]&#xD;
    (*Frequency shift, Doppler effect + GR timing effects*)&#xD;
    FrequencyMult[R1_, \[Beta]_, cos_] := &#xD;
     Sqrt[(1 - Rs/R1)/(1 - Rs/R0)]*Sqrt[1 - \[Beta]^2]/(1 - \[Beta] cos)&#xD;
    (*Intensity shift due to headlight effect only*)&#xD;
    IntensityMult2[\[Beta]_, &#xD;
      cos_] := (Sqrt[1 - \[Beta]^2]/(1 - \[Beta] cos))^2&#xD;
&#xD;
Then we can put all these effects together and see how things works out!&#xD;
&#xD;
    &amp;lt;&amp;lt; PhysicalColor`&#xD;
    &#xD;
    IntensityFunctionScaling::usage = &amp;#034;Scale Intensity.&amp;#034;;&#xD;
    Protect@IntensityFunctionScaling;&#xD;
    &#xD;
    Options[RenderFunc] = {ColorFunction -&amp;gt; TemperatureColor, &#xD;
       ColorFunctionScaling -&amp;gt; (# &amp;amp;), IntensityFunctionScaling -&amp;gt; (# &amp;amp;), &#xD;
       &amp;#034;StaticObserver&amp;#034; -&amp;gt; True};&#xD;
    &#xD;
    RenderFunc[R1_, {\[Theta]1_, t1_, \[Gamma]1_}, {T0_, I0_}, &#xD;
      OptionsPattern[]] :=&#xD;
     Function[t, Through[#[t]]] &amp;amp;@Module[{&#xD;
        (*Velocity of observer*)&#xD;
        vobs = N@Sqrt[(1 - Rs/R0) Rs/(2 R0)],&#xD;
        (*list of \[Phi]1 parameters*)&#xD;
        \[Phi]1l = Range[0., 2 Pi, 1 Degree],&#xD;
        (*Polar coordinates \[Theta] and \[Phi]*)&#xD;
        \[Theta]l0, \[Phi]l0,&#xD;
        (*velocity of object and its norm*)&#xD;
        vrl, v\[Theta]l, v\[Phi]l, vnorml&#xD;
        },&#xD;
       (*Polar coordinate \[Theta]*)&#xD;
       \[Theta]l0 = ArcCos[Sin[\[Phi]1l] Sin[\[Theta]1]];&#xD;
       &#xD;
       (*Original \[Phi]*)&#xD;
       \[Phi]l0 = &#xD;
        ArcTan[Cos[\[Phi]1l], Sin[\[Phi]1l] Cos[\[Theta]1]] + \[Gamma]1;&#xD;
       &#xD;
       (*velocity of object*)&#xD;
       vrl = ConstantArray[0, Length@\[Phi]1l];&#xD;
       v\[Theta]l = -(Cos[\[Phi]1l] Sin[\[Theta]1])/&#xD;
          Sqrt[1 - Sin[\[Theta]1]^2 Sin[\[Phi]1l]^2]*Sqrt[Rs/(2 R1^3)];&#xD;
       v\[Phi]l = &#xD;
        1/(Cos[\[Phi]1l]^2/Cos[\[Theta]1] + &#xD;
            Cos[\[Theta]1] Sin[\[Phi]1l]^2)*Sqrt[Rs/(2 R1^3)];&#xD;
       &#xD;
       (*velocity norm*)&#xD;
       vnorml = &#xD;
        Calc\[Beta][{R1, \[Theta]l0, 0}, {vrl, v\[Theta]l, v\[Phi]l}];&#xD;
       &#xD;
       MapThread[Module[{&#xD;
           (*Observed \[Phi]1 parameter - t*)&#xD;
           \[Phi]1t = #3,&#xD;
           (*actual \[Theta] of object*)&#xD;
           \[Theta]l = #1,&#xD;
           (*angle between velocy and ray*)&#xD;
           cosl = #4,&#xD;
           (*Observed values - \[Phi]1*)&#xD;
           (*Geometry*)&#xD;
           \[Theta]obsl, \[Phi]obsl = \[Phi]l0 + #2,&#xD;
           (*Frequency and intensity shift*)&#xD;
           freqobsl, intobsl,&#xD;
           (*helper function*)&#xD;
           helpf&#xD;
           },&#xD;
          \[Theta]obsl = ReceiveAngleFunction[R1, \[Theta]l];&#xD;
          &#xD;
          (*Frequency*)&#xD;
          freqobsl = FrequencyMult[R1, vnorml, cosl];&#xD;
          &#xD;
          (*Process with the non-static observer*)&#xD;
          If[OptionValue[&amp;#034;StaticObserver&amp;#034;] =!= True,&#xD;
           Module[{\[Theta]transl, \[Phi]transl, \[Delta] = ArcSin[vobs]},&#xD;
            (*Geometrics, static frame*)&#xD;
            \[Theta]transl = ArcCos[Sin[\[Theta]obsl] Cos[\[Phi]obsl]];&#xD;
            \[Phi]transl = &#xD;
             ArcTan[Sin[\[Theta]obsl] Sin[\[Phi]obsl], Cos[\[Theta]obsl]];&#xD;
            (*Frequency shift due to movement of observer, &#xD;
            intensity shift is calculated together later*)&#xD;
            freqobsl *= (1 + vobs Cos[\[Theta]transl])/Sqrt[1 - vobs^2];&#xD;
            (*Angle shift due to movement of observer*)&#xD;
            \[Theta]transl = &#xD;
             ArcCos[(vobs + Cos[\[Theta]transl])/(1 + &#xD;
                 vobs Cos[\[Theta]transl])];&#xD;
            (*Transform back*)&#xD;
            (*Here we change the center of viewing angle so that the \&#xD;
    black hole&amp;#039;s center is at {0,0}*)&#xD;
            \[Theta]obsl = &#xD;
             ArcCos[Sin[\[Delta]] Cos[\[Theta]transl] + &#xD;
               Cos[\[Delta]] Sin[\[Theta]transl] Sin[\[Phi]transl]];&#xD;
            \[Phi]obsl = &#xD;
             ArcTan[Cos[\[Delta]] Cos[\[Theta]transl] - &#xD;
               Sin[\[Delta]] Sin[\[Theta]transl] Sin[\[Phi]transl], &#xD;
              Sin[\[Theta]transl] Cos[\[Phi]transl]]&#xD;
            ]&#xD;
           ];&#xD;
          &#xD;
          \[Phi]obsl = &#xD;
           Catenate[&#xD;
            MapIndexed[#1 + 2 Pi #2[[1]] &amp;amp;, Split[\[Phi]obsl, Less]]];&#xD;
          &#xD;
          (*Intensity*)&#xD;
          intobsl = &#xD;
           freqobsl^2*IntensityFunction1[R1, \[Theta]l]*&#xD;
            IntensityMult2[vnorml, cosl]*&#xD;
            TemperatureIntensity[freqobsl T0]/TemperatureIntensity[T0]/&#xD;
             freqobsl^4;&#xD;
          &#xD;
          (*Helper function to construct interpolating functions*)&#xD;
          helpf[l_] := Interpolation[Thread[{\[Phi]1l, l}]];&#xD;
          &#xD;
          With[{&#xD;
            cf = OptionValue[ColorFunction],&#xD;
            (*Interpolating functions*)&#xD;
            t11 = t1,&#xD;
            \[Phi]1f = #3,&#xD;
            \[Theta]func = helpf[\[Theta]obsl],&#xD;
            \[Phi]func = helpf[\[Phi]obsl],&#xD;
            freqfunc = &#xD;
             helpf[OptionValue[ColorFunctionScaling][T0 freqobsl]],&#xD;
            intfunc = &#xD;
             helpf[OptionValue[IntensityFunctionScaling][I0 intobsl]]&#xD;
            },&#xD;
            &#xD;
           (*Final function*)&#xD;
           Function[t,&#xD;
            With[{\[Phi]11 = \[Phi]1f[t + t11]},&#xD;
             {Append[cf[freqfunc[\[Phi]11]], intfunc[\[Phi]11]],&#xD;
              &#xD;
              With[{\[Theta] = \[Theta]func[\[Phi]11], \[Phi] = \&#xD;
    \[Phi]func[\[Phi]11]},&#xD;
               (*Point[{Sin[\[Theta]]Cos[\[Phi]],Sin[\[Theta]]Sin[\[Phi]],&#xD;
               Cos[\[Theta]]}]*)&#xD;
               Point[Tan[\[Theta]] {Cos[\[Phi]], Sin[\[Phi]]}]]}&#xD;
             ]]&#xD;
           ]&#xD;
          ] &amp;amp;, {{\[Theta]l0, 2 Pi - \[Theta]l0, 2 Pi + \[Theta]l0}, {0, &#xD;
          Pi, 0}, GenerateAngleFunctions[R1, \[Theta]1], &#xD;
         CalcCosAngle[{R1, \[Theta]l0, 0}, {vrl, v\[Theta]l, v\[Phi]l}]}]]&#xD;
    (*My version of rasterize, which increase color precision in dimmer areas*)&#xD;
    HDRRasterize[gr_Graphics, convertfunc_, &#xD;
      opts : OptionsPattern[Rasterize]] :=&#xD;
     Module[{rasterl = &#xD;
        Join[ColorSeparate[ColorConvert[Rasterize[gr, opts], &amp;#034;HSB&amp;#034;]], &#xD;
         ColorSeparate[&#xD;
          ColorConvert[&#xD;
           Rasterize[&#xD;
            gr /. RGBColor[r_, g_, b_, op_] :&amp;gt; RGBColor[r, g, b, 16 op], &#xD;
            opts], &amp;#034;HSB&amp;#034;]]], mask, invmask},&#xD;
      mask = Binarize[rasterl[[3]], 1/16];&#xD;
      invmask = 1 - mask;&#xD;
      ColorCombine[{&#xD;
        mask*rasterl[[1]] + invmask*rasterl[[4]],&#xD;
        mask*rasterl[[2]] + invmask*rasterl[[5]],&#xD;
        mask*convertfunc[rasterl[[3]]] + &#xD;
         invmask*convertfunc[rasterl[[6]]/16.]}, &amp;#034;HSB&amp;#034;]&#xD;
      ]&#xD;
    (*Preliminary computation*)&#xD;
    npts = 5000;&#xD;
    rflist = MapThread[&#xD;
       Function[{R1, \[Theta]1, t1, \[Gamma]1, T0, I0}, &#xD;
        RenderFunc[R1, {\[Theta]1, t1, \[Gamma]1}, {T0, I0}, &#xD;
         &amp;#034;StaticObserver&amp;#034; -&amp;gt; False(*,&#xD;
         IntensityFunctionScaling\[Rule](.7(#/.5)^0.5&amp;amp;)*)]],&#xD;
       {RandomReal[{3, 4.5}, npts],&#xD;
        RandomReal[-{83, 86} Degree, npts],&#xD;
        RandomReal[{0, 10000}, npts],&#xD;
        RandomReal[15 Degree + {-2, 2} Degree, npts],&#xD;
        RandomReal[{4000, 10000}, npts],&#xD;
        RandomReal[{.03, .1}, npts]&#xD;
        }&#xD;
       ];&#xD;
    (*rendering!!!*)&#xD;
    g = Graphics[{(*AbsolutePointSize@.1,White,Point[{Sin[20Degree]Cos[#],&#xD;
        Sin[20Degree]Sin[#],Cos[20Degree]}&amp;amp;/@Range[0.,360.Degree,&#xD;
        60.Degree]],*)AbsoluteThickness@2, &#xD;
        Map[Line[#[[;; , 2, 1]], &#xD;
           VertexColors -&amp;gt; &#xD;
            MapThread[&#xD;
             Function[{col, len, mult}, &#xD;
              MapAt[mult^2*#*0.006/len &amp;amp;, col, 4]], {#[[;; , 1]], &#xD;
              Prepend[#, #[[1]]] &amp;amp;@&#xD;
               BlockMap[Norm[#[[2]] - #[[1]]] &amp;amp;, #[[;; , 2, 1]], 2, 1], &#xD;
              Subdivide[Length[#] - 1]}]] &amp;amp;, &#xD;
         Reverse@Transpose[&#xD;
           Through[rflist[#]] &amp;amp; /@ (Range[0, 3, .1]), {3, 2, 1}], {2}]}, &#xD;
       Background -&amp;gt; Black, ImageSize -&amp;gt; {500, Automatic}, &#xD;
       PlotRange -&amp;gt; {{-1.28, 1.28}, {-0.72, 0.72}}];&#xD;
&#xD;
    HDRRasterize[g, #^(1/2.2) &amp;amp;, ImageSize -&amp;gt; {1920, 1080}]&#xD;
&#xD;
![With all effects, static observer][14]&#xD;
&#xD;
Well, because objects at left are moving towards you, they will appear much brighter and blue-ish, while objects at right are much dimmer and red-ish.&#xD;
&#xD;
We can also consider the movement of the observer, which will make the image something like this:&#xD;
&#xD;
![With all effects, observer moving][15]&#xD;
&#xD;
Hooray!&#xD;
&#xD;
The notebook can be found in the attachment or at [my github repo](https://github.com/wjxway/Realistic_Blackhole_Accretion_Disk).&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=bh10.png&amp;amp;userId=1340903&#xD;
  [2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=T_001.png&amp;amp;userId=1340903&#xD;
  [3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Path_4.png&amp;amp;userId=1340903&#xD;
  [4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=illus2.png&amp;amp;userId=1340903&#xD;
  [5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=illus1.png&amp;amp;userId=1340903&#xD;
  [6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=LightBending.png&amp;amp;userId=1340903&#xD;
  [7]: https://community.wolfram.com//c/portal/getImageAttachment?filename=WithTimeCorrection.png&amp;amp;userId=1340903&#xD;
  [8]: https://community.wolfram.com//c/portal/getImageAttachment?filename=illus3.png&amp;amp;userId=1340903&#xD;
  [9]: https://community.wolfram.com//c/portal/getImageAttachment?filename=IntensityIllus.png&amp;amp;userId=1340903&#xD;
  [10]: https://community.wolfram.com//c/portal/getImageAttachment?filename=illus4.png&amp;amp;userId=1340903&#xD;
  [11]: https://community.wolfram.com//c/portal/getImageAttachment?filename=WithIntensity1.png&amp;amp;userId=1340903&#xD;
  [12]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Doppler.jpg&amp;amp;userId=1340903&#xD;
  [13]: https://community.wolfram.com//c/portal/getImageAttachment?filename=FrontLight.jpg&amp;amp;userId=1340903&#xD;
  [14]: https://community.wolfram.com//c/portal/getImageAttachment?filename=WithAllEffects.png&amp;amp;userId=1340903&#xD;
  [15]: https://community.wolfram.com//c/portal/getImageAttachment?filename=WithObserverMoving.png&amp;amp;userId=1340903</description>
    <dc:creator>Jingxian Wang</dc:creator>
    <dc:date>2020-07-02T11:26:03Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/440994">
    <title>How to implement Raw libraries in order to manipulate raw images as .NEF ?</title>
    <link>https://community.wolfram.com/groups/-/m/t/440994</link>
    <description>Dear friends,&#xD;
&#xD;
I have a lot of Raw images in .NEF format (NIKKON). So, I read the section : [http://reference.wolfram.com/language/LibraryLink/tutorial/ImageProcessing.html][1]&#xD;
&#xD;
But I did not  understand how implement these libraries in order to work with .NEF extension images, for astrophotography.&#xD;
&#xD;
EDIT 1: a sample of image   *.NEF: [https://www.dropbox.com/s/2n5y5xjhhqeh7k0/DSC_5133.NEF?dl=0][2]&#xD;
&#xD;
&#xD;
  [1]: http://reference.wolfram.com/language/LibraryLink/tutorial/ImageProcessing.html&#xD;
  [2]: https://www.dropbox.com/s/2n5y5xjhhqeh7k0/DSC_5133.NEF?dl=0</description>
    <dc:creator>Marcelo De Cicco</dc:creator>
    <dc:date>2015-02-12T13:19:44Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1500089">
    <title>Simulate the motion of the Earth around the Sun based on Kepler&amp;#039;s Law?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1500089</link>
    <description>I am using Mathematica 10.3. I want fo perform a computational analysis of the motion of the Earth around the sun based on Keplers laws.&#xD;
Here is my code so far.&#xD;
&#xD;
    eulerStep[{t_, state_List}, h_, f_List] := {t + h, &#xD;
      state + h Through[f[{t, state}]]}&#xD;
    solveSystemEuler [{t0_state0 _}, h_, n_Integer, f_List] := &#xD;
     NestList[eulerStep[#, h, f] &amp;amp;, {t0, state0}, n]&#xD;
    midptStep[{t_, state_List}, h_, f_List] := {t + h, &#xD;
      state + h Through[&#xD;
         f[{t + 1/2 h, state + 1/2 h Through[f[{t, state}]]}]]}&#xD;
    solveSytemMidPt[{t0_, state0_}, h_, n_Integer, f_List] := &#xD;
     NestList[midptStep[#, h, f] &amp;amp;, {t0, state0}, n]&#xD;
    &#xD;
    L = 1/2 m (x&amp;#039;[t]^2 + y&amp;#039;[t]^2) + GMm/Sqrt[x[t]^2 + y[t]^2];&#xD;
    D[D[L, x&amp;#039;[t]], t] - D[L, x[t]] == 0&#xD;
    D[D[L, y&amp;#039;[t]], t] - D[L, y[t]] == 0&#xD;
    &#xD;
    xdot[{t_, {x_, vx_, y_, vy_}}] := vx&#xD;
    vxdot[{t_, {x_, vx_, y_, vy_}}] := -x/(x^2 + y^2)^(3/2)&#xD;
    ydot[{t_, {x_, vx_, y_, vy_}}] := vy&#xD;
    vydot[{t_, {x_, vx_, y_, vy_}}] := -y/(x^2 + y^2)^(3/2)&#xD;
    start = {1, 0, 0, 1};&#xD;
    fcns = {xdot, vxdot, ydot, vydot};&#xD;
    &#xD;
    orbit = solveSystemEuler[{0, start}, 0.01, 800, fcns];&#xD;
    &#xD;
    &amp;lt;&amp;lt; Statistics`DataManipulation`&#xD;
    xypts = Column[Column[orbit, 2], {1, 3}];&#xD;
    ListPlot[xypts, PlotJoined -&amp;gt; True];&#xD;
&#xD;
Running the program gave the following error messages. &#xD;
![enter image description here][1]&#xD;
&#xD;
Please help me to fix my code.&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Capture.JPG&amp;amp;userId=1499975</description>
    <dc:creator>Senlau Minto</dc:creator>
    <dc:date>2018-10-08T03:45:10Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2040012">
    <title>[Solved] Making a function from data by interpolation</title>
    <link>https://community.wolfram.com/groups/-/m/t/2040012</link>
    <description>I Have two set of data separately, which one of them is pressure and the other one is energy density.(P: pressure, E: energy density) I want to use these data as a function, P(E) or E(P) by utilizing an Interpolation between them. Could you please help me that how I can make a function of these data?&#xD;
&#xD;
For instance in Matlab I wrote the codes below and they work well.&#xD;
&#xD;
E=interp1(Data(:,2),Data(:,1),P);&#xD;
&#xD;
P=interp1(Data(:,1),Data(:,2),E);&#xD;
&#xD;
Regarding the codes in Matlab, I have a Matrix named Data which the first column is related to energy density and the second column is for pressure.&#xD;
&#xD;
In fact, by the codes above in Matlab, I could give an arbitrary pressure and then the result is the corresponding energy density or vice versa.&#xD;
&#xD;
 For my Mathematica code, I separated the columns of the matrix mentioned above into two data as two Excel files. Then these two files were imported in the notebook in order to make an interpolation between them to utilize it as a function. Indeed the interpolation between energy density and pressure could work like a function which gives pressure in terms of energy density or vice versa.&#xD;
&#xD;
My question is that how I can write such a code in Mathematica.</description>
    <dc:creator>Davood Rafiei</dc:creator>
    <dc:date>2020-07-19T13:13:11Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/574455">
    <title>Intensity radial profile in circular images</title>
    <link>https://community.wolfram.com/groups/-/m/t/574455</link>
    <description>Please find attached a small routine that plots the intensity profile between two points in a circular image. I&amp;#039;d like a routine that was able to make several radial routes, such as the example, from the center of the image to its exterior. Perhaps with an adjustable angular variation.&#xD;
I am very grateful for any help.&#xD;
&#xD;
Antonio&#xD;
&#xD;
![enter image description here][1]&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=sdf34546ygrwefads.png&amp;amp;userId=11733</description>
    <dc:creator>Antonio de Oliveira</dc:creator>
    <dc:date>2015-10-02T19:52:07Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/3545275">
    <title>Bloom pattern for flat-foldable origami orbital solar sail or solar shield</title>
    <link>https://community.wolfram.com/groups/-/m/t/3545275</link>
    <description>![Bloom pattern for flat-foldable origami orbital solar sail or solar shield][1]&#xD;
&#xD;
&amp;amp;[Wolfram Notebook][2]&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=8711FoldingPanel1.gif&amp;amp;userId=20103&#xD;
  [2]: https://www.wolframcloud.com/obj/d629766d-966c-4dcb-8880-894747e31c6d</description>
    <dc:creator>Gilmer Gary</dc:creator>
    <dc:date>2025-09-14T03:12:52Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2740397">
    <title>What is the winter solstice?</title>
    <link>https://community.wolfram.com/groups/-/m/t/2740397</link>
    <description>&amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/2d627ca1-036a-4d6e-afaa-bd73bd641674</description>
    <dc:creator>Jose Martin-Garcia</dc:creator>
    <dc:date>2022-12-21T15:37:36Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/533151">
    <title>Need serious help with lists!</title>
    <link>https://community.wolfram.com/groups/-/m/t/533151</link>
    <description>Here is my code:&#xD;
&#xD;
(* Take inputs for ECEF *) x = Input[&amp;#034;What is the x coordinate?&amp;#034;]; y = Input[&amp;#034;What is the y coordinate?&amp;#034;]; z = Input[&amp;#034;What is the z coordinate?&amp;#034;];&#xD;
&#xD;
(* Put in Coordinate Form *) GeoPositionXYZ[{x, y, z}, &amp;#034;ITRF00&amp;#034;];&#xD;
&#xD;
(* Convert to LLA *) GeoPosition[%]&#xD;
&#xD;
(* Display Map *) GeoGraphics[GeoMarker[GeoPosition[%]],GeoRange -&amp;gt; &amp;#034;World&amp;#034;, GeoProjection -&amp;gt; &amp;#034;Robinson&amp;#034;]&#xD;
&#xD;
It lets me input coordinates for one point in ECEF, then converts it to latitude/longitude/height and shows it on a map.&#xD;
&#xD;
I want to keep showing the 2d map... but I also want to show a 3d globe that locates the coordinates on the 3d cartesian plane also.&#xD;
I need to be able to put in more than one coordinate. It needs to keep asking for more x&amp;#039;s, more y&amp;#039;s, more z&amp;#039;s... until I stop inputting them. Eventually it&amp;#039;s going to be modified to pull them out of a text file, but for now these two changes need to be made. Any ideas/hints/help/guidance is appreciated. Thanks.</description>
    <dc:creator>Nathan Lundholm</dc:creator>
    <dc:date>2015-07-20T07:16:28Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/462064">
    <title>Mapping Total Solar Eclipse on March 20 2015</title>
    <link>https://community.wolfram.com/groups/-/m/t/462064</link>
    <description>&amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/dae2b70e-000e-4df5-968f-a9ae0f563eae</description>
    <dc:creator>Jeffrey Bryant</dc:creator>
    <dc:date>2015-03-18T19:34:05Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1306910">
    <title>Saturn Flyby: Detailed Simulation</title>
    <link>https://community.wolfram.com/groups/-/m/t/1306910</link>
    <description>![Saturn Flyby: Detailed Simulation][1]&#xD;
&#xD;
Creating a flyby simulation of a planetary scene in 3D involves multiple steps. This post walks you through the steps used to create the [final animation][2] (click this link or image below to play). I strongly recommend you watch the video in **full screen mode** with low lights so that all of the detail is visible. Some of it is subtle.&#xD;
&#xD;
[![enter image description here][3]][4]&#xD;
&#xD;
The Vimeo video hosting service has a habit of auto-advancing to the next video, but what it chooses as the next one is often strange in my opinion, so be prepared to click the back button to replay it. &#xD;
&#xD;
**Creating the Planet**&#xD;
&#xD;
Saturn can be treated as an oblate spheroid which we can model in the Wolfram Language using [ParametricPlot3D][5] and textures. [EntityValue][6] can give us a few pointers to get things scaled properly. First, we need to know the equatorial radius of the planet and its oblateness (e.g. how flattened it is at the poles compared to the equator).&#xD;
&#xD;
    saturnradius = &#xD;
      QuantityMagnitude[Entity[&amp;#034;Planet&amp;#034;, &amp;#034;Saturn&amp;#034;][&amp;#034;EquatorialRadius&amp;#034;], &#xD;
       &amp;#034;Kilometers&amp;#034;];&#xD;
    &#xD;
    saturnoblateness = Entity[&amp;#034;Planet&amp;#034;, &amp;#034;Saturn&amp;#034;][&amp;#034;Oblateness&amp;#034;];&#xD;
    &#xD;
    texture = &#xD;
      ImageReflect[EntityValue[Entity[&amp;#034;Planet&amp;#034;, &amp;#034;Saturn&amp;#034;], &#xD;
       &amp;#034;CylindricalEquidistantTexture&amp;#034;], Bottom];&#xD;
&#xD;
With the data above, we can construct a ParametericPlot3D of an oblate spheroid scaled to the dimensions of Saturn. We use the curated data from above to perform the scaling.&#xD;
&#xD;
    planet = ParametricPlot3D[{saturnradius Cos[t] Sin[p], &#xD;
       saturnradius Sin[t] Sin[&#xD;
         p], (1 - saturnoblateness) saturnradius Cos[p]}, {t, 0, &#xD;
       2 Pi}, {p, 0, \[Pi]}, Mesh -&amp;gt; None, PlotStyle -&amp;gt; Texture[texture], &#xD;
      Lighting -&amp;gt; &amp;#034;Neutral&amp;#034;, Boxed -&amp;gt; False, Axes -&amp;gt; False, &#xD;
      PlotPoints -&amp;gt; 100]&#xD;
&#xD;
![enter image description here][7]&#xD;
&#xD;
**Creating the Rings**&#xD;
&#xD;
The rings of Saturn lie along a plane and can be modeled as an annulus with radial color and opacity variation. We make use of a texture obtained from https://www.classe.cornell.edu/~seb/celestia/hutchison/saturn-rings.png and stored as a [CloudObject][8] in the Wolfram Cloud and use ParametricPlot3D to apply this color and opacity texture to the annulus.&#xD;
&#xD;
    ringalpha = Import[&#xD;
    CloudObject[&#xD;
       &amp;#034;https://www.wolframcloud.com/objects/4e39f856-1c09-44d1-b2a9-\&#xD;
    00ffd480b6dd&amp;#034;]];&#xD;
    &#xD;
    ringinnerradius = 74510;&#xD;
    &#xD;
    ringouterradius = 140390;&#xD;
    &#xD;
    rings = ParametricPlot3D[{r Cos[t], r Sin[t], 0}, {r, ringinnerradius,&#xD;
        ringouterradius}, {t, 0, 2 Pi}, Mesh -&amp;gt; None, &#xD;
      PlotStyle -&amp;gt; Texture[ringalpha], PlotPoints -&amp;gt; 100]&#xD;
&#xD;
![enter image description here][9]&#xD;
&#xD;
**Creating a Star Backdrop**&#xD;
&#xD;
To give some additional subtle detail, we can provide more sense of motion and context for the opacity variations in the rings by providing a backdrop of stars. We make use of EntityValue to  obtain position and brightness data for stars visible to the naked-eye (nearly 9,000 stars). This takes a couple minutes depending on your network connection.&#xD;
&#xD;
    In[9]:= stardata = &#xD;
      EntityValue[&#xD;
       EntityClass[&amp;#034;Star&amp;#034;, &amp;#034;NakedEyeStar&amp;#034;], {&amp;#034;RightAscension&amp;#034;, &amp;#034;Declination&amp;#034;, &#xD;
        &amp;#034;ApparentMagnitude&amp;#034;}];&#xD;
    &#xD;
    In[10]:= stardata // Length&#xD;
    &#xD;
    Out[10]= 8910&#xD;
&#xD;
To make use of the previous data in a graphical setting, we need to convert the [Quantity][10] objects to numbers in radians and also rescale the apparent magnitude brightness values to [GrayLevel][11] values between 0 and 1. We round the values of apparent magnitude since we want to optimize the rendering to make use of multi-point primitives later. Takes about a minute to convert the data into the necessary format.&#xD;
&#xD;
    In[11]:= triples = With[{magrange = MinMax[stardata[[All, 3]]]},&#xD;
       {-QuantityMagnitude[#[[1]], &amp;#034;Radians&amp;#034;], &#xD;
          QuantityMagnitude[#[[2]], &amp;#034;Radians&amp;#034;], &#xD;
          Rescale[Round[#[[3]]], magrange, {1, .1}]} &amp;amp; /@ stardata];&#xD;
&#xD;
Next, we group the stars based on their rounded values.&#xD;
&#xD;
    In[12]:= gb = GatherBy[triples, #[[3]] &amp;amp;];&#xD;
&#xD;
We construct the star background primitives by converting the right ascension and declination values into Cartesian spherical coordinates and place them far enough outside of the Saturn system, 8 ring radii, that they can serve as a spherical backdrop assuming our camera stays inside this distance. Each magnitude value gets a specific GrayLevel and set of points with a single [Point][12] head.&#xD;
&#xD;
    In[13]:= stars = With[{r = 8 ringouterradius},&#xD;
         {GrayLevel[#[[1, 3]]], &#xD;
          Point[{-r Cos[#[[1]]] Sin[#[[2]] + Pi/2], &#xD;
              r Sin[#[[1]]] Sin[#[[2]] + Pi/2], -r Cos[#[[2]] + &#xD;
                 Pi/2]} &amp;amp; /@ #]}] &amp;amp; /@ gb;&#xD;
&#xD;
We can then assemble the star backdrop and assign a specific [PointSize][13] to all stars, using GrayLevel, not size, to represent brightness variations.&#xD;
&#xD;
    In[14]:= starscene = Graphics3D[{PointSize[.004], stars}];&#xD;
&#xD;
**Defining the Flight Path**&#xD;
&#xD;
The flightpath is a simple straight line. Its starts &amp;#034;in front&amp;#034; of Saturn at 4 ring radii out, and always keeps the camera pointed at the planet. The position of the camera changes with time. We construct the path using [Interpolation][14], one for each Cartesian coordinate. As time progresses, the y-coordinate extends out to the side of Saturn so we don&amp;#039;t hit it. We also modify the z-coordinate to start above the ring plane and drop below it at the end.&#xD;
&#xD;
    xfun = Interpolation[{4 ringouterradius, 3 ringouterradius, 2 ringouterradius,&#xD;
         ringouterradius, 0, -ringouterradius}];&#xD;
    &#xD;
    yfun = Interpolation[{0, ringouterradius, 2 ringouterradius, &#xD;
        3 ringouterradius, 4 ringouterradius, 4 ringouterradius}];&#xD;
    &#xD;
    zfun = Interpolation[{4 saturnradius, 3 saturnradius, 2 saturnradius, &#xD;
        1 saturnradius, 0, -1 saturnradius}];&#xD;
&#xD;
**Assembling the Scene and Generating Frames**&#xD;
&#xD;
We can render an initial scene to get a sense of how it will look. We specify a point light source to look as if the system is being illuminated by the Sun from the &amp;#034;front&amp;#034;.&#xD;
&#xD;
    gr = Show[{planet, Graphics3D[{Lighting -&amp;gt; {{&amp;#034;Ambient&amp;#034;, GrayLevel[.33]}}, rings[[1]]}], starscene}, Background -&amp;gt; Black, &#xD;
      ImageSize -&amp;gt; .4 {1920, 1080}, SphericalRegion -&amp;gt; True, ViewAngle -&amp;gt; Pi/10, &#xD;
      ViewVector -&amp;gt; {{4 ringouterradius, 0, 1 saturnradius}, {0, 0, 0}}, &#xD;
      PlotRange -&amp;gt; All, &#xD;
      Lighting -&amp;gt; {{&amp;#034;Ambient&amp;#034;, GrayLevel[0]}, {&amp;#034;Point&amp;#034;, &#xD;
         White, {3 ringouterradius, 0, 3 saturnradius}}}]&#xD;
&#xD;
![enter image description here][15]&#xD;
&#xD;
The first step in animating the scene is to generate a list of frames. The elements are all static, but the camera position changes in time using [ViewVector][16] and making use of the interpolating functions created earlier. The time step is small so that we can obtain enough frames (600) to make the animation play back smoothly. The [ImageSize][17] is set to standard HD resolution.&#xD;
&#xD;
    In[19]:= frames = Table[&#xD;
       Show[gr, ViewVector -&amp;gt; {{xfun[t], yfun[t], zfun[t]}, {0, 0, 0}}, &#xD;
        ImageSize -&amp;gt; {1920, 1080}], {t, 1, 6 - 1/120, 1/120}];&#xD;
    &#xD;
    In[20]:= frames // Length&#xD;
    &#xD;
    Out[20]= 600&#xD;
&#xD;
The initial frame can be seen, scaled down, using the following. Stars are more easily seen at full resolution.&#xD;
&#xD;
    In[21]:= Show[frames[[1]], ImageSize -&amp;gt; .4 {1920, 1080}]&#xD;
&#xD;
![enter image description here][18]&#xD;
&#xD;
We need to export the frames to a directory for later assembly. The first step is to set the working directory to the same directory as the notebook.&#xD;
&#xD;
    SetDirectory[NotebookDirectory[]];&#xD;
&#xD;
Finally, we export the frames as PNG files. File names are of the form FrameXXX.png. This step of rasterizing each frame and exporting takes awhile due to the polygon count and opacity in the scene so you will need to be patient. Using [Export][19] to export individual frames, as opposed to generating a Table of frames to be exported in one pass, has at least one major advantage. It allows you to stop, at any point, and see how far you have progressed. You can monitor the directory you are exporting to to see the progress. You can abort the process and continue where you left off later.&#xD;
&#xD;
    Do[&#xD;
     Export[&amp;#034;Frame&amp;#034; &amp;lt;&amp;gt; &#xD;
        ToString[PaddedForm[i - 1, 3, NumberPadding -&amp;gt; &amp;#034;0&amp;#034;, &#xD;
          NumberSigns -&amp;gt; {&amp;#034;&amp;#034;, &amp;#034;&amp;#034;}]] &amp;lt;&amp;gt; &amp;#034;.png&amp;#034;, frames[[i]], &amp;#034;PNG&amp;#034;];,&#xD;
     {i, 1, 600, 1}&#xD;
     ]&#xD;
&#xD;
Once you have the directory of images, you can combine these into whatever video format you prefer. You can even re-import all the frames and export them from the Wolfram Language. Modern video formats are not standardized so leaves you open to a number of choices. I tend to prefer MPEG-4 with an H.264 codec for best quality and compression. Some may prefer a Quicktime animation. The choice is up to you. There are multiple tools available for combining such image sequences that range from command line tools like FFMPEG or packages like Blender. After combining the frames, you can upload the video to your favorite video sharing service such as Vimeo or YouTube. I prefer Vimeo since the compression algorithm they apply seems more optimal for quality. The final animation was already linked in the opening statement, but [here it is again][20].&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=SaturnFlyby-ezgif.com-optimize.gif&amp;amp;userId=11733&#xD;
  [2]: https://vimeo.com/260948024&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Vimeo.png&amp;amp;userId=25355&#xD;
  [4]: https://vimeo.com/260948024&#xD;
  [5]: http://reference.wolfram.com/language/ref/ParametricPlot3D.html&#xD;
  [6]: http://reference.wolfram.com/language/ref/EntityValue.html&#xD;
  [7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=5996Planet.png&amp;amp;userId=25355&#xD;
  [8]: http://reference.wolfram.com/language/ref/CloudObject.html&#xD;
  [9]: http://community.wolfram.com//c/portal/getImageAttachment?filename=7558Rings.png&amp;amp;userId=25355&#xD;
  [10]: http://reference.wolfram.com/language/ref/Quantity.html&#xD;
  [11]: http://reference.wolfram.com/language/ref/GrayLevel.html&#xD;
  [12]: http://reference.wolfram.com/language/ref/Point.html&#xD;
  [13]: http://reference.wolfram.com/language/ref/PointSize.html&#xD;
  [14]: http://reference.wolfram.com/language/ref/Interpolation.html&#xD;
  [15]: http://community.wolfram.com//c/portal/getImageAttachment?filename=5763init.png&amp;amp;userId=25355&#xD;
  [16]: http://reference.wolfram.com/language/ref/ViewVector.html&#xD;
  [17]: http://reference.wolfram.com/language/ref/ImageSize.html&#xD;
  [18]: http://community.wolfram.com//c/portal/getImageAttachment?filename=7032Frame1.png&amp;amp;userId=25355&#xD;
  [19]: http://reference.wolfram.com/language/ref/Export.html&#xD;
  [20]: https://vimeo.com/260948024</description>
    <dc:creator>Jeffrey Bryant</dc:creator>
    <dc:date>2018-03-22T16:09:27Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/251690">
    <title>Mathematica for General Relativity and Gravity research</title>
    <link>https://community.wolfram.com/groups/-/m/t/251690</link>
    <description>Dear community members,

I&amp;#039;m currently try to use Wolfram Mathematica to some gravity research. But i can&amp;#039;t find built-in methods do differential geometry calculations in Mathematica.
For example, is there any way to compute Einstein or Ricci tensor by metric? Or something more complicate, like create manifold, some medium with fixed state equation and write Einstein equations for this system?

Thanks,

Boris Latosh</description>
    <dc:creator>Boris Latosh</dc:creator>
    <dc:date>2014-05-14T18:31:41Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2299843">
    <title>HankelH1 real part for large values of n differs from Python result</title>
    <link>https://community.wolfram.com/groups/-/m/t/2299843</link>
    <description>Dear all,&#xD;
&#xD;
when evaluating &amp;#034;HankelH1[n,z]&amp;#034; in Mathematica the resulting real part significantly differs from the result I obtain when I use &amp;#034;scipy.special.hankel1(n,z)&amp;#034; in Python for large values of n.&#xD;
For example, &amp;#034;HankelH1[5,3]&amp;#034; and &amp;#034;scipy.special.hankel1(5,3)&amp;#034; are in sufficient agreement, however for &amp;#034;HankelH1[16,3]&amp;#034; and &amp;#034;scipy.special.hankel1(16,3)&amp;#034; the result significantly differs.&#xD;
Does anybody have an idea why that is the case?&#xD;
&#xD;
Thank you very much.&#xD;
&#xD;
Kind regards</description>
    <dc:creator>D D</dc:creator>
    <dc:date>2021-06-27T05:37:11Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1207400">
    <title>Finding yoga-poses constellations in the night sky</title>
    <link>https://community.wolfram.com/groups/-/m/t/1207400</link>
    <description>![found constellations][9]&#xD;
&#xD;
## Story Time ##&#xD;
&#xD;
At its first meeting in 1922, the International Astronomical Union (IAU), officially adopted the list of 88 constellations that we use today.&#xD;
These include 14 men and women, 9 birds, two insects, 19 land animals, 10 water creatures, two centaurs, one head of hair, a serpent, a dragon, a flying horse, a river and 29 inanimate objects. As many of us have (frustratingly) witnessed first hand while star-gazing - most of these bear little resemblance to their supposed figures. Instead, it is more likely that the ancient constellation-makers meant them to be symbolic, a kind of celestial &amp;#034;Hall of Fame&amp;#034; for their favorite animals or heroes.&#xD;
&#xD;
This begs two questions I sought to answer with this project:&#xD;
&#xD;
 1. Can we &amp;#039;do better&amp;#039; now with the WL&amp;#039;s StarData[] curated data and Machine Learning functionality?&#xD;
 2. What if the ancient constellation-makers were slightly more creative? Say they looked up at the sky, and only saw yoga-poses!&#xD;
&#xD;
Some examples of the found yoga-pose constellations, projected on images of the night sky are shown here, with a walk-through of the code below:&#xD;
&#xD;
[![example yoga-pose constellations][1]][2]&#xD;
&#xD;
## Yoga Poses ##&#xD;
&#xD;
First things first, finding images for yoga poses.&#xD;
Turns out, the WL has a built in YogaPose Entity Class with 216(!) available entities and their schematics.&#xD;
A lot of these are very similar (e.g. palms facing up/down) and we therefore only select a subset of them, which differ substantially from each other:&#xD;
&#xD;
    yogaposes = EntityClass[&amp;#034;YogaPose&amp;#034;, All] // EntityList;&#xD;
    chosenPoses = &#xD;
      List /@ {4, 6, 7, 8, 11, 14, 23, 25, 28, 35, 38, 43, 51, 54, 56, 59,&#xD;
         63, 65, 71, 72, 76, 77, 78, 84, 88, 90, 98, 100, 102, 103, 110, &#xD;
        111, 112, 113, 116, 118, 119, 125, 126, 133, 139, 142, 149, 152, &#xD;
        153, 154, 155, 156, 160, 164, 165, 167, 172, 177, 178, 180, 182, &#xD;
        183, 184, 190, 193, 194, 195, 197, 202, 204, 206, 207, 209, 210, &#xD;
        212, 215, 216};&#xD;
    Shallow[Extract[yogaposes, chosenPoses]]&#xD;
&#xD;
We write a wrapper to ensure the schematics are padded to give a square image and visualize our 73 constellations:&#xD;
&#xD;
    makeSquare[gr_, size_, bool_: False] := &#xD;
     Block[{range, magnitudes, order, padding, newRanges, res},&#xD;
      range = AbsoluteOptions[gr, PlotRange][[1, 2]];&#xD;
      magnitudes = Abs[Subtract @@@ range];&#xD;
      order = Ordering[magnitudes, 2, Greater];&#xD;
      padding = Subtract @@ magnitudes[[order]]/2;&#xD;
      newRanges = {{-1, 1} padding + Last[range[[order]]], &#xD;
        First[range[[order]]]};&#xD;
      res = Show[gr, PlotRange -&amp;gt; Reverse@newRanges[[order]], &#xD;
        ImageSize -&amp;gt; size];&#xD;
      If[bool, Rasterize[res], res]]&#xD;
&#xD;
    Multicolumn[&#xD;
     makeSquare[#[&amp;#034;SimplifiedSchematic&amp;#034;], 64] &amp;amp; /@ &#xD;
      Most[Extract[yogaposes, chosenPoses]], 9, Frame -&amp;gt; All]&#xD;
&#xD;
![constellations graphic][3]&#xD;
&#xD;
## Neural Network ##&#xD;
Our problem now can be worded as a classification one: *given 5-10 stars, classify them as one of the 73 yoga-poses constellations*&#xD;
The problem with that formulation of-course is that 5-10 randomly selected points inside the constellation region isn&amp;#039;t specific enough to differentiate between constellations. The image below shows that although 1000 sets of 10 points will define the shape, 10 points alone fall short:&#xD;
&#xD;
![pointsInMesh][4] &#xD;
&#xD;
Instead, we compute the Voronoi diagram of the points, using DistanceTransform to leverage already-optimized convolutional neural nets used for classifying images. Note that, even if (naturally) the results are less clear with fewer points (left to right) - the result with only 10 points at the far right is still quite recognizable to a human eye:&#xD;
&#xD;
![distanceTransforms][5] &#xD;
&#xD;
With this in-mind, we create a neural network similar to the [VGG16][6] neural network, with successive 5x5 convolutions, ReLu activation functions and Max pooling layers. Finally note that we use an average pooling instead of fully connected layers to reduce the number of parameters and the use of dropout layers.&#xD;
&#xD;
    conv[output_] := ConvolutionLayer[output, {5, 5}, &amp;#034;PaddingSize&amp;#034; -&amp;gt; 2]&#xD;
    pool[size_] := PoolingLayer[{size, size}, &amp;#034;Stride&amp;#034; -&amp;gt; size]&#xD;
    lenet = NetChain[&#xD;
      {conv[32], Ramp, conv[32], Ramp, pool[2], conv[64], Ramp, conv[64], &#xD;
       Ramp, pool[2], conv[128], Ramp, conv[128], Ramp, conv[128], Ramp, &#xD;
       PoolingLayer[{9, 9}, &amp;#034;Stride&amp;#034; -&amp;gt; 9, &amp;#034;Function&amp;#034; -&amp;gt; Mean], &#xD;
       FlattenLayer[], DropoutLayer[], 73, SoftmaxLayer[]},&#xD;
      &amp;#034;Output&amp;#034; -&amp;gt; NetDecoder[{&amp;#034;Class&amp;#034;, Extract[yogaposes, chosenPoses]}],&#xD;
      &amp;#034;Input&amp;#034; -&amp;gt; NetEncoder[{&amp;#034;Image&amp;#034;, {64, 64}, ColorSpace -&amp;gt; &amp;#034;Grayscale&amp;#034;}]&#xD;
      ]&#xD;
&#xD;
The training set then consists of generating 10-15 points inside the constellation region (resized and padded to allow for rotations later), and taking their DistanceTransform:&#xD;
&#xD;
    meshes[n_] := &#xD;
     meshes[n] = &#xD;
      ImagePad[ColorNegate@&#xD;
        makeSquare[&#xD;
         yogaposes[[chosenPoses[[n, 1]]]][&amp;#034;SimplifiedSchematic&amp;#034;], 44], 10]&#xD;
    trainingSet[n_, m_, iter_] := &#xD;
     With[{reg = &#xD;
        ImageMesh[meshes[n], CornerNeighbors -&amp;gt; False, &#xD;
         Method -&amp;gt; &amp;#034;MarchingSquares&amp;#034;]},&#xD;
      Thread[ColorConvert[&#xD;
           ImageAdjust[&#xD;
            DistanceTransform[Image[SparseArray[# -&amp;gt; 0, {64, 64}, 1]]]], &#xD;
           &amp;#034;Grayscale&amp;#034;] &amp;amp; /@ &#xD;
         Clip[Round@RandomPoint[reg, {iter, m}], {1, 64}] -&amp;gt; &#xD;
        yogaposes[[chosenPoses[[n, 1]]]]]]&#xD;
    exampleTrainingSet = &#xD;
     Flatten[trainingSet[#, 10, 1] &amp;amp; /@ RandomInteger[{1, 73}, 10], 1]&#xD;
&#xD;
The net took a couple of hours to train on ~100,000 examples on my CPU.&#xD;
Here we import the trained net:&#xD;
&#xD;
    lenetTrained = Import[&amp;#034;constellationsNet.wlnet&amp;#034;]&#xD;
&#xD;
## Night Sky ##&#xD;
&#xD;
We&amp;#039;re almost ready to classify the night sky. We first need the location of the 10,000 brightest stars along with their Right Ascension and Declination:&#xD;
&#xD;
    brightest = &#xD;
     StarData[EntityClass[&#xD;
       &amp;#034;Star&amp;#034;, {EntityProperty[&amp;#034;Star&amp;#034;, &amp;#034;ApparentMagnitude&amp;#034;] -&amp;gt; &#xD;
         TakeSmallest[10000]}], {&amp;#034;RightAscension&amp;#034;, &amp;#034;Declination&amp;#034;, &#xD;
       &amp;#034;ApparentMagnitude&amp;#034;}]&#xD;
&#xD;
We can plot these on the night sky using no projection (i.e. RA Vs Dec), using the sinusoidal projection (taken by Kuba&amp;#039;s excellent [answer][7] in SE) or on the celestial sphere given by the following transformations respectively:&#xD;
&#xD;
$$sinusoidal:\{(\alpha -\pi ) \cos (\delta&#xD;
   ),\delta \}$$&#xD;
&#xD;
$$map  to3D:\{\cos (\alpha ) \cos (\delta ),\sin&#xD;
   (\alpha ) \cos (\delta ),\sin (\delta&#xD;
   )\}$$&#xD;
&#xD;
![brightestStarsProjections][8]&#xD;
&#xD;
## Classification ##&#xD;
&#xD;
Finally, we use these 10,000 brightest stars to compute a multivariate smooth kernel distribution out of which to sample from and a Nearest function to compute neighboring stars. We need to of-course use our own distance function on the celestial sphere:&#xD;
&#xD;
    wrap[list_] := Block[{xs, ys},&#xD;
      {xs, ys} = Transpose[list];&#xD;
      Thread[{Mod[xs, 2 \[Pi]], Mod[ys, \[Pi], -\[Pi]/2]}]]&#xD;
    mapTo3D[\[Alpha]_, \[Delta]_] = {Cos[\[Alpha]] Cos[\[Delta]], &#xD;
       Cos[\[Delta]] Sin[\[Alpha]], Sin[\[Delta]]};&#xD;
    dist[{u_, v_}, {x_, &#xD;
       y_}] := (#1[[1]] - #2[[1]])^2 + (#1[[2]] - #2[[2]])^2 + (#1[[&#xD;
           3]] - #2[[3]])^2 &amp;amp; @@ mapTo3D @@@ {{u, v}, {x, y}}&#xD;
    pts = wrap@QuantityMagnitude[UnitConvert[brightest[[6 ;;, ;; 2]]]];&#xD;
    nf = Nearest[pts, DistanceFunction -&amp;gt; dist]&#xD;
    sm = SmoothKernelDistribution[pts]&#xD;
&#xD;
Our search algorithm is therefore defined as follows:&#xD;
&#xD;
 1. Pick a random position from the night sky distribution&#xD;
 2. Compute its 5-10 nearest neighbors&#xD;
 3. Classify those stars and their rotations by $\frac{2 \pi }{15}$&#xD;
 4. Select the rotation which gives the highest accuracy&#xD;
 5. Associate constellation to running association and repeat&#xD;
&#xD;
        rescale[list_] := Block[{xs, ys},&#xD;
          {xs, ys} = Thread[list];&#xD;
          Thread[Rescale[#, MinMax[#], {11, 54}] &amp;amp; /@ {xs, ys}]]&#xD;
        rotate[\[Alpha]_, pts_] := &#xD;
         ImageAdjust@&#xD;
          DistanceTransform[&#xD;
           Image@SparseArray[&#xD;
             Round@RotationTransform[\[Alpha] , {65/2, 65/2}][rescale[pts]] -&amp;gt;&#xD;
               0, {64, 64}, 1]]&#xD;
        sky = &amp;lt;||&amp;gt;;&#xD;
        accumulate[] := &#xD;
         Block[{pts = &#xD;
            nf[Mod[RandomVariate[sm] + {0, \[Pi]}, 2 \[Pi]] - {0, \[Pi]}, &#xD;
             RandomInteger[{5, 10}]], \[Alpha], pred},&#xD;
          {\[Alpha], pred} = &#xD;
           Last[SortBy[&#xD;
             First /@ &#xD;
              Table[Thread[{\[Alpha], &#xD;
                 lenetTrained[rotate[\[Alpha], pts], &#xD;
                  &amp;#034;TopProbabilities&amp;#034;]}], {\[Alpha], 0, 2 \[Pi], (2 \[Pi])/&#xD;
                15}], Last]];&#xD;
          If[Not[KeyExistsQ[sky, pred[[1]]]] || &#xD;
            TrueQ[sky[pred[[1]], &amp;#034;Accuracy&amp;#034;] &amp;lt; pred[[2]]],&#xD;
           AssociateTo[sky, &#xD;
            pred[[1]] -&amp;gt; &amp;lt;|&amp;#034;Accuracy&amp;#034; -&amp;gt; pred[[2]], &#xD;
              &amp;#034;Image&amp;#034; -&amp;gt; &#xD;
               HighlightImage[&#xD;
                makeSquare[pred[[1]][&amp;#034;SimplifiedSchematic&amp;#034;], &#xD;
                 64], {PointSize[Medium], Red, &#xD;
                 Round[RotationTransform[\[Alpha], 65/2 {1, 1}][rescale@pts], &#xD;
                  0.5]}], &amp;#034;Points&amp;#034; -&amp;gt; pts, &amp;#034;Angle&amp;#034; -&amp;gt; \[Alpha]|&amp;gt;], Nothing];]&#xD;
&#xD;
We can import a precomputed association with 20 such constellations:&#xD;
&#xD;
    selectedAsc = Import[&amp;#034;skyAsc.m.gz&amp;#034;]&#xD;
&#xD;
## Results ##&#xD;
&#xD;
Finally, we orient the schematic based on the optimally found angle and (manually) connect the dots.&#xD;
&#xD;
    orient[pts_, \[Alpha]_] := &#xD;
     Round[RotationTransform[\[Alpha], 65/2 {1, 1}][rescale@pts], 0.5]&#xD;
    lines = {{{10, 7, 3, 1, 4, 9, 2, 5, 8}, {2, 6}}, {{7, 3, 1, 9, &#xD;
         6}, {10, 2, 1, 8}, {4, 3, 5}}, {{7, 8, 9, 4, 3, 2, 10}, {1, 2, 6,&#xD;
          5}}, {{10, 2, 1, 3, 9, 5}, {7, 1, 4, 6, 8}}, {{5, 4, 1, 2, &#xD;
         3}}, {{10, 4, 5, 7, 9, 3, 8}, {6, 1, 2, 3}}, {{9, 5, 6, 3, 1, 2, &#xD;
         7}, {7, 4, 8}}, {{7, 6, 2, 3, 5, 8}, {9, 5, 4}, {3, 1}}, {{6, 2, &#xD;
         1, 3, 4}, {2, 5}}, {{5, 6, 4, 1, 2, 8, 3, 7}}, {{10, 6, 3, 2, &#xD;
         7}, {5, 2, 1, 4, 9, 8}}, {{9, 5, 1, 2, 4, 8, 7}, {6, 3, 8}}, {{6,&#xD;
          10, 4, 2, 1, 3, 9, 7, 5, 8}}, {{6, 7, 3, 2, 1, 4, 5}}, {{10, 8, &#xD;
         3, 6, 7, 2, 5, 9}, {5, 1, 4, 3}}, {{6, 5, 2, 1, 3}, {1, 4}}, {{5,&#xD;
          1, 2, 3}, {1, 4}}, {{6, 3, 2, 1, 4}, {3, 5}, {2, 7}}, {{3, 6, 8,&#xD;
          2, 4, 5, 1, 7}}, {{3, 1, 2, 6, 5}}};&#xD;
    makeSquareAndScale[gr_, \[Alpha]_, size_, opacity_] := &#xD;
     Block[{range, magnitudes, order, padding, newRanges, s},&#xD;
      range = AbsoluteOptions[gr, PlotRange][[1, 2]];&#xD;
      magnitudes = Abs[Subtract @@@ range];&#xD;
      order = Ordering[magnitudes, 2, Greater];&#xD;
      padding = Subtract @@ magnitudes[[order]]/2;&#xD;
      s = size/First[magnitudes[[order]]];&#xD;
      newRanges = {{-1, 1} padding + Last[range[[order]]], &#xD;
        First[range[[order]]]};&#xD;
      Graphics[{Opacity[opacity], &#xD;
        GeometricTransformation[&#xD;
         GeometricTransformation[&#xD;
          gr[[1]], {ScalingMatrix[{s, &#xD;
             s}], -1 First /@ (s Reverse@newRanges[[order]])}], &#xD;
         RotationTransform[\[Alpha], (size + 1)/2 {1, 1}]]}, &#xD;
       ImageSize -&amp;gt; size]] &#xD;
    With[{l = Map[Line, lines, {2}]},&#xD;
     Multicolumn[&#xD;
      Table[Show[&#xD;
        makeSquareAndScale[&#xD;
         Keys[selectedAsc][[i]][&#xD;
          &amp;#034;SimplifiedSchematic&amp;#034;], -selectedAsc[[i, -1]], 64, 0.25], &#xD;
        Graphics[&#xD;
         GraphicsComplex[&#xD;
          rescale[selectedAsc[[i, -2]]], {l[[i]], Red, PointSize[Large], &#xD;
           Point /@ Sort /@ Flatten /@ lines[[i]]}]], &#xD;
        ImageSize -&amp;gt; 150], {i, 20}], 5, Frame -&amp;gt; All, &#xD;
      Appearance -&amp;gt; &amp;#034;Horizontal&amp;#034;]]&#xD;
&#xD;
![found constellations][9]&#xD;
&#xD;
These can also be superimposed on the full night-sky:&#xD;
&#xD;
    Graphics[{With[{l = Map[Line, lines, {2}]},&#xD;
       Table[GraphicsComplex[&#xD;
         selectedAsc[[i, -2]], {Orange, Thickness[Large], l[[i]], Red, &#xD;
          PointSize[Medium], Point /@ Sort /@ Flatten /@ lines[[i]]}], {i,&#xD;
          20}]], Opacity[0.25], PointSize[Small], &#xD;
      Point[Complement[pts, Flatten[Values@selectedAsc[[All, -2]], 1]]]}, &#xD;
     ImageSize -&amp;gt; 750]&#xD;
&#xD;
![found overlay][10]&#xD;
&#xD;
    sinusoidal[\[Alpha]_, \[Delta]_] = {(\[Alpha] - \[Pi]) Cos[\[Delta]], \&#xD;
    \[Delta]}&#xD;
    Graphics[{With[{l = Map[Line, lines, {2}]},&#xD;
       Table[GraphicsComplex[&#xD;
         sinusoidal @@@ selectedAsc[[i, -2]], {Orange, Thickness[Large], &#xD;
          l[[i]], Red, PointSize[Medium], &#xD;
          Point /@ Sort /@ Flatten /@ lines[[i]]}], {i, 20}]], &#xD;
      Opacity[0.25], PointSize[Small], &#xD;
      Point[sinusoidal @@@ &#xD;
        Complement[pts, Flatten[Values@selectedAsc[[All, -2]], 1]]]}, &#xD;
     ImageSize -&amp;gt; 750]&#xD;
&#xD;
![found sinusoidal][11]&#xD;
&#xD;
It is then a matter of Overlaying these found constellations to existing images of night skies to produce the images at the beginning of the post:&#xD;
&#xD;
    overlay[{img_, constellation_}, {size_, loc_, opac_}] := &#xD;
     ImageCompose[imgs[[img]], &#xD;
      ImageResize[&#xD;
       Show[makeSquareAndScale[&#xD;
         Keys[selectedAsc][[constellation]][&#xD;
          &amp;#034;SimplifiedSchematic&amp;#034;], -selectedAsc[[constellation, -1]], 64, &#xD;
         opac], Graphics[&#xD;
         GraphicsComplex[&#xD;
          rescale[selectedAsc[[constellation, -2]]], {White, &#xD;
           Thickness[0.0075], Line /@ lines[[constellation]], White, &#xD;
           PointSize[.025], &#xD;
           Point /@ Sort /@ Flatten /@ lines[[constellation]]}]], &#xD;
        ImageSize -&amp;gt; 1000], size], Scaled[loc]]&#xD;
&#xD;
## Conclusions / Lessons Learned ##&#xD;
 &#xD;
 - It IS possible to find collections of stars in the night sky matching all sorts of shapes. Other built-in entities to try are Pokemons, Dinosaurs etc&#xD;
 - Not all the found constellation work &amp;#039;perfectly&amp;#039;&#xD;
 - Machine Learning is a powerful tool, and the WL implementation makes it easy to get started&#xD;
 - Reformulating the problem to an easier, already solved problem (e.g. points -&amp;gt; 2D image input) can help Classification Accuracy&#xD;
 - Perhaps the most interesting aspect of neural networks now, is diversifying its applications - so be creative&#xD;
&#xD;
This work was presented at the 2017 WTC (as part of a larger talk entitled &amp;#034;(De)Generative Art&amp;#034;). &amp;lt;br&amp;gt;&#xD;
I look forward to any comments/suggestions.&#xD;
&amp;lt;br&amp;gt;&#xD;
&amp;lt;br&amp;gt;George&#xD;
&amp;lt;br&amp;gt;&#xD;
&amp;lt;br&amp;gt; PS The editor doesn&amp;#039;t seem to let me attach the .wlnet and .m.gz files.&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=exampleImages.png&amp;amp;userId=11733&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=exampleImages.png&amp;amp;userId=616023&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=4214constellationsGraphic.png&amp;amp;userId=616023&#xD;
  [4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=randomPointsInmesh.png&amp;amp;userId=616023&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=distanceTransforms.png&amp;amp;userId=616023&#xD;
  [6]: https://arxiv.org/pdf/1409.1556v6.pdf&#xD;
  [7]: https://mathematica.stackexchange.com/questions/89668/geoprojection-for-astronomical-data-wrong-ticks/89792#89792&#xD;
  [8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=maps.png&amp;amp;userId=616023&#xD;
  [9]: http://community.wolfram.com//c/portal/getImageAttachment?filename=foundConstellations.png&amp;amp;userId=616023&#xD;
  [10]: http://community.wolfram.com//c/portal/getImageAttachment?filename=overlaidConstellations.png&amp;amp;userId=616023&#xD;
  [11]: http://community.wolfram.com//c/portal/getImageAttachment?filename=overlaidConstellationsSinusoidal.png&amp;amp;userId=616023</description>
    <dc:creator>George Varnavides</dc:creator>
    <dc:date>2017-10-24T04:17:44Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1732567">
    <title>[WSC19] Simulating Binary Star Systems</title>
    <link>https://community.wolfram.com/groups/-/m/t/1732567</link>
    <description>![enter image description here][1]&#xD;
&#xD;
Abstract&#xD;
--------&#xD;
&#xD;
The goal of this project was to simulate binary star systems and demonstrate the process of finding binary star systems and their populating planets.  To accomplish this goal, I used a function called NBodySimulation, which describes the motions of a number of bodies subjected to predefined laws of motion.  Simulating binary star systems, I produced a number of animations that describe the motions of these celestial bodies visually.  After I succeeded in creating these animations, I moved to illustrate a practice called photometry, which astronomers use to detect binary star systems and exoplanets.  I, following in the footsteps of these astronomers, produced a series of graphics describing the change in a binary star system&amp;#039;s brightness over time.  &#xD;
&#xD;
Introduction&#xD;
------------&#xD;
&#xD;
In 1929, Edwin Hubble discovered the Andromeda galaxy and destroyed our preexisting perceptions of the universe.  The size of the universe expanded from 100 thousand light years across to 100 billion.  The probability that there exists a planet that is similar to our own increases with every galaxy that is discovered.  What was once a fantasy has become a near-reality.  Consequently, the search for binary star systems and their populating planets has gained a great deal of attention.  Astronomers everywhere are feverishly searching for binary star systems and their populating planets.  Unfortunately, finding exoplanets is an incredibly difficult task, so dim and distant are they.  Astronomers use photometrythe art of measuring changes in the intensity of light emitting from a defined areato detect these celestial bodies.  In this project, I demonstrate how astronomers detect binary star systems and their planets using photometry.  &#xD;
&#xD;
Simulating Binary Star Systems&#xD;
------------------------------&#xD;
&#xD;
Here, I have created a simulation of a complete planetary system populated with a binary star and five planets.   &#xD;
		&#xD;
    ExoDataF = &#xD;
      NBodySimulation[&#xD;
       &amp;#034;Newtonian&amp;#034;, {&amp;lt;|&amp;#034;Mass&amp;#034; -&amp;gt; SM1, &amp;#034;Position&amp;#034; -&amp;gt; SP1, &#xD;
         &amp;#034;Velocity&amp;#034; -&amp;gt; SV1|&amp;gt;,&#xD;
        &amp;lt;|&amp;#034;Mass&amp;#034; -&amp;gt; SM2, &amp;#034;Position&amp;#034; -&amp;gt; SP2, &amp;#034;Velocity&amp;#034; -&amp;gt; SV2|&amp;gt;,&#xD;
        &amp;lt;|&amp;#034;Mass&amp;#034; -&amp;gt; PM1, &amp;#034;Position&amp;#034; -&amp;gt; PP1, &amp;#034;Velocity&amp;#034; -&amp;gt; PV1|&amp;gt;,&#xD;
        &amp;lt;|&amp;#034;Mass&amp;#034; -&amp;gt; PM2, &amp;#034;Position&amp;#034; -&amp;gt; PP2, &amp;#034;Velocity&amp;#034; -&amp;gt; PV2|&amp;gt;,&#xD;
        &amp;lt;|&amp;#034;Mass&amp;#034; -&amp;gt; PM3, &amp;#034;Position&amp;#034; -&amp;gt; PP3, &amp;#034;Velocity&amp;#034; -&amp;gt; PV3|&amp;gt;,&#xD;
        &amp;lt;|&amp;#034;Mass&amp;#034; -&amp;gt; PM4, &amp;#034;Position&amp;#034; -&amp;gt; PP4, &amp;#034;Velocity&amp;#034; -&amp;gt; PV4|&amp;gt;,&#xD;
        &amp;lt;|&amp;#034;Mass&amp;#034; -&amp;gt; PM5, &amp;#034;Position&amp;#034; -&amp;gt; PP5, &amp;#034;Velocity&amp;#034; -&amp;gt; PV5|&amp;gt;}, &#xD;
       Quantity[10^30, &amp;#034;Years&amp;#034;]];&#xD;
    &#xD;
    Manipulate[&#xD;
     Graphics3D[{White,&#xD;
       Sphere[Values[ExoDataF[&amp;#034;Position&amp;#034;, t]][[1]], p*SR1],&#xD;
       Sphere[Values[ExoDataF[&amp;#034;Position&amp;#034;, t]][[2]], p*SR2], Gray,&#xD;
       Sphere[Values[ExoDataF[&amp;#034;Position&amp;#034;, t]][[3]], 2 p*PR1],&#xD;
       Sphere[Values[ExoDataF[&amp;#034;Position&amp;#034;, t]][[4]], 2 p*PR2],&#xD;
       Sphere[Values[ExoDataF[&amp;#034;Position&amp;#034;, t]][[5]], 2 p*PR3],&#xD;
       Sphere[Values[ExoDataF[&amp;#034;Position&amp;#034;, t]][[6]], 2 p*PR4],&#xD;
       Sphere[Values[ExoDataF[&amp;#034;Position&amp;#034;, t]][[7]], 2 p*PR5]}, &#xD;
      Background -&amp;gt; Black, Boxed -&amp;gt; False, &#xD;
      PlotRange -&amp;gt; {{-2*^12, 2*^12}, {-2*^12, 2*^12}, {-2*^12, 2*^12}}],&#xD;
     {p, 10^5, 10^6},&#xD;
     {t, 0, ExoDataF[&amp;#034;SimulationTime&amp;#034;]/4, 1},&#xD;
     SaveDefinitions -&amp;gt; True]&#xD;
&#xD;
&#xD;
![enter image description here][1]&#xD;
&#xD;
To create this simulation, I pulled data from the Alpha Centauri system to generate the stars and data from our solar system to generate the planets.  This simulation is not representative of an actual binary star system; it has been artificially generated.   With that said, it can be used to demonstrate the difficult nature of detecting exoplanets.  It is relatively easy to detect the two stars (represented as large, white spheres); however, it is much more difficult to detect their populating planets (represented as small, gray spheres).  Despite access to state-of-the-art equipment, astronomers also struggle to detect exoplanets.  They have to resort to other methods.  &#xD;
&#xD;
Using Photometry to Detect Exoplanets&#xD;
-------------------------------------------------------------&#xD;
&#xD;
One can detect binary star systems and exoplanets by plotting the intensity of the light that an area in space is emitting vs time.  Here, I plot the intensity of the light that a single star in space that is unpopulated with planets is emitting vs time.  &#xD;
&#xD;
    ImageA =&#xD;
      Table[&#xD;
       ImageResize[#, {75, 75}]&#xD;
         &amp;amp; /@ (Binarize[Graphics3D[{&#xD;
            Glow[White], Black, Sphere[{0, 0, 0}, 500000 SR1]},&#xD;
           Background -&amp;gt; Black, Boxed -&amp;gt; False,&#xD;
           PlotRange -&amp;gt; {{-3*^12, 3*^12}, {-3*^12, 3*^12}, {-3*^12, &#xD;
              3*^12}}]]), 40];&#xD;
    &#xD;
    ImageAData = ImageData /@ ImageA;&#xD;
    &#xD;
    ListLinePlot[Count[1] /@ (Flatten /@ ImageAData), &#xD;
     PlotLabel -&amp;gt; &amp;#034;Brightness Curve&amp;#034;, AxesLabel -&amp;gt; {&amp;#034;Time&amp;#034;, &amp;#034;Brightness&amp;#034;}]&#xD;
&#xD;
![enter image description here][3]&#xD;
&#xD;
Unsurprisingly, the intensity of the light does not fluctuate over time.  From this graph, one determines that there exists exactly one star and zero planets in this area.  &#xD;
&#xD;
Here, I plot the intensity of the light that a binary star system emits over time. &#xD;
&#xD;
    ImageB =&#xD;
      Take[&#xD;
       Flatten[&#xD;
        Table[ImageResize[#, {75, 75}]&#xD;
           &amp;amp; /@ (Binarize[Graphics3D[{&#xD;
              Glow[White], Black, &#xD;
              Sphere[Values[ExoDataF[&amp;#034;Position&amp;#034;, t]][[1]], p*SR1],&#xD;
              Sphere[Values[ExoDataF[&amp;#034;Position&amp;#034;, t]][[2]], p*SR2]},&#xD;
             Background -&amp;gt; Black, Boxed -&amp;gt; False,&#xD;
             PlotRange -&amp;gt; {{-3*^12, 3*^12}, {-3*^12, 3*^12}, {-3*^12, &#xD;
                3*^12}}]]),&#xD;
         {p, {500000}},&#xD;
         {t, 0, ExoDataF[&amp;#034;SimulationTime&amp;#034;]/2, &#xD;
          ExoDataF[&amp;#034;SimulationTime&amp;#034;]/100}]], 40];&#xD;
    &#xD;
    ImageBData = ImageData /@ ImageB;&#xD;
    &#xD;
    ListLinePlot[{Count[1] /@ (Flatten /@ ImageBData)}, PlotRange -&amp;gt; All, &#xD;
     PlotLabel -&amp;gt; &amp;#034;Brightness Curve&amp;#034;, AxesLabel -&amp;gt; {&amp;#034;Time&amp;#034;, &amp;#034;Brightness&amp;#034;}]&#xD;
&#xD;
![enter image description here][4]&#xD;
&#xD;
Notice that the intensity of the light dips periodically. These fluctuations indicate that there exist two celestial bodies. &#xD;
&#xD;
 The intensity of the light is greatest when both bodies are visible:&#xD;
&#xD;
![enter image description here][5]&#xD;
&#xD;
And least when one body eclipses the other:&#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
Here, I plot the intensity of the light that a binary star system populated with exactly one planet emits.&#xD;
&#xD;
    ImageC =&#xD;
      Take[&#xD;
       Flatten[&#xD;
        Table[ImageResize[#, {75, 75}]&#xD;
           &amp;amp; /@ (Binarize[Graphics3D[{&#xD;
              Glow[White], Black, &#xD;
              Sphere[Values[ExoDataF[&amp;#034;Position&amp;#034;, t]][[1]], p*SR1],&#xD;
              Sphere[Values[ExoDataF[&amp;#034;Position&amp;#034;, t]][[2]], p*SR2],&#xD;
              Glow[Black], &#xD;
              Sphere[Values[ExoDataF[&amp;#034;Position&amp;#034;, t]][[4]], 3 p*PR2]},&#xD;
             Background -&amp;gt; Black, Boxed -&amp;gt; False,&#xD;
             PlotRange -&amp;gt; {{-3*^12, 3*^12}, {-3*^12, 3*^12}, {-3*^12, &#xD;
                3*^12}}]]),&#xD;
         {p, {500000}},&#xD;
         {t, 0, ExoDataF[&amp;#034;SimulationTime&amp;#034;]/2, &#xD;
          ExoDataF[&amp;#034;SimulationTime&amp;#034;]/100}]], 40];&#xD;
    &#xD;
    ImageCData = ImageData /@ ImageC;&#xD;
    &#xD;
    ListLinePlot[{Count[1] /@ (Flatten /@ ImageCData)}, PlotRange -&amp;gt; All, &#xD;
     PlotLabel -&amp;gt; &amp;#034;Brightness Curve&amp;#034;, AxesLabel -&amp;gt; {&amp;#034;Time&amp;#034;, &amp;#034;Brightness&amp;#034;}]&#xD;
&#xD;
![enter image description here][7]&#xD;
&#xD;
One determines that there exist two stars and at least one planet by observing the magnitude of each fluctuation.  A change of 200 units indicates that one of the stars eclipses the other.  A change of 30 units a planet.  The planet is much smaller than both of the two stars; therefore, it has a much smaller impact on the intensity of the light emitting from the area.  &#xD;
&#xD;
Notice that the planet covers but a small portion of the stars:&#xD;
&#xD;
![enter image description here][8]&#xD;
&#xD;
Conclusions&#xD;
-----------&#xD;
&#xD;
It is difficult to detect binary star systems and their populating planets; however, it is not impossible.  Using photometry, astronomers can uncover small, dimly-lit bodies orbiting stars light years away.  In this project, I explain how difficult it is to detect the planets populating a binary star system and demonstrate the methods used to do so.  I had to learn how to use a function called NBodySimulation in order to produce the simulations shown in this notebook.  Once I learned how to use this function effectively, I began generating data and creating visualizations depicting dots in a 2D plane.   Most of the simulations that I created I made using data that I generated.  After producing these simulations, I moved to create a complete planetary system populated with a binary star and five planets.  Generating this simulation, I noticed that the planets are difficult to see, much smaller and dimmer than their parents.  I began to wonder how astronomers detect binary star systems and their populating planets, which led me to investigate a practice used to detect these bodies called photometry.  To demonstrate how one detects binary star systems and exoplanets using photometry, I produced a series of graphs that depict the changes in the intensity of the light emitting from the window.  One should be able to detect the stars and planets in the simulation solely from these graphs.  &#xD;
&#xD;
Future Works&#xD;
------------&#xD;
&#xD;
Allotted more time, I would design a function that would allow the user to alter the masses, radii, positions, velocities, and number of bodies present in the interface in real time.  I attempted to apply Manipulate to NBodySimulation, but since NBodySimulation produces cooked data, such an approach is not applicable.  I also would create a visualization describing what happens when a star expands beyond its Roche Lobe.  Such a visualization would help illustrate the chaotic nature of these binary star systems.  I also would produce a visualization depicting what one would see, standing on the surface of an exoplanet looking up.  Imagine standing on the surface of a planet orbiting between a pair of stars.  Everywhere is day; only along the planets prime meridian would you be able to experience twilight.  It would have been a fun, engaging endeavor to try to create such a visualization.  &#xD;
&#xD;
Definitions&#xD;
-----------&#xD;
&#xD;
I generated the data to make the simulations shown here.  However, I based these numbers on data that I pulled on the Alpha Centauri system and the planets present in our solar system.  &#xD;
&#xD;
&#xD;
    SM1 = Quantity[2.188*^32, &amp;#034;kg&amp;#034;];&#xD;
    SM2 = Quantity[2.80402*^31, &amp;#034;kg&amp;#034;];&#xD;
    PM1 = Quantity[2.00*^24, &amp;#034;kg&amp;#034;];&#xD;
    PM2 = Quantity[1.97*^26, &amp;#034;kg&amp;#034;];&#xD;
    PM3 = Quantity[3.35*^23, &amp;#034;kg&amp;#034;];&#xD;
    PM4 = Quantity[5.69*^24, &amp;#034;kg&amp;#034;];&#xD;
    PM5 = Quantity[2.777*^25, &amp;#034;kg&amp;#034;];&#xD;
    &#xD;
    SR1 := 8.511*^5;&#xD;
    SR2 := 6.005*^5;&#xD;
    PR1 := 6.371*^4;&#xD;
    PR2 := 6.991*^4;&#xD;
    PR3 := 2.439*^4;&#xD;
    PR4 := 6.371*^4;&#xD;
    PR5 := 5.823*^4;&#xD;
    &#xD;
    SP1 = Quantity[{0, 0, 0}, &amp;#034;AstronomicalUnit&amp;#034;];&#xD;
    SP2 = Quantity[{0, 11.2, 0}, &amp;#034;AstronomicalUnit&amp;#034;];&#xD;
    PP1 = Quantity[{-11.2, 5.6, 0}, &amp;#034;AstronomicalUnit&amp;#034;];&#xD;
    PP2 = Quantity[{0, -5.2, 5.2}, &amp;#034;AstronomicalUnit&amp;#034;];&#xD;
    PP3 = Quantity[{5.2, -5.2, 13.5}, &amp;#034;AstronomicalUnit&amp;#034;];&#xD;
    PP4 = Quantity[{1, -11.2, 11.2}, &amp;#034;AstronomicalUnit&amp;#034;];&#xD;
    PP5 = Quantity[{1, 13.5, -5}, &amp;#034;AstronomicalUnit&amp;#034;];&#xD;
    &#xD;
    SV1 = Quantity[{-21.4, 0, 0}, &amp;#034;km&amp;#034;]/sec;&#xD;
    SV2 = Quantity[{20.6, 0, 0}, &amp;#034;km&amp;#034;]/sec;&#xD;
    PV1 = Quantity[{20.5, 0, 0}, &amp;#034;km&amp;#034;]/sec;&#xD;
    PV2 = Quantity[{0, 15.7, 0}, &amp;#034;km&amp;#034;]/sec;&#xD;
    PV3 = Quantity[{-19.5, 0, 0}, &amp;#034;km&amp;#034;]/sec;&#xD;
    PV4 = Quantity[{-21.5, 0, 0}, &amp;#034;km&amp;#034;]/sec;&#xD;
    PV5 = Quantity[{0, 18.9, 0}, &amp;#034;km&amp;#034;]/sec;&#xD;
&#xD;
References&#xD;
----------&#xD;
&#xD;
Transit Photometry: A Method for Finding Earths. The Planetary Society, [www.planetary.org/explore/space-topics/exoplanets/transit-photometry.html][9]. Accessed 11 Jul. 2019. &#xD;
&#xD;
Discovery: Other Galaxies Exist. Amazing Space, amazing-[space.stsci.edu/resources/explorations/groundup/lesson/scopes/mt_wilson/discovery.php][10]. Accessed 11 Jul. 2019. &#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=10441PlanetarySystem.gif&amp;amp;userId=1724598&#xD;
  [2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=PlanetarySystem.gif&amp;amp;userId=1724598&#xD;
  [3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=BrightnessCurve.PNG&amp;amp;userId=1724598&#xD;
  [4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=BrightnessCurveB.PNG&amp;amp;userId=1724598&#xD;
  [5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=BinaryStarBAV.PNG&amp;amp;userId=1724598&#xD;
  [6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=BinaryStarOIV.PNG&amp;amp;userId=1724598&#xD;
  [7]: https://community.wolfram.com//c/portal/getImageAttachment?filename=BrightnessCurveC.PNG&amp;amp;userId=1724598&#xD;
  [8]: https://community.wolfram.com//c/portal/getImageAttachment?filename=BinaryStarE3.PNG&amp;amp;userId=1724598&#xD;
  [9]: http://www.planetary.org/explore/space-topics/exoplanets/transit-photometry.html&#xD;
  [10]: http://space.stsci.edu/resources/explorations/groundup/lesson/scopes/mt_wilson/discovery.php</description>
    <dc:creator>Drake Hayes</dc:creator>
    <dc:date>2019-07-12T01:03:09Z</dc:date>
  </item>
</rdf:RDF>

