POV-Ray : Newsgroups : povray.text.scene-files : Planetarium : Re: Planetarium Server Time
4 Feb 2023 21:01:52 EST (-0500)
  Re: Planetarium  
From: Mike Horvath
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

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