POV-Ray : Newsgroups : povray.general : random access files Server Time
14 Oct 2024 04:41:05 EDT (-0400)
  random access files (Message 1 to 2 of 2)  
From: Leroy
Subject: random access files
Date: 23 Aug 2023 15:00:00
Message: <web.64e6570ef1b40909d082ffedf712fc00@news.povray.org>
I had an Idea for faking random access files for POV.
If you put Data in strings and place them to a file in a form POV can Read.
Then when you a particular piece :
  open the file and read until you got it then close the file.
And then your ready for another Read

I was wondering if anyone used something like this. And how efficient it was.

I did some like this for animation robots but the input file was coded as to how
the file was read.

Thanks!


Post a reply to this message

From: jr
Subject: Re: random access files
Date: 23 Aug 2023 15:45:00
Message: <web.64e660eabe8c814780c03e9d6cde94f1@news.povray.org>
hi,

"Leroy" <whe### [at] gmailcom> wrote:
> I had an Idea for faking random access files for POV.
> If you put Data in strings and place them to a file in a form POV can Read.
> Then when you a particular piece :
>   open the file and read until you got it then close the file.
> And then your ready for another Read
>
> I was wondering if anyone used something like this. And how efficient it was.

yes and no.  I did write a file handling macro[*], the data can be (any) scalar
types, as "CSV".  or you could store (lists of) data within strings, and use eg
the 'strSplit()' macro (see link) to parse.

<http://news.povray.org/web.64b08576d08f3556b49d80446cde94f1%40news.povray.org>

[*]
<https://drive.google.com/file/d/10pGH0yi_-8aBTQvTwQPB4AdfRl9JsTGg/view?usp=sharing>


regards, jr.


Post a reply to this message

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