Timothy R. Cook wrote:
> what's the simplest way of reading hexadecimal numbers stored in a csv
> into floats in POV? can I do it internally, or do I have to write a
> BASIC program to do it?
I think it should be possible to do in POV-SDL.
Read the data from the file with the #read function. You can use the
string functions described in "6.1.7.3 String Functions" to break the
lines of the csv file into tokens (substr comes to my mind). Then
convert the hexadecimal numbers into floats with your own function
(there is no converting function in POV-Ray):
e.g.
HEX: 12AB.9C
DEC: 1*16^3 + 2*16^2 + 10*16^1 + 11 + 9*16^-1 + 12*16^-2
Hope that helps,
Bonsai
--
<--------------------------->
___ __ __ _ ___ ___ _
| _ ) \ \( ) _) _ )( )
| _ \() |\ \ |\ \/ _ \| |
|___/__/_)\__)___)/ \_)_)
www.b0n541.net
<--------------------------->
Post a reply to this message
|