POV-Ray : Newsgroups : povray.text.scene-files : Relationship pigment made of two functions Server Time
22 Dec 2024 22:23:46 EST (-0500)
  Relationship pigment made of two functions (Message 1 to 3 of 3)  
From: Brendan Ryan
Subject: Relationship pigment made of two functions
Date: 12 Jul 2002 00:05:50
Message: <3D2E5395.4030906@global2000.net>
/*
I made a uv mapped sphere with a function as its pigment and another one 
as its normal.  Actually, there are two functions combined into one for 
the pigment.  It's on my web site.  There's a link to the picture on the 
povray page.  It makes a nice wallpaper.  The sin(100*y) is commented 
out because it's doesn't affect anything.  If only one function is used 
for the pigment, it would give a checkered appearance.  The checkered 
patterns for the positive and negative versions get combined by squaring 
the function and then using a negative sign.
*/

//Brendan Ryan

#declare sub_pattern =
function { sin(30*x) * /*sin(100*y) **/ sin(30*z) }

#declare pigpattern =
function { -pow(sub_pattern(x,y,z),2) }

#declare norpattern =
function { sin(40*x*y) }

sphere { <0,0,0>, 1
uv_mapping
pigment { function { pigpattern(x,y,z) } rotate 90*x }
pigment { color rgb <0,0,1> }
normal { function { norpattern(x,y,z) } }
}

//Brendan Ryan


Post a reply to this message

From:
Subject: Re: Relationship pigment made of two functions
Date: 12 Jul 2002 02:46:22
Message: <klusiugcqq6g216vj5070nogrp1mbf9hgh@4ax.com>
On Thu, 11 Jul 2002 23:57:09 -0400, Brendan Ryan <ary### [at] global2000net> wrote:
> It's on my web site.

Where is your website ?

> There's a link to the picture on the povray page.

Your scrript results as black image. Should be something added to it to
render?

ABX


Post a reply to this message

From: Brendan Ryan
Subject: Re: Relationship pigment made of two functions
Date: 13 Jul 2002 21:41:52
Message: <3D30D4C4.6060003@global2000.net>
> Where is your website ?
> 

http://www.geocities.com/bryanhf2002


> Your scrript results as black image. Should be something added to it to
> render?


I used the camera and light_source from one of the insert menu entries 
as a base because I was trying out different new features of povray 3.5. 
  If you read the script, you would see that it's a sphere at the origin 
and with a radius of 1, and then put in whatever camera and light_source 
you prefer to use for such scenes.

camera {
   location  <0.0, 2.0, 2.0>
   look_at   <0.0, 0.0,  0.0>
   right     x*image_width/image_height
}

//background { color rgb <0,1,1> }

// create a regular point light source
light_source {
   0*x                  // light's position (translated below)
   color rgb <1,1,1>    // light's color
   translate <1, 20, 30>
}


Brendan


Post a reply to this message

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