POV-Ray : Newsgroups : povray.programming : #Bitwise operations : Re: #Bitwise operations Server Time
28 Jul 2024 18:27:36 EDT (-0400)
  Re: #Bitwise operations  
From: S  Parker
Date: 20 Nov 1999 01:54:24
Message: <38364773.CDFEB12@sprynet.com>
Good grief!  I brought this subject up in September of *last* year and no
one responded so I dropped it.  Anyway, here is the original message.

Subject:  bit-wise operators and base-n numbers
Date: Sun, 06 Sep 1998 13:17:37 -0500
From: "S. Parker" <sbp### [at] sprynetcom>
Newsgroups: povray.programming

    POV Ray is becoming more and more of a full-blown programming
language.  I recently undertook a POV project that created a maze. In the
maze there were doors and switches and lights that could be turned on and
off, items that could be moved or picked up, elevators that could go up or
down, etc...depending upon how certain switches or "flags" were set.

The only problem was that I had to write include files that would extract
"bit" settings from "hex" numbers.  Well POV doesn't support hex
or bit-wise operators so... I had to use strings to represent the hex
fields, convert them to decimal, perform all sorts arithmetic operations
to simulate AND, OR, XOR, shift and rotate operations, then re-embed the
modified bit fields back into the decimal numbers and convert them back
into hex (whew!) all so my original hex string would reflect the operation
that was performed on it.

Which brings me back to my first sentence...since POV Ray is becoming a
programming language unto itself....would the POV Ray design
team please, Please, PLEASE, consider adding these capabilities into the
next release.  They would be extremely useful in event driven
animations and I (and hopefully a few others) would be forever in your
debt.

Stevie B


Post a reply to this message

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