POV-Ray : Newsgroups : povray.windows : some question about windows cmd : Re: some question about windows cmd Server Time
24 Apr 2024 09:01:46 EDT (-0400)
  Re: some question about windows cmd  
From: Bald Eagle
Date: 1 Apr 2018 11:35:01
Message: <web.5ac0fb2d47c4fa635cafe28e0@news.povray.org>
"944291641" <944### [at] qqcom> wrote:

> Recently I have encounter another question , could you give me a hand?
>
> I build a scene which contains some trees, and I want calculate the area of the
> sunlit leaf and the shaded leaf. For that I am a  Pov-Ray beginner, I don't know
> if there is any functions that can achieve this goal.



Do you need to calculate that for ALL the leaves in a scene, or just one?

You could probably render a single leaf, with a fairly artificial setup that
gives a certain color of final rendered pixel for lit, a certain color for
unlit, and a distinct background color (I'd go with transparent).

Then you could scan and count the pixels of the different colors.

Sorta like this:
http://news.povray.org/povray.binaries.images/thread/%3Cweb.58cfc0cf857600e8c437ac910%40news.povray.org%3E/?mtop=416151


POV-Ray has internal processes that count ray-object intersections, and there is
also trace () and eval_pigment ().

Perhaps there's a way to determine how much total leaf area there is, how much
is directly lit, and then subtract lit from total.


Post a reply to this message

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