POV-Ray : Newsgroups : povray.text.scene-files : Planetarium : Re: Planetarium Server Time22 May 2024 02:07:36 EDT (-0400)
 Re: Planetarium
 From: Bald Eagle Date: 13 Sep 2018 20:45:01 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"dateCreated": "2018-09-14T00:45:01+00:00",
"datePublished": "2018-09-14T00:45:01+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
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 {}.
```