POV-Ray : Newsgroups : povray.advanced-users : hello all can some one help me simplify a formula : Re: hello all can some one help me simplify a formula Server Time
29 Jul 2024 18:27:03 EDT (-0400)
  Re: hello all can some one help me simplify a formula  
From: Thorsten Froehlich
Date: 14 Apr 2001 23:49:12
Message: <3ad91a38$1@news.povray.org>
If you want to go further for some reason, you could also eleminate 
common subexpressions...

d = a*(2*pi)/360
e = b*(2*pi)/360
f = c*(2*pi)/360

sd = sin(d)
cd = cos(d)
se = sin(e)
ce = cos(e)
sf = sin(f)
cf = cos(f)

zy = cd * z + sd * y
yz = cd * y - sd * z

m = cf * (ce * x + se * zy) - sf * yz
n = cf * (yz + sf * (ce * x + se * zy))
o = ce * zy - se * x


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

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