POV-Ray : Newsgroups : povray.unix : gradient problem vers. 3.1g Server Time
28 Jul 2024 14:25:27 EDT (-0400)
  gradient problem vers. 3.1g (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Lothar Esser
Subject: gradient problem vers. 3.1g
Date: 19 Sep 2001 19:22:57
Message: <3BA928FF.AD122CBE@helix.nih.gov>
Hi,

   I have encountered a problem with gradient in a pigment statement
with color_map.
There has been some discussion in povray.newusers so I try to make it
short.
In povray version 3.1g using all unix sytems at my disposal ( irix, osf,
linux ) the same error occurs.
The gradient function does not work properly. Is this a know bug ?
It seems to work in povray 3.5 on windows(?). ( Thanks to Trevor Quayle
)
Any suggestions ?
( If it is not clear what I mean please look at the cylinders in
povray.binary.image with the subject
Gradient for Lothar by Trevor Quayle. His example works. For my problem
look at my reply.
Sorry for the .tga file. ( I don't post images too often ). Clearly
gradient does not work under unix.

Thanks for any comments.

   Lothar.

--
Dr. Lothar Esser
NIH / NCI
Tel. 301-435-6163
email les### [at] helixnihgov


Post a reply to this message

From: Ron Parker
Subject: Re: gradient problem vers. 3.1g
Date: 20 Sep 2001 10:36:07
Message: <slrn9qjvmo.c0u.ron.parker@fwi.com>
On Wed, 19 Sep 2001 19:23:43 -0400, Lothar Esser wrote:
>Hi,
>
>   I have encountered a problem with gradient in a pigment statement
>with color_map.
>There has been some discussion in povray.newusers so I try to make it
>short.
>In povray version 3.1g using all unix sytems at my disposal ( irix, osf,
>linux ) the same error occurs.
>The gradient function does not work properly. Is this a know bug ?
>It seems to work in povray 3.5 on windows(?). ( Thanks to Trevor Quayle

Actually, it was a problem in anything before version 3.5, not specific
to Unix or anything else.  We've never figured out exactly what whoever 
wrote that code was thinking, but any vector other than x, y, or z would
not have given you correct results.

--
#macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
_)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

From: Lothar Esser
Subject: Re: gradient problem vers. 3.1g
Date: 20 Sep 2001 11:14:10
Message: <3BAA07F0.A3DFA545@helix.nih.gov>
Ron Parker wrote:

> Actually, it was a problem in anything before version 3.5, not specific
> to Unix or anything else.  We've never figured out exactly what whoever
> wrote that code was thinking, but any vector other than x, y, or z would
> not have given you correct results.

  Does this mean that I don't need to worry about it ? I spent the whole day
yesterday to figure out how to compile povray 3.1 with gcc or cc and with  which
options and
looked through the code to find something that would indicate a problem.
However without success.
Since there seem to be no patches does it mean I have to wait for the unix version
of 3.5 ?

Another question, I noticed that lots of people have an enormous amount of povray/c
grable in their
signature. Is the a security thing or a sign of a full hard drive ?

Thanks to all who have helped.

Lothar

--
Dr. Lothar Esser
NIH / NCI
Tel. 301-435-6163
email les### [at] helixnihgov


Post a reply to this message

From: Ron Parker
Subject: Re: gradient problem vers. 3.1g
Date: 20 Sep 2001 11:25:30
Message: <slrn9qk2jc.c3k.ron.parker@fwi.com>
On Thu, 20 Sep 2001 11:14:56 -0400, Lothar Esser wrote:
>Since there seem to be no patches does it mean I have to wait for the unix version
>of 3.5 ?

You could use an axis-aligned gradient with John VanSickle's Reorient macro.

>Another question, I noticed that lots of people have an enormous amount of povray/c
>grable in their
>signature. Is the a security thing or a sign of a full hard drive ?

It's intentional.  Try rendering them.

-- 
plane{-z,-3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip x}rotate
z*60#local a=a-1;#end translate-9*x}pigment{rgb 1}}light_source{-9red 1rotate 60
*z}light_source{-9rgb y rotate-z*60}light_source{9-z*18rgb z}text{ttf"arial.ttf"
"RP".01,0translate-<.6,.4,.02>pigment{bozo}}light_source{-z*3rgb-.2}//Ron Parker


Post a reply to this message

From: Lothar Esser
Subject: Re: gradient problem vers. 3.1g
Date: 20 Sep 2001 11:32:09
Message: <3BAA0C27.7C9FBFF6@helix.nih.gov>
Ron Parker wrote:

> It's intentional.  Try rendering them.

> plane{-z,-3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip x}rotate
> z*60#local a=a-1;#end translate-9*x}pigment{rgb 1}}light_source{-9red 1rotate 60
> *z}light_source{-9rgb y rotate-z*60}light_source{9-z*18rgb z}text{ttf"arial.ttf"
> "RP".01,0translate-<.6,.4,.02>pigment{bozo}}light_source{-z*3rgb-.2}//Ron Parker

Cool.


Post a reply to this message

From: Ron Parker
Subject: Re: gradient problem vers. 3.1g
Date: 20 Sep 2001 11:43:34
Message: <slrn9qk3l8.ds3.ron.parker@fwi.com>
On Thu, 20 Sep 2001 11:32:55 -0400, Lothar Esser wrote:
>Ron Parker wrote:
>
>> It's intentional.  Try rendering them.
>
>Cool.

That one's one of my less cool ones.  Try this one.

-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbt 1}hollow interior{media{emission T}}finish{
reflection.1}}#end Z(-x-x.2y)Z(-x-x.4x)camera{location z*-10rotate x*90}


