POV-Ray : Newsgroups : povray.text.scene-files : Planetarium : Re: Planetarium Server Time
26 Apr 2024 02:22:08 EDT (-0400)
  Re: Planetarium  
From: Bald Eagle
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

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