|
|
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
|
|