POV-Ray : Newsgroups : povray.newusers : nb:question about functions Server Time
5 Nov 2024 07:19:32 EST (-0500)
  nb:question about functions (Message 1 to 9 of 9)  
From: Petra Mueller
Subject: nb:question about functions
Date: 29 May 2002 17:05:36
Message: <020529.230435.pn.1@ID-50671.user.dfncis.de>
Hallo,

a Parse-Error is produced at the call of these
function examples with Pov3.5.

# declare MyTorus = function for {"torus" < 1, 0.3 >}
# declare MySphere = function {"sphere" < 1 >}
isosurface { function {MyTorus (x, y, z), & MySphere (x, y +0.5, z)}

# declare MyTorus = { function "torus" < < ---- ERROR
Parse Error: Expected 'operand' < found instead

Isn't this syntax supported by POV3.5?

-=Petra=-


Post a reply to this message

From: Warp
Subject: Re: nb:question about functions
Date: 29 May 2002 17:26:21
Message: <3cf5477c@news.povray.org>
Petra Mueller <fr-### [at] gmxde> wrote:
> Isn't this syntax supported by POV3.5?

  You should read the documentation to see the syntax for functions.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Christoph Hormann
Subject: Re: nb:question about functions
Date: 29 May 2002 17:26:45
Message: <3CF54795.70D1055F@gmx.de>
Petra Mueller wrote:
> 
> Hallo,
> 
> a Parse-Error is produced at the call of these
> function examples with Pov3.5.
> 
> # declare MyTorus = function for {"torus" < 1, 0.3 >}
> # declare MySphere = function {"sphere" < 1 >}
> isosurface { function {MyTorus (x, y, z), & MySphere (x, y +0.5, z)}
> 
> # declare MyTorus = { function "torus" < < ---- ERROR
> Parse Error: Expected 'operand' < found instead
> 
> Isn't this syntax supported by POV3.5?

This is no valid code, not even for megapov.  Have a look at the
documentation and the sample scenes for correct declaration of functions
and use in isosurfaces.

You probably want something like:

#include "functions.inc"

#declare MySphere = function { f_sphere(x, y, z, 1) }
#declare MyTorus = function { f_torus(x, y, z, 1, 0.3) }

isosurface { function { min(MyTorus(x, y, z), MySphere(x, y +0.5, z)) }


Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 05 May. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Petra Mueller
Subject: Re: nb:question about functions
Date: 29 May 2002 18:42:33
Message: <020530.000602.pn.2@ID-50671.user.dfncis.de>
Warp <war### [at] tagpovrayorg>:

>   You should read the documentation to see the syntax for functions.

this is was, however have difficulties understanding the engliche
documentation I. sorry.
I hope, my is English understandably.

-=Petra=-


Post a reply to this message

From: Petra Mueller
Subject: Re: nb:question about functions
Date: 29 May 2002 18:42:34
Message: <020530.004145.pn.3@ID-50671.user.dfncis.de>
Christoph Hormann <chr### [at] gmxde>:

>> # declare MyTorus = function for {"torus" < 1, 0.3 >}

my translator has this stupid 'for' for this purpose put.
The line should read:
> # declare MyTorus = function  {"torus" < 1, 0.3 >}
sorry.


aufmerksam und machte einen Versuch mit "wt_stb.pov".

Ich hatte deine Einleitung so verstanden, das Pov3.5 hierzu kompatibel


-=Petra=-


Post a reply to this message

From: Christoph Hormann
Subject: Re: nb:question about functions
Date: 30 May 2002 03:46:25
Message: <3CF5D8D1.15B1A1EF@gmx.de>
Petra Mueller wrote:
> 
> [...]
> 

> aufmerksam und machte einen Versuch mit "wt_stb.pov".

> Ich hatte deine Einleitung so verstanden, das Pov3.5 hierzu kompatibel


Hmm, ich werde zur Klarstellung '#version unofficial MegaPov 0.7;'






Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 05 May. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Warp
Subject: Re: nb:question about functions
Date: 30 May 2002 08:08:24
Message: <3cf61637@news.povray.org>
How about discussing that in povray.international?

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Tim Nikias
Subject: Re: nb:question about functions
Date: 30 May 2002 19:25:34
Message: <3CF6B4DD.35F63091@gmx.de>
Christoph mentioned that in his last sentence...

Its a pity that we haven't found the universal
language yet. It would make raytracing that
much easier... ;)

Warp wrote:

>   How about discussing that in povray.international?
>

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde


Post a reply to this message

From: Jan Walzer
Subject: Re: nb:question about functions [OT]
Date: 2 Jun 2002 08:01:28
Message: <3cfa0918@news.povray.org>
"Tim Nikias" <tim### [at] gmxde> wrote:

> Its a pity that we haven't found the universal
> language yet. It would make raytracing that
> much easier... ;)

what ? ...
POV-SDL is not the universal language ?

#declare i=3;
#while (i>0)
#debug "wondering ...\n"
#declare i=i-1;
#end


Post a reply to this message

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