POV-Ray : Newsgroups : povray.general : guys could you help me out once more? : Re: guys could you help me out once more? Server Time
27 Apr 2024 12:40:19 EDT (-0400)
  Re: guys could you help me out once more?  
From: Bald Eagle
Date: 25 Aug 2017 08:10:01
Message: <web.59a0129c61def543c437ac910@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

> However... You mentioned wanting to change the value of  numofpics.  But the
> sqrt() trick will only work when  numofpics  has a square-root that is an
> INTEGER-- like 64 (8), 81 (9), 100 (10), 121 (11), etc. Any of these will give
> you a nice square grid of camera positions in X and Y.  Choosing a value like
> 150 will not.

I suppose you might be able to just round the sqrt calculation to give something
close and usable.

> I still don't understand what the meaning of 'shift' is; it's use in your code
> isn't stated or obvious.

It seems he wants to use that to space out the positions - but I think that if
he's stepping through his for-next loop like that, that the high-bound value
will have to be adjusted by multiplying it by SHIFT, otherwise he'll run out of
array positions too soon, and won't get the number of frames that he really
wants.

Not to make it any more complicated, but it might give a more compact code -
what about calculating the array values by using abs(sin (somthing)), and that
way when [theta] goes past the max, it automatically goes back to 0, and the y
array can be calculated as int(theta/360)*SHIFT.


Post a reply to this message

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