POV-Ray : Newsgroups : povray.newusers : taking matrices to next frame Server Time
5 Nov 2024 09:25:01 EST (-0500)
  taking matrices to next frame (Message 1 to 4 of 4)  
From: JANWV
Subject: taking matrices to next frame
Date: 27 Jan 2004 04:38:58
Message: <401631b2$1@news.povray.org>
Helllo,

I am trying to simulate the temperature flows in a plane, but to accieve
this i need to store all the local temperatures of the points in a array,
and use those values in the next frame to calculate the next step. Now is my
question: how do i store a matrix, to use it in the next frame?

I am familiar with writing and reading single values into .txt files with
the #write and #read statements. But it seams to be impossible to write a
full matrix (100x100) to a single file.

So if anyone can help me, it will be appreciated.

JWV


Post a reply to this message

From: Warp
Subject: Re: taking matrices to next frame
Date: 27 Jan 2004 05:38:44
Message: <40163fb4@news.povray.org>
JANWV <jwv|at|planet.nl> wrote:
> I am familiar with writing and reading single values into .txt files with
> the #write and #read statements. But it seams to be impossible to write a
> full matrix (100x100) to a single file.

  Why would it be impossible? Just write each value in the array in a
loop and that's it.

  By the way, the easiest way of doing this is probably making your
code to write valid POV-Ray code to the file declaring the array
(ie. "#declare Matrix = array[100][100] { ...") and then #including
this file in the next frame.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: James Taylor
Subject: Re: taking matrices to next frame
Date: 27 Jan 2004 09:10:39
Message: <4016715f$1@news.povray.org>
IIRC Tim Nikias wrote some macros to do this sort of thing. Take a look at
http://www.nolights.de/download.html under the IO Macros link.

jim


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: taking matrices to next frame
Date: 27 Jan 2004 14:41:59
Message: <4016bf07$1@news.povray.org>
> IIRC Tim Nikias wrote some macros to do this sort of thing. Take a look at
> http://www.nolights.de/download.html under the IO Macros link.

Hey, thanks for the plug! :-) Would've mentioned it just now, but you've
been here earlier.

As a note: as long as you don't try to save Strings in the array, the macros
work fine. They weren't coded to properly load Strings (as they require
quotation marks when rebuilding). I intend to write a macro for strings
someday as well, but now I'm too lazy for one, and too occupied for another.

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>
Email: tim.nikias (@) nolights.de


Post a reply to this message

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