|
![](/i/fill.gif) |
On Thu, 10 May 2001 18:52:57 +0200, Wlodzimierz ABX Skiba wrote:
>I've created simple addition to expressions - vector symmetry operator "@".
>
>Syntax
> Vector @ SymmetryRefference
> SymmetryRefference : Vector | ox | oy | oz | xy | xz | yz
>
>Instead of explanation just examples of usage and old equivalents
Why a patch and not a macro?
#macro VecSym(Vec, Sym)
(vlength(Sym)?(2*vdot(Vec,Sym)/vlength(Sym)*Sym-Vec):(-Vec))
#end
Then you give it x instead of ox, y instead of oy, etc. and
x+y instead of xy etc.
--
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission 3-T}}}#end
Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}
Post a reply to this message
|
![](/i/fill.gif) |