POV-Ray : Newsgroups : povray.newusers : hexagons : Re: hexagons Server Time
29 Jul 2024 12:23:08 EDT (-0400)
  Re: hexagons  
From: Carl
Date: 30 Nov 2005 14:20:01
Message: <web.438df9c3399d84c170dc520d0@news.povray.org>
"Slime" <fak### [at] emailaddress> wrote:
> Divide by 255 (since this is the maximum possible value). Also set diffuse
> to 0 if you have light sources. If there's still a difference (if POV-Ray's
> output is lighter than the specified color), it may be due to gamma
> correction.

Ok... Here is the code I'm playing with at the moment:

  #include "colors.inc"
  #include "transforms.inc"

  global_settings{assumed_gamma 1}

  camera {location <10,8,-70> look_at <10,8,0> angle 20 right 10/8*x up y}

  plane {y,0 pigment {White} finish {ambient 1}
    rotate -90*x translate 10*z}

  #macro hex(v1,r1,HexColor)
    #local hexa = prism {linear_sweep linear_spline -1, 1, 7,
      <r1,0>, <r1*cos(radians(60)),r1*sin(radians(60))>,
      <-r1*cos(radians(60)),r1*sin(radians(60))>, <-r1,0>,
      <-r1*cos(radians(60)),-r1*sin(radians(60))>,
      <r1*cos(radians(60)),-r1*sin(radians(60))>, <r1,0>};
    object {hexa
      pigment {rgb HexColor/255}
      finish {ambient 1 diffuse 0}
      rotate x*90
      translate v1
    }
  #end

  hex(<10,8,-8>,2,<214,227,240>)

Diffuse is set to 0, there are no light sources, assumed gamma is set to 1,
I'm now dividing by 255 and I'm STILL not getting the color I'm after.  Any
other ideas?

See the latest image I'm posted in the image agea.  The large Hexagon was
rendered in POV-Ray.  I want it the same color as the hexagon closest to
it.  My paint program tells me the one I'm trying to copy is <214,227,240>,
the same value I'm feeding POV-Ray above.  However my paint program tells
me that the color I got was <235,241,248>.  I'm using POV-Ray version 3.6
on a DELL running Windows XP version 2002 if that makes a difference.

I can live without the glow but I'd atleast like to be able to get the color
correct.

Help,
Carl


Post a reply to this message

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