POV-Ray : Newsgroups : povray.programming : how does POV work?? Server Time
28 Jul 2024 16:19:04 EDT (-0400)
  how does POV work?? (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: pk
Subject: how does POV work??
Date: 21 Apr 2000 20:09:07
Message: <3900ED9E.1838BD99@videotron.ca>
How does POV do to have mathematical perfect objects???
I mean, what happens when POV reads an instruction that tells it to
place a sphere??
And how does it do to know what the cam sees?
(And, an algorithm would be great, not just:"it fires ray...., etc)

Thanx!
PS, i'm sure that i can read the source, but i'd really like to have the
algorithm...
--
AKA paul_virak_khuong at yahoo.com, pkhuong at deja.com, pkhuong at
crosswinds.net and pkhuong at technologist.com(list not complete)...


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: how does POV work??
Date: 21 Apr 2000 21:15:06
Message: <3900fd1a$1@news.povray.org>
In article <3900ED9E.1838BD99@videotron.ca> , pk <thi### [at] videotronca>  
wrote:

> How does POV do to have mathematical perfect objects???
> I mean, what happens when POV reads an instruction that tells it to
> place a sphere??
> And how does it do to know what the cam sees?
> (And, an algorithm would be great, not just:"it fires ray...., etc)

I think this is too long to be explained in any newsgroup post(s).  You
should check out the "Suggested Reading" section in the POV-Ray
documentation.  Especially "An Introduction to Ray tracing" by Andrew S.
Glassner (editor) ISBN 0-12-286160-4 Academic Press 1989 should be available
in every public library with a computer books section.  And, as the title
suggests, it is an introduction - and a classic in the field.


    Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Ken
Subject: Re: how does POV work??
Date: 21 Apr 2000 21:28:25
Message: <3900FFEE.BC2C9147@pacbell.net>
Thorsten Froehlich wrote:
> 
> In article <3900ED9E.1838BD99@videotron.ca> , pk <thi### [at] videotronca>
> wrote:
> 
> > How does POV do to have mathematical perfect objects???
> > I mean, what happens when POV reads an instruction that tells it to
> > place a sphere??
> > And how does it do to know what the cam sees?
> > (And, an algorithm would be great, not just:"it fires ray...., etc)
> 
> I think this is too long to be explained in any newsgroup post(s).  You
> should check out the "Suggested Reading" section in the POV-Ray
> documentation.  Especially "An Introduction to Ray tracing" by Andrew S.
> Glassner (editor) ISBN 0-12-286160-4 Academic Press 1989 should be available
> in every public library with a computer books section.  And, as the title
> suggests, it is an introduction - and a classic in the field.
> 
>     Thorsten

Online resources that he might want to persue would be the RTnEws web
site - http://www.acm.org/tog/resources/RTNews/html/

and the source code for POV-Ray can be found at povray.org in the downloads
section.

-- 
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Warp
Subject: Re: how does POV work??
Date: 22 Apr 2000 16:31:07
Message: <39020c0b@news.povray.org>
"Shooting a ray" is actually calculating (mathematically) the intersection
of a line and the object in question (eg. a sphere).
  This means that if we have the sphere equation defined like:

S: sqrt((x-center.x)^2 + (y-center.y)^2 + (z-center-z)^2) - radius = 0

and the "ray", ie. the line from the "camera" to some direction, like:

L: a*x + b*y + c*z + offset = 0

then we can calculate the intersection points of that line and the sphere
by making them equal:

L = S

and solving the x, y and z values where the equality holds (we get two
solutions, ie. the two intersection points). These points are, of course,
located on the surface of the sphere.

  Now that we know the points, we can calculate the color of that point for
the given x, y, z (from the texture attached to the sphere), the normal
vector of the sphere at that point (from which we can calculate the
lighting, reflection, refraction and so on), etc.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: pk
Subject: Re: how does POV work??
Date: 22 Apr 2000 20:23:04
Message: <39024267.8486FFE3@videotron.ca>
Thanx!
(POV is using backward raytracing, right?)
But, how come you have to shoot rays from the lightsource to know the
shadows? Can't you just continue until you reach a light, and if so, you
know if the points before are lighted or not??
BTW, what does "L: a*x + b*y + c*z + offset = 0" mean?? i don't
understand the offset thing 8(
--
AKA paul_virak_khuong at yahoo.com, pkhuong at deja.com, pkhuong at
crosswinds.net and pkhuong at technologist.com(list not complete)...


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: how does POV work??
Date: 22 Apr 2000 21:01:13
Message: <39024b59$1@news.povray.org>
In article <39024267.8486FFE3@videotron.ca> , pk <thi### [at] videotronca>  
wrote:

> But, how come you have to shoot rays from the lightsource to know the
> shadows? Can't you just continue until you reach a light, and if so, you
> know if the points before are lighted or not??

Think about it:  How many rays do you need to send out to hit one point if
you don't even know which direction it is in? - As a point is infinitely
small you will need an infinite number of rays!

> BTW, what does "L: a*x + b*y + c*z + offset = 0" mean?? i don't
> understand the offset thing 8(

You should really try to get the book I mentioned ... it explains all that!


     Thorsten


Post a reply to this message

From: Warp
Subject: Re: how does POV work??
Date: 24 Apr 2000 05:54:13
Message: <390419c4@news.povray.org>
pk <thi### [at] videotronca> wrote:
: (POV is using backward raytracing, right?)

  Wrong.

  (Well, MegaPov has this photon mapping feature, which is bacwards
raytracing, but it's an exception; everything else uses forward raytracing.)

: But, how come you have to shoot rays from the lightsource to know the
: shadows?

  I didn't say that.
  You don't shoot rays from the light source towards the objects, but in
the other way around: You shoot rays from the objects to the light source
and see if there's anything in the way.

: BTW, what does "L: a*x + b*y + c*z + offset = 0" mean?? i don't
: understand the offset thing 8(

a*x + b*y + c*z = 0  would be a line that passes through the origin.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: how does POV work??
Date: 24 Apr 2000 11:10:08
Message: <390463d0$3@news.povray.org>
In article <390419c4@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:

> : (POV is using backward raytracing, right?)
>
>   Wrong.
>
>   (Well, MegaPov has this photon mapping feature, which is bacwards
> raytracing, but it's an exception; everything else uses forward raytracing.)

No, you are wrong.  The terms forward and backward ray tracing refer to the
direction you follow the photons.   It is well explained in the book I keep
pointing out, section 2.2 on page 7.
In this sense photon mapping qualifies as forward ray tracing (if I
understand how works correctly).


     Thorsten


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Peter J  Holzer
Subject: Re: how does POV work??
Date: 24 Apr 2000 16:01:18
Message: <slrn8g98ba.kbd.hjp-usenet@teal.h.hjp.at>
On 24 Apr 2000 05:54:13 -0400, Warp wrote:
>pk <thi### [at] videotronca> wrote:
>: BTW, what does "L: a*x + b*y + c*z + offset = 0" mean?? i don't
>: understand the offset thing 8(
>
>a*x + b*y + c*z = 0  would be a line that passes through the origin.

Actually, it's a plane passing through the origin with a normal vector
of <a, b, c>. The offset in the equation above is the distance from the
origin multiplied by the length of the normal vector.

As others have already recommended, you (pk) should read some
introductory text on analytical geometry (many books on computer
graphics cover this), and to tie in to another recent thread, in Austria
this is covered in 5th or 6th grade "Gymnasium" (14 or 15 year old
pupils) IIRC.

	hp

-- 
   _  | Peter J. Holzer    | Nicht an Tueren mangelt es,
|_|_) | Sysadmin WSR       | sondern an der Einrichtung (aka Content).
| |   | hjp### [at] wsracat      |    -- Ale### [at] univieacat
__/   | http://www.hjp.at/ |       zum Thema Portale in at.linux


Post a reply to this message

From: Mike Weber
Subject: Re: how does POV work??
Date: 26 Apr 2000 08:51:55
Message: <3906e66b@news.povray.org>
Very well....

sorry - couldn't resist any longer....


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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