POV-Ray : Newsgroups : povray.general : normal/slope question : Re: normal/slope question Server Time
7 Aug 2024 01:23:00 EDT (-0400)
  Re: normal/slope question  
From:
Date: 19 Dec 2001 09:11:20
Message: <jq712ugbg4104l5q1nus1g5gnri28cnt0h@4ax.com>
On Wed, 19 Dec 2001 13:46:11 +0100, "Simon Adameit" <gom### [at] gmxde> wrote:
>Hi, I want to get the directions of the normals of a surface to use them in
>a pigment. I thought that I could use a combination of 3 slope patterns to
>do that
>but I don't know how to get the direction when I have 3 vectors and the
>degrees in that it stands to them.

I'm not sure I understand slope pattern well but perhaps you expect something
like this ?

#version 3.5;
global_settings{
  assumed_gamma 1.0
  noise_generator 2
}
background{color rgb 1}
camera{
  orthographic
  location -2*z
  direction z
  right x*image_width/image_height
  up y
  sky y
  look_at z
}
light_source{
  <-30,30,-30>
  color rgb 1
}
sphere{
   0  .5
   normal{granite}
   pigment{
     average
     pigment_map{
       [3 slope x color_map{[0 rgb 0][1 red 3]}]
       [3 slope y color_map{[0 rgb 0][1 green 3]}]
       [3 slope z color_map{[0 rgb 0][1 blue 3]}]
     }
   }
 }

// ABX


Post a reply to this message

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