POV-Ray : Newsgroups : povray.text.scene-files : Planetarium Server Time18 May 2024 16:23:45 EDT (-0400)
 Planetarium (Message 7 to 16 of 16)
 From: Bald Eagle Subject: Re: Planetarium Date: 14 Sep 2018 09:40:01 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"dateCreated": "2018-09-14T13:40:01+00:00",
"datePublished": "2018-09-14T13:40:01+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
Mike Horvath <mik### [at] gmailcom> wrote:

> How do I split such a function into parts? For instance

It's already in parts.

What you can do is limit the range of U and V over which those functions are
evaluated.

If you limit U or V to the range from 0 to 0, then you will get a circle.
Swap U and V, and you get "the other" circle

Limit the ranges of both to a fraction of (2*pi), and you get a curved patch
that only covers part of the torus' surface.

Keep one full 2*pi range, and limit the other, and you get a "hoop sweep" around
the torus, one way or the other.

The set of macros takes this concept and just does it 4 times (0, +TStep,
+PStep, +both) to generate 4 corners, and fills that in with 2 smooth triangles.

See clipka's favorite link:
https://nylander.wordpress.com/2008/08/25/cross-section-of-the-quintic-calabi-yau-manifold/

There is no magic.

Look back through the forums, and you can see that we've been exploring this
basic concept --- for years.

#version version;

#include "colors.inc"

light_source {
<5, 10, -20>
color White
}

camera {
location  <0, 2, -35>
look_at   <0, 0, -10>

right x*image_width/image_height
up y
}

#declare U1 = 0;   // small radius
#declare U2 = 2*pi;   //
#declare V1 = 0;   // large radius
#declare V2 = 2*pi;   //
#declare r0 = 10;
#declare r1 = 4;
#declare SphereRadius = 0.1;

// Create a set of points on the surface of a Torus
#declare X = function (T, P, R, r) {cos(T) * ( R + r * cos(P) )}
#declare Y = function (T, P, R, r) {-sin(T) * ( R + r * cos(P) )}
#declare Z = function (T, P, r, n) {r * sin(P)}

#declare TStep = 0.02;
#declare PStep = 0.05;

#for (Theta, U1, U2, TStep)
#for (Phi, V1, V2, PStep)
#local XYandZResultOfParametricFunctionsEvaluatedForThisImmediateUandV =
<X (Theta, Phi, r0, r1), Y (Theta, Phi, r0, r1), Z (Theta, Phi, r0, r1)>;
sphere {XYandZResultOfParametricFunctionsEvaluatedForThisImmediateUandV
#end
#end
```
 From: Mike Horvath Subject: Re: Planetarium Date: 15 Sep 2018 05:26:14 Message: <5b9cd036\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#5b9cd036%241%40news.povray.org",
"dateCreated": "2018-09-15T09:26:14+00:00",
"datePublished": "2018-09-15T09:26:14+00:00",
"author": {
"@type": "Person",
"name": "Mike Horvath"
}
}
On 9/13/2018 7:59 PM, Mike Horvath wrote:
> I have attached my scene file so far. It already calculates the
> positions of the planets. However, I want to create parametric tori
> showing the orbits of each planet over a span of time.
>
> I believe I have all the pieces already. But how do I convert the
> calculations into the functions a parametric object requires? For
> example, what do I use for u and v?
>
> Thanks.
>
>
> Mike

Collection.

http://lib.povray.org/searchcollection/index2.php?objectName=SolarSystemOrrery&version=1.0&contributorTag=SharkD

Mike
```
 From: Mike Horvath Subject: Re: Planetarium Date: 15 Sep 2018 06:43:35 Message: <5b9ce257\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#5b9ce257%241%40news.povray.org",
"dateCreated": "2018-09-15T10:43:35+00:00",
"datePublished": "2018-09-15T10:43:35+00:00",
"author": {
"@type": "Person",
"name": "Mike Horvath"
}
}
I have textures, but do not know how to orient them with respect to the
axial tilt, orbit and sun. Is anyone familiar with how to do this?

Mike
```
 From: Stephen Subject: Re: Planetarium Date: 15 Sep 2018 06:58:10 Message: <5b9ce5c2\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#5b9ce5c2%241%40news.povray.org",
"dateCreated": "2018-09-15T10:58:10+00:00",
"datePublished": "2018-09-15T10:58:10+00:00",
"author": {
"@type": "Person",
"name": "Stephen"
}
}
On 15/09/2018 11:43, Mike Horvath wrote:
> I have textures, but do not know how to orient them with respect to the
> axial tilt, orbit and sun. Is anyone familiar with how to do this?
>
>
> Mike

For Z up Left handed scenes.

texture {
pigment {
image_map{
png "F:\Graphics\B3D Data\Maps\Planets\Earth\EarthMap2.png"
interpolate 2
map_type 1
}
rotate    <20.000,0.000,0.000>
}

Then for orientation in an orbit. Rotate the sphere the planet texture
will follow.

--

Regards
Stephen
```
 From: Stephen Subject: Re: Planetarium Date: 15 Sep 2018 07:13:38 Message: <5b9ce962\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#5b9ce962%241%40news.povray.org",
"dateCreated": "2018-09-15T11:13:38+00:00",
"datePublished": "2018-09-15T11:13:38+00:00",
"author": {
"@type": "Person",
"name": "Stephen"
}
}
On 15/09/2018 11:58, Stephen wrote:
>      rotate    <20.000,0.000,0.000>

