POV-Ray : Newsgroups : povray.binaries.images : Applying textures to a spherical heightfield section afterwards? : Re: Applying textures to a spherical heightfield section afterwards? Server Time
27 Apr 2024 08:25:54 EDT (-0400)
  Re: Applying textures to a spherical heightfield section afterwards?  
From: Jörg "Yadgar" Bleimann
Date: 14 Sep 2020 13:18:16
Message: <5f5fa5d8$1@news.povray.org>
Hi(gh)!

On 14.09.20 18:34, Le_Forgeron wrote:

> How is NumUVVectors computed ? it should be xdim*ydim.
> or (xdim+1)*(ydim+1) if range of #for are (0, ydim) and (0, xdim)
> 
>>    #for (a, 0, ydim-1)
>>      #for (b, 0, xdim-1)
> 
> Range problem, b/xdim is never reaching 1.0, same for a/ydim.
> 
>>        #write (ES, concat("<", str(b*(1/xdim), 1, 6), ",",
>> str(a*(1/ydim), 1, 6), ">"))
> 
> I hate that code:
> 
>>        #if (a < ydim-1 & b < xdim-1)
> 
> because it seems, to my eyes, ambiguous about order of operations.
> 
> Please put more ().
> 

I tried your suggestions, but still get the "out of range" error!

See you in Khyberspace!

Yadgar


Post a reply to this message

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