POV-Ray : Newsgroups : povray.binaries.scene-files : for Sven Littkowski - Algorithmus Wanted Server Time
28 Mar 2024 09:35:21 EDT (-0400)
  for Sven Littkowski - Algorithmus Wanted (Message 1 to 8 of 8)  
From: Norbert Kern
Subject: for Sven Littkowski - Algorithmus Wanted
Date: 20 Feb 2018 15:10:00
Message: <web.5a8c80165f09b57ef6fe96310@news.povray.org>
Here is an example for getting equidistant objects via splines.
Original source (ABX) is included.

Norbert


Post a reply to this message


Attachments:
Download 'equidistant spline_example.zip' (461 KB)

From: Norbert Kern
Subject: Re: for Sven Littkowski - Algorithmus Wanted
Date: 28 Feb 2018 09:40:00
Message: <web.5a96beb7fe98e6328f4894750@news.povray.org>
Here is a new version - using splines genereted with the help of vturbulence...
For rendering you have to get a hdr file from here:
https://www.openfootage.net/hdri-360-cres-croatia/

Norbert


Post a reply to this message


Attachments:
Download 'wavy lines.pov.txt' (7 KB)

From: Thomas de Groot
Subject: Re: for Sven Littkowski - Algorithmus Wanted
Date: 1 Mar 2018 03:15:15
Message: <5a97b693@news.povray.org>
On 28-2-2018 15:37, Norbert Kern wrote:
> Here is a new version - using splines genereted with the help of vturbulence...
> For rendering you have to get a hdr file from here:
> https://www.openfootage.net/hdri-360-cres-croatia/
> 
> Norbert
> 

Interesting.

Note: a lot of warnings generated in transforms.inc (line 39: scale by 
0.0 in matrix column; and 187: normalizing zero-length vector) and 
math.inc (lines243 and 275: normalizing zero-length vector). Some way to 
avoid that? I do not see where those are generated.

-- 
Thomas


Post a reply to this message

From: Norbert Kern
Subject: Re: for Sven Littkowski - Algorithmus Wanted
Date: 1 Mar 2018 05:10:01
Message: <web.5a97d10ffe98e632d91233f30@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:

>
> Interesting.
>
> Note: a lot of warnings generated in transforms.inc (line 39: scale by
> 0.0 in matrix column; and 187: normalizing zero-length vector) and
> math.inc (lines243 and 275: normalizing zero-length vector). Some way to
> avoid that? I do not see where those are generated.


ABX used a variable called Accuracy in his Time_To_Lenght_Converter macro.
If you rise its value from 0.001 to 0.01 you get only one warning per spline and
not for every defined point.

I think this is because he used an arbitrarily defined step factor in this line:
#local Length = Length+vlength (Point-(Last*1.0003));

If you change 1.0003 to 1.00003, you avoid the matrix column warnings too.

But I really don't know why I get one zero length vector warning per spline.
My math skills...

Norbert


Post a reply to this message

From: Norbert Kern
Subject: Re: for Sven Littkowski - Algorithmus Wanted
Date: 1 Mar 2018 05:25:00
Message: <web.5a97d4e8fe98e632d91233f30@news.povray.org>
"Norbert Kern" <nor### [at] t-onlinede> wrote:

> I think this is because he used an arbitrarily defined step factor in this line:
> #local Length = Length+vlength (Point-(Last*1.0003));
>
> If you change 1.0003 to 1.00003, you avoid the matrix column warnings too.


Command back - ABX didn't introduce this factor. I used his code once many years
before and I forgot this little annoying thing.
In his original post he simply wrote: #local Length = Length+vlength
(Point-Last);
My fault.

Norbert


Post a reply to this message

From: Thomas de Groot
Subject: Re: for Sven Littkowski - Algorithmus Wanted
Date: 1 Mar 2018 07:09:53
Message: <5a97ed91$1@news.povray.org>
On 1-3-2018 11:24, Norbert Kern wrote:
> "Norbert Kern" <nor### [at] t-onlinede> wrote:
> 
>> I think this is because he used an arbitrarily defined step factor in this line:
>> #local Length = Length+vlength (Point-(Last*1.0003));
>>
>> If you change 1.0003 to 1.00003, you avoid the matrix column warnings too.
> 
> 
> Command back - ABX didn't introduce this factor. I used his code once many years
> before and I forgot this little annoying thing.
> In his original post he simply wrote: #local Length = Length+vlength
> (Point-Last);
> My fault.
> 
> Norbert
> 
> 

Much better. Remains the zero-length vector... I shall ponder this a bit 
more.

-- 
Thomas


Post a reply to this message

From: Alain
Subject: Re: for Sven Littkowski - Algorithmus Wanted
Date: 3 Mar 2018 15:43:19
Message: <5a9b08e7$1@news.povray.org>

> On 28-2-2018 15:37, Norbert Kern wrote:
>> Here is a new version - using splines genereted with the help of 
>> vturbulence...
>> For rendering you have to get a hdr file from here:
>> https://www.openfootage.net/hdri-360-cres-croatia/
>>
>> Norbert
>>
> 
> Interesting.
> 
> Note: a lot of warnings generated in transforms.inc (line 39: scale by 
> 0.0 in matrix column; and 187: normalizing zero-length vector) and 
> math.inc (lines243 and 275: normalizing zero-length vector). Some way to 
> avoid that? I do not see where those are generated.
> 

For the scale by zero, they come from constructs like scale Value*x.
When that appen, Value*x get promoted to <Value,0,0> generating two 
warnings because scale 0 is not allowed.
You need to edit the file to replace all scale Value*x by 
scale<Value,1,1>, all scale Value*y by scale <1,Value,1> and scale 
Value*z by scale<1,1,Value>


For the problem with math.inc, make sure that you don't pass nor 
generate any null vector.
A nul or zero-length vector don't have any direction and can't be 
normalised to an unit length vector.
You may try adding this:
#if(vlength(Vector)=0) #declare vector=<1,0,0>; #end


Alain


Post a reply to this message

From: Sven Littkowski
Subject: Re: for Sven Littkowski - Algorithmus Wanted
Date: 23 Mar 2018 21:54:18
Message: <5ab5afca$1@news.povray.org>
Thanks everyone, seeing it just now, so belated.

---

http://www.avg.com


Post a reply to this message

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