POV-Ray : Newsgroups : povray.newusers : get an color from a color_map : get an color from a color_map Server Time
30 Jul 2024 02:26:44 EDT (-0400)
  get an color from a color_map  
From: Rafal 'Raf256' Maj
Date: 20 Nov 2004 13:02:13
Message: <Xns95A7C1F4A1CCEraf256com@203.29.75.35>
I have a color map like:

#declare resr2_map1 = // power + -  
color_map { 
  [0.00 rgb z]
  [0.25 rgb z*.4 + .4 + .1*x]
  [0.50 rgb 1]
  [0.75 rgb x*.4 + .4 + .1*z]
  [1.00 rgb x]
}

now I want to do sometghing like:

sphere { 0 1 pigment { resr2_map1(0.3) } }

- to take color of value 0.3 from that color map and use it.

Is there any beter way of doing this other then writting statement like:

sphere { 0 1 
  pigment { function { 0.3 } color_map{ resr2_map1 } } 
}

?



-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

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