That might be -19 to -21 not rotate 20*x

--

Regards
Stephen
```
 From: Mike Horvath Subject: Re: Planetarium Date: 15 Sep 2018 08:11:44 Message: <5b9cf700\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#5b9cf700%241%40news.povray.org",
"dateCreated": "2018-09-15T12:11:44+00:00",
"datePublished": "2018-09-15T12:11:44+00:00",
"author": {
"@type": "Person",
"name": "Mike Horvath"
}
}
On 9/15/2018 6:58 AM, Stephen wrote:
> On 15/09/2018 11:43, Mike Horvath wrote:
>> I have textures, but do not know how to orient them with respect to
>> the axial tilt, orbit and sun. Is anyone familiar with how to do this?
>>
>>
>> Mike
>
> For Z up Left handed scenes.
>
>
> texture {
>    pigment {
>      image_map{
>        png "F:\Graphics\B3D Data\Maps\Planets\Earth\EarthMap2.png"
>        interpolate 2
>        map_type 1
>      }
>      rotate    <20.000,0.000,0.000>
>    }
>
> Then for orientation in an orbit. Rotate the sphere the planet texture
> will follow.
>

Thanks. But which direction does the axis tilt with respect to the Sun
on a given day?

Mike
```
 From: Stephen Subject: Re: Planetarium Date: 15 Sep 2018 09:01:34 Message: <5b9d02ae\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#5b9d02ae%241%40news.povray.org",
"dateCreated": "2018-09-15T13:01:34+00:00",
"datePublished": "2018-09-15T13:01:34+00:00",
"author": {
"@type": "Person",
"name": "Stephen"
}
}
On 15/09/2018 13:11, Mike Horvath wrote:
> On 9/15/2018 6:58 AM, Stephen wrote:
>> On 15/09/2018 11:43, Mike Horvath wrote:
>>> I have textures, but do not know how to orient them with respect to
>>> the axial tilt, orbit and sun. Is anyone familiar with how to do this?
>>>
>>>
>>> Mike
>>
>> For Z up Left handed scenes.
>>
>>
>> texture {
>>    pigment {
>>      image_map{
>>        png "F:\Graphics\B3D Data\Maps\Planets\Earth\EarthMap2.png"
>>        interpolate 2
>>        map_type 1
>>      }
>>      rotate    <20.000,0.000,0.000>
>>    }
>>
>> Then for orientation in an orbit. Rotate the sphere the planet texture
>> will follow.
>>
>
> Thanks. But which direction does the axis tilt with respect to the Sun
> on a given day?
>
>

Earth currently has an axial tilt of about 23.4° and the angle does not
change. With respect to the Sun on a given day, it depends on there it
is in its orbit.
https://en.wikipedia.org/wiki/Axial_tilt#Earth

So if you start your Planetarium at the summer or winter equinox. The
mechanics will take care of themselves.
I think. :)

--

Regards
Stephen
```
 From: Mike Horvath Subject: Re: Planetarium Date: 16 Sep 2018 14:31:41 Message: <5b9ea18d@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#5b9ea18d%40news.povray.org",
"dateCreated": "2018-09-16T18:31:41+00:00",
"datePublished": "2018-09-16T18:31:41+00:00",
"author": {
"@type": "Person",
"name": "Mike Horvath"
}
}
Latest version is attached. It is *very* close, but the Earth is off by
about one month's worth of travel.

Here is the document I am using as a guide:

https://ssd.jpl.nasa.gov/txt/aprx_pos_planets.pdf

And I am using this website to compare my render to:

https://in-the-sky.org/solarsystem.php

Set it to JD 2458376.5, which is equivalent to A.D. 2018 Sep 15.

I am not sure where my calculations have gone wrong.

Mike
```

Attachments:

 From: Mike Horvath Subject: Re: Planetarium Date: 16 Sep 2018 14:53:43 Message: <5b9ea6b7\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#5b9ea6b7%241%40news.povray.org",
"dateCreated": "2018-09-16T18:53:43+00:00",
"datePublished": "2018-09-16T18:53:43+00:00",
"author": {
"@type": "Person",
"name": "Mike Horvath"
}
}
On 9/16/2018 2:31 PM, Mike Horvath wrote:
> Latest version is attached. It is *very* close, but the Earth is off by
> about one month's worth of travel.
>
> Here is the document I am using as a guide:
>
> https://ssd.jpl.nasa.gov/txt/aprx_pos_planets.pdf
>
> And I am using this website to compare my render to:
>
> https://in-the-sky.org/solarsystem.php
>
> Set it to JD 2458376.5, which is equivalent to A.D. 2018 Sep 15.
>
> I am not sure where my calculations have gone wrong.
>
>
> Mike

If you zoom out, Jupiter is also in the wrong place, so Maybe my results
are *not* so close after all.

Mike
```
 From: Mike Horvath Subject: Re: Planetarium Date: 16 Sep 2018 22:49:40 Message: <5b9f1644\$1@news.povray.org>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#5b9f1644%241%40news.povray.org",
"dateCreated": "2018-09-17T02:49:40+00:00",
"datePublished": "2018-09-17T02:49:40+00:00",
"author": {
"@type": "Person",
"name": "Mike Horvath"
}
}
Updated the scene. It is working correctly now.

:)

Mike
```

Attachments: