POV-Ray : Newsgroups : povray.general : vcross error Server Time
6 Nov 2024 06:22:17 EST (-0500)
  vcross error (Message 1 to 6 of 6)  
From: Greg M  Johnson
Subject: vcross error
Date: 9 Oct 2002 14:45:58
Message: <3da47966@news.povray.org>
Why would the following code:

        #declare p0=MyTrack(nclock);
        #declare p1=MyTrack(nclock+1/npoints);
        #declare p2=MyTrack(nclock+2/npoints);

        #declare dr1=p1-p0;
        #declare drx1=vnormalize(vcross(y+0.001,dr1));
//this_is_line_76
        #declare dry1=vnormalize(vcross(drx1-0.0001,dr1));
//this_is_line_77



give me an error of:

File: C:\pov35\ini\sweep05.pov  Line: 76
Error: Normalizing zero-length vector.
File: C:\pov35\ini\sweep05.pov  Line: 77
Error: Normalizing zero-length vector.


Post a reply to this message

From: John VanSickle
Subject: Re: vcross error
Date: 9 Oct 2002 16:51:30
Message: <3DA496E0.A018D4F0@hotmail.com>
Greg M. Johnson wrote:
> 
> Why would the following code:
> 
>         #declare p0=MyTrack(nclock);
>         #declare p1=MyTrack(nclock+1/npoints);
>         #declare p2=MyTrack(nclock+2/npoints);
> 
>         #declare dr1=p1-p0;
>         #declare drx1=vnormalize(vcross(y+0.001,dr1));
> //this_is_line_76
>         #declare dry1=vnormalize(vcross(drx1-0.0001,dr1));
> //this_is_line_77
> 
> give me an error of:
> 
> File: C:\pov35\ini\sweep05.pov  Line: 76
> Error: Normalizing zero-length vector.
> File: C:\pov35\ini\sweep05.pov  Line: 77
> Error: Normalizing zero-length vector.

If dr1 = k*<.001,1.001,.001>, where k is any scalar value, the
cross product in line 76 will be <0,0,0>.

Since I don't know what the MyTrack macro does, I can't be fully
elucidating.

Regards,
John


Post a reply to this message

From: jfmiller
Subject: Re: vcross error
Date: 9 Oct 2002 17:10:47
Message: <3da49b57$1@news.povray.org>
#declare drx1=vnormalize(vcross(y+0.001,dr1)

y+0.001  <--  `y` is a vector <0,1,0>   Adding a scaler to a vector is
normally not a good idea.

I'm not sure what POV does with this but my guess is it is the source of
your error.

JFMILLER

"Greg M. Johnson" <gregj:-)565### [at] aolcom> wrote in message
news:3da47966@news.povray.org...
> Why would the following code:
>
>         #declare p0=MyTrack(nclock);
>         #declare p1=MyTrack(nclock+1/npoints);
>         #declare p2=MyTrack(nclock+2/npoints);
>
>         #declare dr1=p1-p0;
>         #declare drx1=vnormalize(vcross(y+0.001,dr1));
> //this_is_line_76
>         #declare dry1=vnormalize(vcross(drx1-0.0001,dr1));
> //this_is_line_77
>
>
>
> give me an error of:
>
> File: C:\pov35\ini\sweep05.pov  Line: 76
> Error: Normalizing zero-length vector.
> File: C:\pov35\ini\sweep05.pov  Line: 77
> Error: Normalizing zero-length vector.


Post a reply to this message

From: TinCanMan
Subject: Re: vcross error
Date: 9 Oct 2002 22:09:11
Message: <3da4e147$1@news.povray.org>
"jfmiller" <jfm### [at] hotmailcom> wrote in message
news:3da49b57$1@news.povray.org...
> #declare drx1=vnormalize(vcross(y+0.001,dr1)
>
> y+0.001  <--  `y` is a vector <0,1,0>   Adding a scaler to a vector is
> normally not a good idea.
>
> I'm not sure what POV does with this but my guess is it is the source of
> your error.
>

Just FYI, Pov would extend y+0.001 to <0,1,0> + <0.001,0.001,0.001>

-tgq


Post a reply to this message

From: Christopher James Huff
Subject: Re: vcross error
Date: 9 Oct 2002 23:12:56
Message: <chrishuff-82461F.23092609102002@netplex.aussie.org>
In article <3da49b57$1@news.povray.org>,
 "jfmiller" <jfm### [at] hotmailcom> wrote:

> y+0.001  <--  `y` is a vector <0,1,0>   Adding a scaler to a vector is
> normally not a good idea.

Wrong. It is perfectly valid, POV promotes the scalar to a vector. "y + 
0.001" is equivalent to "y + < 0.001, 0.001, 0.001>".

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Greg M  Johnson
Subject: Re: vcross error
Date: 10 Oct 2002 08:41:54
Message: <3da57592$1@news.povray.org>
"John VanSickle" <evi### [at] hotmailcom> wrote in message
news:3DA496E0.A018D4F0@hotmail.com...
>
> Since I don't know what the MyTrack macro does, I can't
> be fully elucidating.
>

It turns out MyTrack() was undefined for some values of nclock, which
explains the error...
Thanks for the help anyway....


Post a reply to this message

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