POV-Ray : Newsgroups : povray.beta-test : Isosurface problem Server Time
30 Jul 2024 04:15:07 EDT (-0400)
  Isosurface problem (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Rico
Subject: Isosurface problem
Date: 21 Dec 2001 11:17:33
Message: <3c23609d$1@news.povray.org>
Am I too dummy or is it a bug with pov 3.5 beta 8 and 9 ?
This scene rendered perfectly with pov 3.1g. So, I tried to transpose it to
pov 3.5, but...
Here is a part of the scene :

#declare Pig = function { pigment { wrinkles color_map { [0 rgb 1][1 rgb
0] } } }
#declare Pq =
  isosurface {
    function { y + 0.22 + 0.05*Pig(10*x,10*y,10*z) }
    threshold 0.5
    bounded_by { box { <-0.9, 0, -0.9>, <0.9, 0.5, 0.9> } }
    scale <1, 0.5, 1>
    translate 0.1*y
  }

And the corresponding message error :

  isosurface {
    function { y + 0.22 + 0.05*Pig(10*x,10*y,10*z) } <----ERROR
Parse Error: Expected '.', } found instead

Another attempt with a predefined function :

#declare Pq =
  isosurface {
    function { y + 0.22 + 0.05*f_noise3d(10*x,10*y,10*z) }
    threshold 0.5
    bounded_by { box { <-0.9, 0, -0.9>, <0.9, 0.5, 0.9> } }
    scale <1, 0.5, 1>
    translate 0.1*y
  }

