POV-Ray : Newsgroups : povray.general : torus arrows Server Time
23 Apr 2024 22:47:38 EDT (-0400)
  torus arrows (Message 11 to 18 of 18)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Bald Eagle
Subject: Re: torus arrows
Date: 15 Nov 2016 10:20:00
Message: <web.582b2728329b68a8b488d9aa0@news.povray.org>
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

From: isuc60
Subject: Re: torus arrows
Date: 17 Nov 2016 21:40:01
Message: <web.582e693b329b68a8116828db0@news.povray.org>
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

From: Bald Eagle
Subject: Re: torus arrows
Date: 18 Nov 2016 08:00:00
Message: <web.582efaaa329b68a8c437ac910@news.povray.org>
"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

From: Stephen
Subject: Re: torus arrows
Date: 18 Nov 2016 11:01:35
Message: <582f25df$1@news.povray.org>
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

From: clipka
Subject: Re: torus arrows
Date: 22 Nov 2016 02:50:54
Message: <5833f8de$1@news.povray.org>
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

From: clipka
Subject: Re: torus arrows
Date: 22 Nov 2016 03:27:23
Message: <5834016b$1@news.povray.org>
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

From: Stephen
Subject: Re: torus arrows
Date: 22 Nov 2016 04:05:22
Message: <58340a52$1@news.povray.org>
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

From: Alain
Subject: Re: torus arrows
Date: 22 Nov 2016 16:47:32
Message: <5834bcf4$1@news.povray.org>

> 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

<<< Previous 10 Messages Goto Initial 10 Messages

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