POV-Ray : Newsgroups : povray.text.scene-files : Planetarium Server Time
31 Oct 2024 19:18:09 EDT (-0400)
  Planetarium (Message 1 to 10 of 16)  
Goto Latest 10 Messages Next 6 Messages >>>
From: Mike Horvath
Subject: Planetarium
Date: 13 Sep 2018 19:59:03
Message: <5b9af9c7$1@news.povray.org>
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


Post a reply to this message


Attachments:
Download 'planetarium.pov.txt' (13 KB)

From: Bald Eagle
Subject: Re: Planetarium
Date: 13 Sep 2018 20:45:01
Message: <web.5b9b044cebad83c3458c7afe0@news.povray.org>
Mike Horvath <mik### [at] gmailcom> wrote:

> I believe I have all the pieces already.

Having worked on this already, there may be more to it...

> But how do I convert the
> calculations into the functions a parametric object requires? For
> example, what do I use for u and v?

// 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)}

Phi (U) is the small radius, and Theta  (V) is the large radius.

Just set your Theta range from 0 to .... wherever your planet is.

But a native parametric {} object is going to be ...
SLLLLLLLLLOOOOOOOOOOOOOOWWWWWWWWWwwwwwwwwwww.

If you're going to do that kind of thing, use a polynomial {}.


Post a reply to this message

From: Mike Horvath
Subject: Re: Planetarium
Date: 13 Sep 2018 22:16:07
Message: <5b9b19e7$1@news.povray.org>
On 9/13/2018 8:43 PM, Bald Eagle wrote:
> Mike Horvath <mik### [at] gmailcom> wrote:
> 
>> I believe I have all the pieces already.
> 
> Having worked on this already, there may be more to it...
> 
>> But how do I convert the
>> calculations into the functions a parametric object requires? For
>> example, what do I use for u and v?
> 
> // 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)}
> 
> Phi (U) is the small radius, and Theta  (V) is the large radius.
> 
> Just set your Theta range from 0 to .... wherever your planet is.
> 
> But a native parametric {} object is going to be ...
> SLLLLLLLLLOOOOOOOOOOOOOOWWWWWWWWWwwwwwwwwwww.
> 
> If you're going to do that kind of thing, use a polynomial {}.
> 
> 

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

#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)}


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: Planetarium
Date: 13 Sep 2018 23:30:31
Message: <5b9b2b57$1@news.povray.org>
On 9/13/2018 8:43 PM, Bald Eagle wrote:
> But a native parametric {} object is going to be ...
> SLLLLLLLLLOOOOOOOOOOOOOOWWWWWWWWWwwwwwwwwwww.
> 

Am I misremembering, or is there an include file that can turn 
parametric objects into meshes?


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: Planetarium
Date: 13 Sep 2018 23:43:06
Message: <5b9b2e4a$1@news.povray.org>
I get an error when rendering the attached scene that I don't understand.

'"meshmaker.inc" line 688: Parse Error: Array subscript out of range'

Does anyone have any idea what is the cause of this? Thanks!


Mike


Post a reply to this message


Attachments:
Download 'orrery_minimum.pov.txt' (11 KB)

From: Mike Horvath
Subject: Re: Planetarium
Date: 14 Sep 2018 03:09:29
Message: <5b9b5ea9$1@news.povray.org>
On 9/13/2018 11:43 PM, Mike Horvath wrote:
> I get an error when rendering the attached scene that I don't understand.
> 
> '"meshmaker.inc" line 688: Parse Error: Array subscript out of range'
> 
> Does anyone have any idea what is the cause of this? Thanks!
> 
> 
> Mike


Never mind. I was confused about the Iter_U and Iter_V parameters. (The 
docs are not very verbose.) It is working, but I think using a sphere 
sweep would be easier and just as nice.


Mike


Post a reply to this message

From: Bald Eagle
Subject: Re: Planetarium
Date: 14 Sep 2018 09:40:01
Message: <web.5b9bb965ebad83c3c437ac910@news.povray.org>
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
 fade_distance 20
 fade_power 2
}

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
SphereRadius pigment {White}}
    #end
#end


Post a reply to this message

From: Mike Horvath
Subject: Re: Planetarium
Date: 15 Sep 2018 05:26:14
Message: <5b9cd036$1@news.povray.org>
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


The latest version of the scene can now be downloaded from the Object 
Collection.

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


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: Planetarium
Date: 15 Sep 2018 06:43:35
Message: <5b9ce257$1@news.povray.org>
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


Post a reply to this message

From: Stephen
Subject: Re: Planetarium
Date: 15 Sep 2018 06:58:10
Message: <5b9ce5c2$1@news.povray.org>
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


Post a reply to this message

Goto Latest 10 Messages Next 6 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.