POV-Ray : Newsgroups : povray.binaries.images : Demo Image of Lathe Segments Macro : Tags obfuscation is funny Server Time
8 Aug 2024 18:17:54 EDT (-0400)
  Tags obfuscation is funny  
From: B  Gimeno
Date: 24 May 2005 10:28:40
Message: <42933a18$1@news.povray.org>
// Before
/*
#local D = union { torus {1,.1 clipped_by {plane {-x,0}}} sphere
{<0,0,1>,.1} sphere {<0,0,-1>,.1} cylinder {<0,0,-1>,<0,0,1>,.1} pigment
{rgb .8} finish {ambient .5 reflection {.5}} rotate x*-90 translate
<-.5,.5,5>} object {D} object {D translate <.5,-1,0>} plane {y,-2 pigment
{checker rgb 1, rgb 0 scale 5} finish {ambient .5}}
*/
// After obfuscation
#macro D(P)union{torus{1,.1clipped_by{plane{-x,0}}}sphere{z,.1}sphere
{-z,.1}cylinder{-z,z,.1}pigment{rgb.8}finish{ambient.5reflection.5}
rotate x*-90translate P}#end D(<-.5,.5,5>)D(<0,-.5,5>)plane{y,-2pigment
{checker rgb 1,0scale 5}finish{ambient.5}}

I believe that it could be shorter. Was thinking on a contest about code
obfuscation, but SDL  is already obfuscated PER SE. :-)

B Gimeno
estoeslarealidad
http://usuarios.lycos.es/game2413
light_source{0,1}#macro C(r,p)cylinder{x*-2,x*2,.9
pigment{rgb p}rotate p*90}#end difference{box{-1,1}C
(z,x)C(x,y)C(z,z)pigment{rgb 2}rotate 45 translate z*4}


Post a reply to this message

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