POV-Ray : Newsgroups : povray.binaries.images : Random Color Based on an Image Server Time
17 Nov 2024 08:18:06 EST (-0500)
  Random Color Based on an Image (Message 1 to 1 of 1)  
From: Janet
Subject: Random Color Based on an Image
Date: 2 Jul 2006 14:15:01
Message: <web.44a80ba45eb4846ec83aae370@news.povray.org>
This is a test of random color generation (right side of attached image)
using normal distribution based on an image (left side of attached image).
From POV-Ray help:
Rand_Normal(Mu, Sigma, Stream). Normal distribution.
Parameters:
Mu = Mean.
Sigma = Standard deviation.
Stream = Random number stream.

The Mean and Standard deviation for each color (red, green, blue) were
obtained from the Photoshop Histogram window and divided by 255. If you
don't have Photoshop, I think Gimp, which is free, has histograms too, but
I'm not sure.

#include "rand.inc"
#declare R1 = seed(1);
pigment {rgb vnormalize (<Rand_Normal(196.88/255,26.66/255,R1),
Rand_Normal(157.06/255,23.34/255,R1),
Rand_Normal(134.28/255,35.94/255,R1)> }


Post a reply to this message


Attachments:
Download 'thomastest.jpg' (142 KB)

Preview of image 'thomastest.jpg'
thomastest.jpg


 

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