POV-Ray : Newsgroups : povray.programming : how to write the reflected ray to a file? Server Time
23 Dec 2024 10:58:39 EST (-0500)
  how to write the reflected ray to a file? (Message 1 to 4 of 4)  
From: Wu Yang
Subject: how to write the reflected ray to a file?
Date: 10 Oct 2002 13:46:46
Message: <3da5bd06$1@news.povray.org>
Hi, all
   I want to write the reflected ray to a file and I tried to cout the
New_Ray to the screen by adding "cout << New_Ray.Direction;" into the
Reflect() function and rebuild the project. But it is no use. When I execute
the pvengine.exe, nothing appears on the screen. Could you please give me
some advice about how to write the reflected ray to a file.

Thanks a lot
Best Regard
Wu Yang


Post a reply to this message

From: Vahur Krouverk
Subject: Re: how to write the reflected ray to a file?
Date: 10 Oct 2002 14:01:21
Message: <3DA5C14B.6000206@starman.ee>
Wu Yang wrote:
> Hi, all
>    I want to write the reflected ray to a file and I tried to cout the
> New_Ray to the screen by adding "cout << New_Ray.Direction;" into the
> Reflect() function and rebuild the project. But it is no use. When I execute
> the pvengine.exe, nothing appears on the screen. Could you please give me
> some advice about how to write the reflected ray to a file.

If you want to write to file, then write to file :-)
If you write to standard output, then it could not be seen (at least 
with pvengine.exe), as it is Windows application and Windows 
applications usually do not display text, written to standard output.
So you have to create ofstream to write to file.

Other possibility is to redirect standard output to file. For this start 
pvengine from command line as follows:
pvengine.exe 1>output
this will redirect all text, written to standard output stream, to file 
output.


Post a reply to this message

From: Wu Yang
Subject: Re: how to write the reflected ray to a file?
Date: 10 Oct 2002 14:26:29
Message: <3da5c655$1@news.povray.org>
Thanks a lot
Wu
"Vahur Krouverk" <vkr### [at] starmanee> wrote in message
news:3DA### [at] starmanee...
> Wu Yang wrote:
> > Hi, all
> >    I want to write the reflected ray to a file and I tried to cout the
> > New_Ray to the screen by adding "cout << New_Ray.Direction;" into the
> > Reflect() function and rebuild the project. But it is no use. When I
execute
> > the pvengine.exe, nothing appears on the screen. Could you please give
me
> > some advice about how to write the reflected ray to a file.
>
> If you want to write to file, then write to file :-)
> If you write to standard output, then it could not be seen (at least
> with pvengine.exe), as it is Windows application and Windows
> applications usually do not display text, written to standard output.
> So you have to create ofstream to write to file.
>
> Other possibility is to redirect standard output to file. For this start
> pvengine from command line as follows:
> pvengine.exe 1>output
> this will redirect all text, written to standard output stream, to file
> output.
>


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: how to write the reflected ray to a file?
Date: 10 Oct 2002 17:18:25
Message: <Xns92A3ECD796A48raf256com@204.213.191.226>
Vahur Krouverk <vkr### [at] starmanee> wrote in 
news:3DA### [at] starmanee

> If you want to write to file, then write to file :-)

in witch place should i put to open() and close() file ?
(I want some code run after start rendering, and after aborting/finishing 
it)

-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

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