|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Can someone show me the exact syntax needed for declaring a function? Here's
the old version:
#declare FUNC1=function {"sphere",<4>}
Thanks much.,
D.
--
dhm### [at] mediaonenet
www.casdn.neu.edu/~dmiller
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Dennis Milller" <dhm### [at] mediaonenet> wrote in message
news:3b982960@news.povray.org...
> Can someone show me the exact syntax needed for declaring a function?
Here's
> the old version:
> #declare FUNC1=function {"sphere",<4>}
Hopefully I can.
#declare FUNC1=function {f_sphere (x,y,z,1)}
I remembered that from the files i_internal.pov and functions.inc, so have a
look at those. The internalized numbering is shown in functions.inc.
Bob H.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Bob H. <omn### [at] msncom> wrote:
: #declare FUNC1=function {f_sphere (x,y,z,1)}
Remember to #include "functions.inc" before that.
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks. Does the addition of "x,y,z" in the new syntax change any aspect of
the function and is it even required? I'm trying to duplicate an exact MP
scene that used the line below (with no x,y,z). I assume that "x,y,z" was
"understood" in the older syntax...
Thanks again,
D.
"Bob H." <omn### [at] msncom> wrote in message
news:3b983f14$1@news.povray.org...
> "Dennis Milller" <dhm### [at] mediaonenet> wrote in message
> news:3b982960@news.povray.org...
> > Can someone show me the exact syntax needed for declaring a function?
> Here's
> > the old version:
> > #declare FUNC1=function {"sphere",<4>}
>
> Hopefully I can.
>
> #declare FUNC1=function {f_sphere (x,y,z,1)}
>
> I remembered that from the files i_internal.pov and functions.inc, so have
a
> look at those. The internalized numbering is shown in functions.inc.
>
> Bob H.
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Dennis Milller <dhm### [at] mediaonenet> wrote:
: Thanks. Does the addition of "x,y,z" in the new syntax change any aspect of
: the function and is it even required?
I think you misunderstand. It's not like they thought "hey, we need to
convert the sphere function to pov3.5; how about adding 'x,y,z' just in case
and because it looks cool?".
All the functions have the same form, that is, the 'x,y,z' space coordinates
where to calculate the function plus possibly some extra parameters which
define the shape (eg. the radius). The function could not calculate the correct
value if it doesn't have the x, y and z values (how else can it know where
to calculate?).
And besides, this allows to make modifications to the sphere easily. Just
imagine what do these do: f_sphere(x^2,y,z,1), f_sphere(x,0,z,1), etc.
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3b982960@news.povray.org> , "Dennis Milller"
<dhm### [at] mediaonenet> wrote:
> Can someone show me the exact syntax needed for declaring a function? Here's
> the old version:
> #declare FUNC1=function {"sphere",<4>}
Please check the documentation (under functions, not under isosurfaces), it
has lot more details than the megaPOV docs had, and it explains all syntax
variants.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Dennis Milller who wrote:
>Thanks. Does the addition of "x,y,z" in the new syntax change any aspect of
>the function and is it even required? I'm trying to duplicate an exact MP
>scene that used the line below (with no x,y,z). I assume that "x,y,z" was
>"understood" in the older syntax...
With the MegaPOV syntax you had to #declare your imported functions if
you wanted to use them in expressions, and then you would apply the
"x,y,z" when you used it, like
#declare FUNC1=function {"sphere",<4>}
isosurface {function {FUNC1(x,y,z) + noise3d(...
[If you were using the function without any modification at all you
could say
isosurface {function { "Sphere" <0.4>}
in which case the x,y,z was "understood"]
With the new syntax you are never forced to #declare the function. You
can use it directly in expressions if you would prefer, like
#include "functions.inc"
isosurface {function {f_sphere(x,y,z,4) + f_noise3d(...
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|