|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello Everybody, First..i would like to thank to all those who responded and
helped me with my previous quistion.I am verymuch new to povray/ray tracing,
i have a question regarding SDL.
1) is it possible to output the result of a macro in SDL into a text file??.
For example if i write a macro which would do some looping operations.. and
give out some result.. can i output this result in a file?. can i do this
with SDL or should i look into the source code of the programme.(if yes
please..
let me know where)
I would be verymuch thankful to anyone who can help me out with my problem.
thank you very much in advance
cheers
amar hegde
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"amar" <amar> wrote:
> Hello Everybody, First..i would like to thank to all those who responded and
> helped me with my previous quistion.I am verymuch new to povray/ray tracing,
> i have a question regarding SDL.
>
> 1) is it possible to output the result of a macro in SDL into a text file??.
> For example if i write a macro which would do some looping operations.. and
> give out some result.. can i output this result in a file?. can i do this
> with SDL or should i look into the source code of the programme.(if yes
> please..
> let me know where)
>
SDL will do what you want (3.2.2.3 File I/O Directives)
basically you need to create a file for input (#fopen)
then write a text string in your loop corresponding to the scene file
operation.
eg:
//start
#fopen OutFile1 "LoopOutput.txt" write
#local RND=seed(1);
#local i=0; #while (i<10)
#local j=0; #while (j<10)
#local k=0; #while (k<10)
#local Rad=rand(RND)*0.5;
sphere {<i,j,k>, Rad pigment{rgb 1}}
#write(OutFile1,"sphere { ",<i,j,k>", ",Rad," pigment{rgb 1}}n")
#local k=k+1; #end
#local j=j+1; #end
#local i=i+1; #end
#fclose OutFile1
//end
-tgq
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
That's how my mesh generator macros work. It makes it much easier to use the
resultant meshes.
Trevor G Quayle wrote:
> "amar" <amar> wrote:
>> Hello Everybody, First..i would like to thank to all those who responded and
>> helped me with my previous quistion.I am verymuch new to povray/ray tracing,
>> i have a question regarding SDL.
>>
>> 1) is it possible to output the result of a macro in SDL into a text file??.
>> For example if i write a macro which would do some looping operations.. and
>> give out some result.. can i output this result in a file?. can i do this
>> with SDL or should i look into the source code of the programme.(if yes
>> please..
>> let me know where)
>>
>
> SDL will do what you want (3.2.2.3 File I/O Directives)
>
> basically you need to create a file for input (#fopen)
> then write a text string in your loop corresponding to the scene file
> operation.
>
> eg:
>
> //start
You can do this also:
#macro RndBalls(oFile,oSeed)
> #fopen OutFile1 oFile write
>
> #local RND=seed(oSeed);
> #local i=0; #while (i<10)
> #local j=0; #while (j<10)
> #local k=0; #while (k<10)
> #local Rad=rand(RND)*0.5;
> sphere {<i,j,k>, Rad pigment{rgb 1}}
> #write(OutFile1,"sphere { ",<i,j,k>", ",Rad," pigment{rgb 1}}n")
> #local k=k+1; #end
> #local j=j+1; #end
> #local i=i+1; #end
>
> #fclose OutFile1
#end
then
RndBalls("rballs.inc",1)
#declare rBalls = union( #include "rballs.inc" )
>
> //end
>
> -tgq
>
>
>
--------------
David Wallace
TenArbor Consulting
"Just In Time Cash"
www.tenarbor.com
1-866-572-CASH
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|