POV-Ray : Newsgroups : povray.newusers : Parametric Object Server Time
26 Dec 2024 06:42:17 EST (-0500)
  Parametric Object (Message 1 to 3 of 3)  
From: kurtz le pirate
Subject: Parametric Object
Date: 6 Apr 2023 10:15:15
Message: <642ed3f3$1@news.povray.org>
Hello,


Documentation POVRay 2.4.5 :

parametric {
 function { FUNCTION_ITEMS },
 function { FUNCTION_ITEMS },
 function { FUNCTION_ITEMS }
 <u1,v1>, <u2,v2>
 ...
 }

I run into the following problem : how to introduce in the three
functions f(x), g(y) and h(z), a parameter that also depends
on u and v ?


For exemple :
parametric {
 function { sin(u)*cos(v)*K }
 function { sin(u)*sin(v)*K }
 function { cos(u)/K }
 ...
 }
with K = k*sin(2*u)*sin(nv)
'k' and 'n' are constants.


I have to add the complete calculation of the parameter 'K' in the three
functions ?





-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

From: kurtz le pirate
Subject: Re: Parametric Object
Date: 6 Apr 2023 10:51:35
Message: <642edc77$1@news.povray.org>
On 06/04/2023 16:15, kurtz le pirate wrote:
> 
> I have to add the complete calculation of the parameter 'K' in the three
> functions ?
> 

Find the solution.

#declare fnK = function(u,v) { ... }
parametric {
 function { fnK(u,v)*(...) }
 function { fnK(u,v)*(...) }
 function { fnK(u,v)*(...) }

Must also specify the parameters for fnK().


-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

From: Bald Eagle
Subject: Re: Parametric Object
Date: 6 Apr 2023 13:55:00
Message: <web.642f06b8535bc3e01f9dae3025979125@news.povray.org>
kurtz le pirate <kur### [at] gmailcom> wrote:

> Find the solution.
>
> #declare fnK = function(u,v) { ... }
> parametric {
>  function { fnK(u,v)*(...) }
>  function { fnK(u,v)*(...) }
>  function { fnK(u,v)*(...) }
>
> Must also specify the parameters for fnK().

Yes.   This is what I often refer to as "daisy-chaining".

https://www.props4shows.co.uk/Portals/1/product/images/prd35729f1d-79d7-4e7b-9f10-8aa76ed62377.jpg

One function depends on the result of another function, which may depend on yet
another function....


Post a reply to this message

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