And the resulting message :

  isosurface {
    function { y + 0.22 + 0.05*f_noise3d( <----ERROR
Parse Error: Expected 'operator', ( found instead

A clue : in the scene window, the words "f_noise3d", "f_torus", etc are not
recognized as keywords (povray doesn't give them the keyword colour).
Is it a real problem or am I completely off-topic ?

Rico


Post a reply to this message

From:
Subject: Re: Isosurface problem
Date: 21 Dec 2001 11:24:27
Message: <47o62u8ikfk9f6mq0n775epv4bt3kuc0st@4ax.com>
On Fri, 21 Dec 2001 17:17:05 +0100, "Rico" <Eri### [at] wanadoofr> wrote:
> Am I too dummy or is it a bug with pov 3.5 beta 8 and 9 ?
> This scene rendered perfectly with pov 3.1g. So, I tried to transpose it to
> pov 3.5, but...

How could it render with pov 3.1g when there wasn't isosurface in 3.1 ?
You are talking probably about MegaPOV but you shouldn't expect exactly the same
behavour becouse megapov was only _unofficial_ set patches

> And the corresponding message error :
>
>  isosurface {
>    function { y + 0.22 + 0.05*Pig(10*x,10*y,10*z) } <----ERROR
> Parse Error: Expected '.', } found instead

The message is right. Pig() returns vector (or color). You should add .gray
operator or change pigment to pattern if you want MEGAPOV's behaviour.

> And the resulting message :
>
>  isosurface {
>    function { y + 0.22 + 0.05*f_noise3d( <----ERROR
> Parse Error: Expected 'operator', ( found instead

Have you included "functions.inc" to this script ?

> Is it a real problem or am I completely off-topic ?

not completly but almost :-)

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)&_((x+y)*.7,z,.1)&_((x+y+2)*.7,z,.1)&_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

From: Trevor Quayle
Subject: Re: Isosurface problem
Date: 21 Dec 2001 11:25:48
Message: <3c23628c@news.povray.org>
>
> A clue : in the scene window, the words "f_noise3d", "f_torus", etc are
not
> recognized as keywords (povray doesn't give them the keyword colour).
> Is it a real problem or am I completely off-topic ?
>
> Rico
>
>

Did you try

#include "functions.inc"

-tgq


Post a reply to this message

From: Trevor Quayle
Subject: Re: Isosurface problem
Date: 21 Dec 2001 11:31:02
Message: <3c2363c6@news.povray.org>
> #declare Pig = function { pigment { wrinkles color_map { [0 rgb 1][1 rgb
> 0] } } }
> #declare Pq =
>   isosurface {
>     function { y + 0.22 + 0.05*Pig(10*x,10*y,10*z) }
>     threshold 0.5
>     bounded_by { box { <-0.9, 0, -0.9>, <0.9, 0.5, 0.9> } }
>     scale <1, 0.5, 1>
>     translate 0.1*y
>   }
>
> And the corresponding message error :
>
>   isosurface {
>     function { y + 0.22 + 0.05*Pig(10*x,10*y,10*z) } <----ERROR
> Parse Error: Expected '.', } found instead

from 6.7.11.15.1:

When using the identifier, you have to specify which component of the color
vector should be used. To do this, the dot notation is used:
Function(x,y,z).red


Post a reply to this message

From: Rico
Subject: Re: Isosurface problem
Date: 21 Dec 2001 11:47:54
Message: <3c2367ba@news.povray.org>
> How could it render with pov 3.1g when there wasn't isosurface in 3.1 ?
> You are talking probably about MegaPOV but you shouldn't expect exactly
the same
> behavour becouse megapov was only _unofficial_ set patches

You are totally right

> Have you included "functions.inc" to this script ?

Uuuuu.... No, I didn't (first time I hear about this file)

> > Is it a real problem or am I completely off-topic ?
>
> not completly but almost :-)

Hem. Thanks but I DO am completely off-topic. Sorry for this unnecessary
thread.


Post a reply to this message

From: Warp
Subject: Re: Isosurface problem
Date: 21 Dec 2001 12:13:00
Message: <3c236d9c@news.povray.org>

: The message is right. Pig() returns vector (or color). You should add .gray
: operator or change pigment to pattern if you want MEGAPOV's behaviour.

  The latter is, IMHO, better. Why overburdern the engine with color
calculations when you will not ne using the colors for anything?

-- 
#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:
Subject: Re: Isosurface problem
Date: 21 Dec 2001 12:39:13
Message: <bpr62ugr9f0hn94dh8arhcv5qvauado608@4ax.com>
On 21 Dec 2001 12:13:00 -0500, Warp <war### [at] tagpovrayorg> wrote:

>W?odzimierz ABX Skiba <abx### [at] babilonorg> wrote:
>: The message is right. Pig() returns vector (or color). You should add .gray
>: operator or change pigment to pattern if you want MEGAPOV's behaviour.
>
>  The latter is, IMHO, better. Why overburdern the engine with color
> calculations when you will not ne using the colors for anything?

Of course in almost all cases pattern is better but sometimes you can't use only
pattern becouse you are interested in gray representation of complicated pigment
with pigment_maps. It seems simpler (but not faster for engine) to use pigment
then rewrite everything with pattern.

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)&_((x+y)*.7,z,.1)&_((x+y+2)*.7,z,.1)&_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

From: Marc-Hendrik Bremer
Subject: Re: Isosurface problem
Date: 21 Dec 2001 13:01:42
Message: <3c237906@news.povray.org>

<47o62u8ikfk9f6mq0n775epv4bt3kuc0st@4ax.com>...
>
>The message is right. Pig() returns vector (or color). You should add .gray
>operator or change pigment to pattern if you want MEGAPOV's behaviour.


AFAIK you should use .hf instead of .gray if you really want what MegaPov
gave you. That's at least my experience and I think I read it here, too.

Marc-Hendrik


Post a reply to this message

From:
Subject: Re: Isosurface problem
Date: 21 Dec 2001 13:06:29
Message: <kcu62u0p4246gdq6vgjaabqp0cjin8ucss@4ax.com>
On Fri, 21 Dec 2001 19:01:36 +0100, "Marc-Hendrik Bremer"
<Mar### [at] t-onlinede> wrote:
> AFAIK you should use .hf instead of .gray if you really want what MegaPov
> gave you. That's at least my experience and I think I read it here, too.

You can read at 6.5.4.2 chapter that hf value = (Red + Green/255)*0.996093. So
it not uses Blue for calculation while iirc megapov's engine returned gray value
which is function of all red, green and blue components.

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)&_((x+y)*.7,z,.1)&_((x+y+2)*.7,z,.1)&_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Isosurface problem
Date: 21 Dec 2001 13:16:43
Message: <3c237c8b@news.povray.org>

Skiba <abx### [at] babilonorg>  wrote:

> You can read at 6.5.4.2 chapter that hf value = (Red + Green/255)*0.996093. So
> it not uses Blue for calculation while iirc megapov's engine returned gray
value
> which is function of all red, green and blue components.

No, you are mistaken.  MegaPOV uses the .hf formula (see isofunc.c function
iso_pigment).


    Thorsten


____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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