POV-Ray : Newsgroups : povray.general : Pov race results. : Pov race results. Server Time
6 Aug 2024 10:24:44 EDT (-0400)
  Pov race results.  
From: Shay
Date: 3 Apr 2002 20:46:16
Message: <3cabb068$1@news.povray.org>
I am putting this up as a new topic because it will likely be interesting to
anyone. I asked earlier today about the best way to use a float to find a
vector.
example: Var = 3 ------> vector <Var*2, Var, Var/2>


JRG gave the solution which I was trying to avoid, using a separate function
for x, y, and z.

ABX scripted a complex function do deal with the problem
news:jltmaukpci64s7497l1qdr79asqpl6tpln@4ax.com

I ran each (plus a macro) through a loop 1 million times and recorded the
parse times:


*Macro*
Macro was the big loser at 1:31

*<Calculate_x(), Calculate_y(), Calculate_z()>*
*ABX pigment function*
These both parsed in 50 seconds.

Functions as expected are much faster than macros, but no difference in
parse times over 1 million iterations between three very simple functions
and one complex function.

 -Shay


Post a reply to this message

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