|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Aha.
You're trying to read and write whole vectors.
Split them into scalar values, because read/write does on value at a time.
Try the below code - it ought to work.
//---------------------Head------------------------
#declare Vector1 = array[2][3] //2 rows and 3 columns
#declare Vector2 = array[2][3]
#fopen MyFile "data.txt" read
#fopen MyFile1 "data.out" write
#while (defined(MyFile))
#read (MyFile, Scalar1, Scalar2, Scalar3, Scalar4, Scalar5, Scalar6)
// {Be sure to include debug.inc file!}
#debug concat( " Scalar1 = ", str(Scalar1, 3, 1), " Scalar2 = ", str(Scalar2,
3, 1), " Scalar3 = ", str(Scalar3, 3, 1), "\n")
#debug concat( " Scalar4 = ", str(Scalar4, 3, 1), " Scalar5 = ", str(Scalar5,
3, 1), " Scalar6 = ", str(Scalar6, 3, 1), "\n")
#declare Vector1 = <Scalar1, Scalar2, Scalar3>;
#declare Vector2 = <Scalar4, Scalar5, Scalar6>;
#debug concat( "Vector1 = ", vstr(3, Vector1, ", ", 3, 0), " \n")
#debug concat( "Vector2 = ", vstr(3, Vector2, ", ", 3, 0), " \n")
#debug " \n \n"
#write (MyFile1, Scalar1, Scalar2, Scalar3, Scalar4, Scalar5, Scalar6)// check
what I am reading in any data
#end
#fclose MyFile
#fclose MyFile1
//---------------------end--------------------------------
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Dear Bald Eagle,
Thank you so much for taking the time to explain this to me!
It worked so beautifully.
I was able to alter it to meet my needs.
I really appreciate your great help!
Best regards,
Guoping
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Aha.
> You're trying to read and write whole vectors.
> Split them into scalar values, because read/write does on value at a time.
>
> Try the below code - it ought to work.
>
> //---------------------Head------------------------
>
> #declare Vector1 = array[2][3] //2 rows and 3 columns
> #declare Vector2 = array[2][3]
>
> #fopen MyFile "data.txt" read
> #fopen MyFile1 "data.out" write
>
> #while (defined(MyFile))
> #read (MyFile, Scalar1, Scalar2, Scalar3, Scalar4, Scalar5, Scalar6)
> // {Be sure to include debug.inc file!}
> #debug concat( " Scalar1 = ", str(Scalar1, 3, 1), " Scalar2 = ", str(Scalar2,
> 3, 1), " Scalar3 = ", str(Scalar3, 3, 1), "\n")
> #debug concat( " Scalar4 = ", str(Scalar4, 3, 1), " Scalar5 = ", str(Scalar5,
> 3, 1), " Scalar6 = ", str(Scalar6, 3, 1), "\n")
>
> #declare Vector1 = <Scalar1, Scalar2, Scalar3>;
> #declare Vector2 = <Scalar4, Scalar5, Scalar6>;
>
> #debug concat( "Vector1 = ", vstr(3, Vector1, ", ", 3, 0), " \n")
> #debug concat( "Vector2 = ", vstr(3, Vector2, ", ", 3, 0), " \n")
>
> #debug " \n \n"
> #write (MyFile1, Scalar1, Scalar2, Scalar3, Scalar4, Scalar5, Scalar6)// check
> what I am reading in any data
> #end
>
> #fclose MyFile
> #fclose MyFile1
> //---------------------end--------------------------------
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"isuc60" <isu### [at] gmailcom> wrote:
> Dear Bald Eagle,
>
> Thank you so much for taking the time to explain this to me!
Sure thing, Guoping - that's exactly what this group is for.
> It worked so beautifully.
> I was able to alter it to meet my needs.
Glad to hear it - I hope you're enjoying POV-Ray as much as the rest of us do
> I really appreciate your great help!
The rest of the crew can tell you that I've received my very own mountain of
help over the years ;)
Glad to have cleared that up for you
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 11/18/2016 12:57 PM, Bald Eagle wrote:
> The rest of the crew can tell you that I've received my very own mountain of
> help over the years;)
As have we all over the years. :)
I hope your stay here is a long one.
--
Regards
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 22.11.2016 um 08:27 schrieb Mike Horvath:
> Your link is NSFW!!
You quoting it didn't make it less NSFW... *sigh*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 22.11.2016 um 08:50 schrieb clipka:
> Am 22.11.2016 um 08:27 schrieb Mike Horvath:
>
>> Your link is NSFW!!
>
> You quoting it didn't make it less NSFW... *sigh*
FYI: Revoked two posts in this thread, not primarily because they linked
to a web page with NSFW content, but because the linked page seemed
rather bogus in general.
Sorry folks, but I don't think we want people to potentially catch
drive-by malware from following links in these newsgroups.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 11/22/2016 8:27 AM, clipka wrote:
> Am 22.11.2016 um 08:50 schrieb clipka:
>> Am 22.11.2016 um 08:27 schrieb Mike Horvath:
>>
>>> Your link is NSFW!!
>>
>> You quoting it didn't make it less NSFW... *sigh*
>
> FYI: Revoked two posts in this thread, not primarily because they linked
> to a web page with NSFW content, but because the linked page seemed
> rather bogus in general.
>
> Sorry folks, but I don't think we want people to potentially catch
> drive-by malware from following links in these newsgroups.
>
Good show! that chap. :)
--
Regards
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Am 22.11.2016 um 08:50 schrieb clipka:
>> Am 22.11.2016 um 08:27 schrieb Mike Horvath:
>>
>>> Your link is NSFW!!
>>
>> You quoting it didn't make it less NSFW... *sigh*
>
> FYI: Revoked two posts in this thread, not primarily because they linked
> to a web page with NSFW content, but because the linked page seemed
> rather bogus in general.
>
> Sorry folks, but I don't think we want people to potentially catch
> drive-by malware from following links in these newsgroups.
>
Good move.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|