Post a reply to this message

From: Warp
Subject: Re: gradient problem vers. 3.1g
Date: 20 Sep 2001 12:09:15
Message: <3baa14aa@news.povray.org>
Try mine... :P

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

From: Lothar Esser
Subject: Re: gradient problem vers. 3.1g
Date: 20 Sep 2001 12:13:59
Message: <3BAA15F4.8B232329@helix.nih.gov>
Ron Parker wrote:

> --
> #macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
> -z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
> P(z+a)P(z-a)R(-z-z-x a)pigment{rgbt 1}hollow interior{media{emission T}}finish{
> reflection.1}}#end Z(-x-x.2y)Z(-x-x.4x)camera{location z*-10rotate x*90}

Ultra cool !!! Very hard to understand. If you have time what is -x-x.2y ? I know x
= <1,0,0> and
a vector.x is the x component of vector but x.2y ?? I can probably read the manual
- I still think only in pov3.0.2 :)
LE


Post a reply to this message

From: Ron Parker
Subject: Re: gradient problem vers. 3.1g
Date: 20 Sep 2001 12:48:45
Message: <slrn9qk7ff.du4.ron.parker@fwi.com>
On Thu, 20 Sep 2001 12:14:44 -0400, Lothar Esser wrote:
>Ron Parker wrote:
>
>> --
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbt 1}hollow interior{media{emission T}}finish{
reflection.1}}#end Z(-x-x.2y)Z(-x-x.4x)camera{location z*-10rotate x*90}

>
>Ultra cool !!! Very hard to understand. If you have time what is -x-x.2y ? I know x
>= <1,0,0> and
>a vector.x is the x component of vector but x.2y ?? I can probably read the manual
>- I still think only in pov3.0.2 :)

-x-x.2y takes advantage of the parser in interesting ways.  It's really three
values: -2*x, 0.2, y.  Notice that Z takes three parameters, per its 
declaration at the end of the second line.  The first parameter, -2*x, is
a constant.  Its use here is to avoid the use of #declare (note that there
are no #declare or #local statements anywhere in there) in giving the 
constant 'a' a value.  The next parameter, .2 (or .4) is the radius of the
tube which contains the media.  The last parameter is the color: x is red,
y is green, and z is blue (since x is really <1,0,0> and rgb <1,0,0> is red.)
The small green media inside the red media gives an effect that looks like 
an orange glow.

Others here have signatures that are every bit as convoluted; it's an 
interesting game to try to understand some of them, and some of them
are far better than anything I've done.  I actually have six different 
signatures that are selected randomly.  You can collect the whole set 
by just finding enough postings by me.  (or look at the end of this 
post for the whole set)

All of this sig stuff started with Warp's sig, and generated several 
conversations in povray.general sometime in the past few months, mostly
containing evil tricks to squeeze even more characters out of a script.  
Also some conversations in povray.off-topic, but those would have expired 
by now.  I think (though I'm not sure) that the sig at the end of this
post is one that I never told anyone about and just hoped people would
notice in the rotation.

#local R=<7084844682857967,0787982,826975826580>;#macro L(P)concat(#while(P)chr(
mod(P,100)),#local P=P/100;#end"")#end background{rgb 1}text{ttf L(R.x)L(R.y)0,0
translate<-.8,0,-1>}text{ttf L(R.x)L(R.z)0,0translate<-1.6,-.75,-1>}sphere{z/9e3
4/26/2001finish{reflection 1}}//ron.parker@povray.org My opinions, nobody else's

#local R=rgb 99;#local P=R-R;#local F=pigment{gradient x}box{0,1pigment{gradient
y pigment_map{[.5F pigment_map{[.3R][.3F color_map{[.15red 99][.15P]}rotate z*45
translate x]}]#local H=pigment{gradient y color_map{[.5P][.5R]}scale 1/3}[.5F
pigment_map{[.3R][.3H][.7H][.7R]}]}}}camera{location.5-3*z}//only my opinions

plane{-z,-3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip x}rotate
z*60#local a=a-1;#end translate-9*x}pigment{rgb 1}}light_source{-9red 1rotate 60
*z}light_source{-9rgb y rotate-z*60}light_source{9-z*18rgb z}text{ttf"arial.ttf"
"RP".01,0translate-<.6,.4,.02>pigment{bozo}}light_source{-z*3rgb-.2}//Ron Parker

#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbt 1}hollow interior{media{emission T}}finish{
reflection.1}}#end Z(-x-x.2y)Z(-x-x.4x)camera{location z*-10rotate x*90}

#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission 3-T}}}#end 
Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}

--
#macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
_)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

From: Lothar Esser
Subject: Re: gradient problem vers. 3.1g
Date: 20 Sep 2001 13:41:44
Message: <3BAA2A86.B5475734@helix.nih.gov>
Very nice signatures. Haven't seen Warps yet.

LE


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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