POV-Ray : Newsgroups : povray.binaries.animations : CHROMADEPTH code tests-- animation : Re: CHROMADEPTH code tests-- animation Server Time
20 Apr 2024 09:29:59 EDT (-0400)
  Re: CHROMADEPTH code tests-- animation  
From: Bald Eagle
Date: 22 Feb 2018 21:45:00
Message: <web.5a8f7fc454892b7e5cafe28e0@news.povray.org>
So, after looking over the animation for a bit more, and considering what you're
probably actually trying to do:

1.  I'm not actually clear on how you're working out all that color map and
scaling math.
I think I'd find the distance to the farthest corner (not necessarily
max_extent) and the nearest corner.  Divide both distances by farthest corner
distance.   That gives you 1 and less than 1.
define color map, and then scale back up by distance to the farthest corner.
I think that should give you that thin shell of varying color extending from
nearest corner to farthest corner.

2. You're not really looking for "which" corner is nearest or farthest,
programmatically, you're looking for the largest and smallest distances.

So, just calculate all 8 distances and use min() and max().


Post a reply to this message

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