POV-Ray : Newsgroups : povray.unofficial.patches : Bitwise functions Server Time
28 Mar 2024 19:58:14 EDT (-0400)
  Bitwise functions (Message 1 to 1 of 1)  
From: Le Forgeron
Subject: Bitwise functions
Date: 14 Jul 2010 14:48:37
Message: <4c3e0685@news.povray.org>
Purpose: being able to compute bitwise and, or & xor.

Apply to 3.7beta38

syntax:

bitwise_and(i1,i2,...)
bitwise_or(i1,i2,...)
bitwise_xor(i1,i2,...)

(see max() syntax)

Why: because I needed a XOR operation for placement (classical double
loop with xor:
 for i=1 to 2^n
 for j=1 to 2^n
   x = i;
   y = bitwise_xor(i,j);
  object at <x,y>
 end for j
 end for i

The <x,y> cover first the main diagonal of the square and will end with
the other diagonal.)


Post a reply to this message


Attachments:
Download 'bitwise.tar.gz' (24 KB)

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