POV-Ray : Newsgroups : povray.general : uv mapping triangles in mesh {} : Re: uv mapping triangles in mesh {} Server Time
18 May 2024 00:22:20 EDT (-0400)
  Re: uv mapping triangles in mesh {}  
From: Alain Martel
Date: 29 Mar 2023 12:30:59
Message: <642467c3$1@news.povray.org>
Le 2023-03-28 à 14:06, Bald Eagle a écrit :
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> 
>> But perhaps have to figure out how to mimic a python yield directive in SDL -
>> maybe TOK has some ideas on that.
> 
> I got the yield worked out, now I am trying to properly decipher these
> expressions:
> 
> //#local ta = (a - int(da <= 0) - fa) / da if da != 0 else float('inf');

int(da<=0) evaluate to 1 whenever da is zero or negative, and 0 if da is 
positive. The «int» does nothing as the <= operation returns ONLY 1 or 0.

As the else invert the result of the test,
«if da != 0 else» is the same as «if da = 0» of «if !da».

//#local ta = (a - da <=0 - fa) / da if !da float ('inf');

> 
> //#local ida = abs(1 / da) if da != 0 else float('inf');

//#local ida = abs(1 / da) if !da float('inf');
> 
> 
>


Post a reply to this message

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