POV-Ray : Newsgroups : povray.advanced-users : Vector average question : Re: Vector average question Server Time
29 Jul 2024 16:32:35 EDT (-0400)
  Re: Vector average question  
From: Warp
Date: 4 Nov 2001 07:24:27
Message: <3be5337b@news.povray.org>
Rune <run### [at] mobilixnetdk> wrote:
: Thanks, I understand it perfectly, and I've been thinking of doing that
: myself, but it sounded inefficient and slow to me.

  You didn't say it should be fast... :)

  If you want a faster version, I think that a good approximation can be
calculated by just choosing one of the points and using it as the end point
for all vectors. This way you have to calculate just n-1 crossproducts.

  One possible variation is not taking any of the existing points as the
fixed end for the vectors, but take the average of all points as this point.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

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