|
|
"Kenneth" <kdw### [at] gmailcom> wrote:
> That is some ingenious coding! I haven't run your SDL code yet, but will do so
> ASAP-- just to see the graphing results on MY computer screen ;-) Your coding
> skills continue to amaze me.
I hadn't ever really understood functions - I'm not sure why - probably some
frustrating syntactical thing - until I worked on my pattern value scenes and
jr's moving media. W. Pokorny truly helped clarify what was going on, and from
time to time I just find the functions easier to implement than a macro.
You also can't make a pigment pattern with a macro - it _has_ to be done with a
function, so that the global <x,y,z> coordinates are what control the pattern
values.
"Each of the various pattern types available is in fact a mathematical function
that takes any x, y, z location and turns it into a number between 0.0 and 1.0
inclusive. That number is used to specify what mix of colors to use from the
color map."
http://wiki.povray.org/content/Reference:Color_Map
It's a giant headache, but I just keep practicing. 30 error messages later, I
come up with something that works... :D
> I'm still assessing the 'totality' of how and what those Wikipedia equations +
> POV-ray do as a combo, to get a nice and correct image file. It seems to me that
> it follows these steps:
We do a lot of speculating here, and what I've found is that (for me, anyway) a
diagram of what's happening really helps me follow the text. Especially when
there's a way that works correctly and a way that doesn't.
The next step that really cements the concept in my head is to sit down and code
it out. If I want to show how POV-Ray does something, then I should be able to
scribble out some SDL that actually does what I'm talking about. Say, take some
sphere with a mid-range color and convert the colors to sRGB for comparison.
Then convert the colors back to RGB and make sure the spheres are exactly the
same color. Compare any user-defined formulas to the internal conversion done
with the srgb keyword by listing the eval_pigment results of both spheres...
It's really only when I start doing the above that I really start to understand
the concepts, the limitations, and the problems. And of course, there's some
unexpected bug that's been lurking in there... ;)
It's really a slow and painful thing to do, but the parser is like the military
school, and I'm the remedial student. And I just keep running the gauntlet
until I get it right, or at least I get something that runs with no errors. ;)
So, my "coding skill" is really just the result of 8 years of parser (and
clipka) enforced aversion therapy. :D
Maybe reading some of these discussions will help.
http://wiki.povray.org/content/User:Clipka/Gamma
http://www.povray.org/documentation/view/3.8.0/260/
http://wiki.povray.org/content/HowTo:Migrate_old_scenes_to_work_with_the_new_gamma_system
http://news.povray.org/581b1660%40news.povray.org
http://news.povray.org/povray.binaries.images/thread/%3C585abdb8%40news.povray.org%3E/
Post a reply to this message
|
|